A blog-engine Rest API constructed in django restframework with custom user models and login.
A blog-engine is a a software or tool which let’s one create and manage a blog or website.
Conventional websites are a collection of web pages that are accessible from a website. A blog differs from a website in that it is generally managed using a blogging platform which stores your content, media, files, links and all other necessary things required for the operation and working of your blogs which are created by the users of the site and not the administrators.
Social Media Websites can be considered the technological descendants of the original blog-engine concept, popularized in the early 2000s.
Source: cultofweb.com
- Sign up a new
user
if not already registered. - Generate an
author
from the newuser
if not already generated. - Whenever a new
blog post
is added, theauthor
is derived fromrequest.user
and added to theblog post
model object. - A
blog post
can only be updated or deleted ifrequest.user
is either the owning user or a member of the staff. - The list of all users can only be viewed/deleted if
request.user
is a member of the staff.
- Type:
REST API
- Authentication:
Token Authetication
- Database Type:
Relational
- Database:
PostgreSQL
- Types of Users:
Superuser
,Staff
,User
- Timezone:
Asia/Kolkata (UTC +05:30hrs)
-
Create a
virtualenv
named such asenv
and switch to it. -
Run:
python -m pip install --upgrade pip
to upgrade thePythonPackageManager
(just to save you an hour's worth of headache 5 minutes later). -
Run:
pip install -r requirements.txt
-
Run: [
chmod +x run.sh
,chmod +x migrate.sh
,chmod +x shell.sh
] -
Create the
.env
file and fill the values as per the format given below. -
Run:
./migrate.sh
-
Run:
python manage.py createsuperuser
7.1. Enter the superuser credentials as required.
-
Run:
./run.sh
to run the server.8.1. Run:
./shell.sh
to run theDjango Shell
when required.
-
Used for user registration and verification via author-generation.
-
Used to perform CRUD operations on blog posts in/from the database.
## Website Encryption:
SECRET_KEY = ' '
## Database Settings:
DATABASE = ' '
USER = ' '
PASSWORD = ' '
HOST = ' '
PORT =
## Site Settings:
DEBUG = True/False
LANGUAGE_CODE = ' '
TIME_ZONE = ' '
USE_I18N = True/False
USE_TZ = True /False
## AWS S3 Settings:
AUDIO_POST_URL = ' '
documenter.getpostman.com (To be updated...)
- Prithoo Medhi, 2021