- django-allauth
- Signin, Signup, Password Reset, Multiple Email Addresses and more.
- google social login
- celery, beat, redis
- Nice Admin Dashboard Template
- Docker and docker-compose
- PostgreSQL
- htmx.org
- djmail to send emails using celery
- django_db_logger for logging to the database.
- Custom template tags, management commands
- i18n supporting English and Turkish
- Email sending for email verification.
- Bootstrap 5, ChartJS
# clone the project
git clone https://github.com/adnankaya/djbp.git
# go to project directory
cd djbp
# create venv instance named as env
python3 -m venv env
# for linux/macos users
source env/bin/activate
# for windows users
.\env\Scripts\activate
# install packages
pip install -r requirements.txt
# .env file creation
cp .env.example .env
# Migrate files
python manage.py migrate
# [Optional] make migrations if necessary
python manage.py makemigrations app-name
python manage.py migrate
# [DEVELOPMENT] init all command
python manage.py init_all
# run project for development mode
python manage.py runserver --settings=src.settings.dev
# run project for production mode
python manage.py runserver --settings=src.settings.prod
# run project for test mode
python manage.py runserver --settings=src.settings.settings_for_test
python manage.py collectstatic
python manage.py makemessages -l tr --ignore=venv
python manage.py compilemessages
- Find and remove migration files
find . -path "*/migrations/*.py" -not -path "./venv/*" -not -name "__init__.py" -delete
# run gunicorn with 4 workers
gunicorn core.wsgi:application -w 4
# new terminal apache bench
ab -n 100 -c 10 http://127.0.0.1:8000/
# This will simulate 100 connections over 10 concurrent threads. That's 100 requests, 10 at a time.
- Dockerfile
# install system dependencies
RUN apt-get update && apt-get install -y telnet
- python side
# tasks.py
from celery.contrib import rdb
def mytask():
# ...
rdb.set_trace()
# ...
- Trigger related celery task
docker compose exec worker bash
root@fc4dcaa377b1:/usr/src/app# telnet 0.0.0.0 6900
docker images -a | grep none | awk '{ print $3; }' | xargs docker rmi