I always start every django project by configuring some swagger documentation and adding a user view and serializer. This repository serves as a base project that can be cloned and installed with all of these things already set up.
python3
, pip
, and virtualenv
are needed to get started. All three of these should come with the latest installation of python.
- Clone the repo
git clone https://github.com/pplum09/django-rest-base.git
cd django-rest-base
- Create python virtual environment
python3 -m venv venv
source venv/bin/activate
Run source venv/bin/activate
from the project directory any time you want to start developing. Use command deactivate
to exit out of the python virtual environment.
- Install dependencies
pip3 install -r requirements.txt
cd api
- Migrate the database
python manage.py migrate
- Create superuser
python manage.py createsuperuser
- Run server
python manage.py runserver
Your base app should now being running at http://localhost:8000 Swagger docs are at http://localhost:8000/swagger/
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License.