This is a back-end blog-api project made with Django DRF. To build this project I have used various tools, including drf-yasg, django toolbar, and django rest auth
- Django
- Django Rest Framework
- PostgreSQL
- Django Debug Toolbar
- drf-yasg (Swagger generator)
- dj-rest-auth
.──── django-drf-blog-api (repo)
│
.
├── README.md
├── blog
│ ├── __init__.py
│ ├── __pycache__
│ ├── admin.py
│ ├── apps.py
│ ├── migrations
│ │ └── __pycache__
│ ├── models.py
│ ├── serializers.py
│ ├── signals.py
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── debug.log
├── main
│ ├── __init__.py
│ ├── __pycache__
│ ├── asgi.py
│ ├── db.sqlite3
│ ├── settings
│ │ ├── __init__.py
│ │ ├── __pycache__
│ │ ├── base.py
│ │ ├── dev.py
│ │ └── prod.py
│ ├── urls.py
│ └── wsgi.py
├── manage.py
├── media (add this folder into your local repo)
│ ├── blog_default.jpg
│ ├── blog_pics
│ ├── default.jpg
│ └── profile_pics
├── requirements.txt
└── users
├── __init__.py
├── __pycache__
├── admin.py
├── apps.py
├── migrations
│ └── __pycache__
├── models.py
├── serializers.py
├── signals.py
├── tests.py
├── urls.py
└── views.py
To clone and run this application, you'll need Git
# Clone this repository
$ git clone https://github.com/MSKose/django-drf-blog-api
# Install dependencies
$ python -m venv env
> env/Scripts/activate (for win OS)
$ source env/bin/activate (for macOs/linux OS)
$ pip install -r requirements.txt
# Add the following to your .env file
SECRET_KEY=<yourSecretKeyHere>
DEBUG=True # switch to True when in production
ENV_NAME=dev # switch to prod when in production
SQL_DATABASE=<yourDatabaseProjectName>
SQL_USER=<yourDatabaseUsername>
SQL_PASSWORD=<yourDatabasePassword>
SQL_HOST=localhost
SQL_PORT=5432
# Run the app
$ python manage.py runserver