π A ready-to-use Django + Django REST Framework (DRF) template for building scalable RESTful APIs.
Pre-configured with essential features like authentication, permissions, pagination, and more, so you can jumpstart your next project with ease. Perfect for rapid API development and clean architecture.
- π JWT Authentication
- π‘οΈ Role-based permissions
- π Customizable pagination
- π CORS configuration
- π Swagger/OpenAPI documentation
- π³ Docker support
- π§ͺ Pre-configured testing setup
-
Clone the repository:
git clone https://github.com/Tomilola-ng/django-drf-template.git cd django-drf-template
-
Set up a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Run migrations:
python manage.py migrate
-
Start the development server:
python manage.py runserver
Visit http://localhost:8000/api/
to access the API.
- Environment variables: Copy
.env.example
to.env
and update the values. - Database: Configure your database in
settings.py
or use the default SQLite. - Custom user model: Located in
users/models.py
.
Run the test suite:
python manage.py test
Dockerfile and docker-compose.yml are provided for easy deployment. Adjust as needed for your production environment.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Twitter: https://x.com/tomilola_ng
- LinkedIn: https://www.linkedin.com/in/tomilola-oluwafemi/
- Hashnode: https://hashnode.com/@tomilolang
Happy coding! π