Skip to content

MSKose/django-drf-blog-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django DRF Blog Api

Table of Contents

Overview

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

Stack & Tools

  • Django
  • Django Rest Framework
  • PostgreSQL
  • Django Debug Toolbar
  • drf-yasg (Swagger generator)
  • dj-rest-auth

Project Structure

.──── 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

How To Use

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

Contact

Releases

No releases published

Packages

No packages published

Languages