https://github.com/izzypt/no_shortcuts_django
Build a functional API with Docker, Celery, Redis, Flower, Nginx, Nginx Proxy manager, Portainer and more...
https://github.com/izzypt/no_shortcuts_django
Last synced: 25 days ago
JSON representation
Build a functional API with Docker, Celery, Redis, Flower, Nginx, Nginx Proxy manager, Portainer and more...
- Host: GitHub
- URL: https://github.com/izzypt/no_shortcuts_django
- Owner: izzypt
- License: mit
- Created: 2023-11-22T17:18:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-04T21:00:56.000Z (over 2 years ago)
- Last Synced: 2025-01-14T21:45:45.369Z (over 1 year ago)
- Language: Python
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# No_ShortCuts_Django
### What we are going to build
We are going to make a clone of medium (https://medium.com/flutter/whats-new-in-flutter-3-16-dba6cb1015d1), but just the API (exclude frontend/UI stuff).
Auth related functionality like :
- register
- login
- logout
- password
- reset
- verify user
- get acess
- refresh tokens
Article functionality:
- Search using elasticsearch
- Followers
- Article Date and read time
- Likes
- Responses
### Some of the concepts touched upon on this repo :


### Mailhog and Mailgun
- In development and testing purposes , I'am going to use mailhog, which is a web and API based SMTP testing tool (https://github.com/mailhog/MailHog)
- (Mailhog should not be used in production purposes, only development... on production we are going to use ***MailGun***, which is an email delivery service.)
### Docker
- For all our services in development and production , I'am going to be using ***Docker*** (To manage the containers on development environment we will use ***Docker Desktop*** and ***Portainer*** on production environment).
### Nginx
- In development and also in production , I'am going to be using Nginx as our web server and reverse proxy.
- In production we are going to be using an open source tool called Nginx proxy manager which will give us a nice GUI and help us to easily set up SSL certificates.
### Celery and Redis
- To make Django behave asyncronously we can use:
- A package called ***django-channels*** .
- Or , we can use ***celery*** in combination with ***Redis*** or ***RabbitMQ***.
### JWT
- For authentication we are going to use ***JWT***(JSON web tokens)
### pytest
- For testing, a library that help us write test for Django, Flask, Fast API....
### Project setup steps
- Create a working dir and virtual env
- Install packages
- Django settings
- Django apps
### Logging in Django
Key components are:
- Log levels
- **Describes the severity of the mesage**:
- Error -> Major Problem occured
- Warning -> Minor Problem occured
- Info -> General system information
- Debug -> Low level system information
- Critical - Critical Problem
- Handlers
- **Responsible for dispatching log message to the appropriate destination**:
- Console
- Files
- e-Mail
- Formatters
- Define the format of the log.
- Logs are in a log record format and need to be converted before being sent.
- Filters
- **Filter log messages based on some criteria**:
- log levels for example