Feb 16Running Django App Image in DockerSimple Django Apps Image in Docker. Official docs of django and docker. Prerequisite: python and docker installed. Step 1: Preparation, Create Django Project, Inital Migration create virtualenv: virtualenv venv start virtualenv: venv/Scripts/activate install Django in virtualenv: pip install django==3.2 Create Django: django-admin startproject myproject Go to myproject folder: cd myproject Initial Migration: python manage.py migrate…Django2 min readDjango2 min read
Published in DevOps.dev·Jan 29Django Run Asynchronous Tasks with Celery and RabbitMQIt is strongly recommended for long running tasks (processes), it will reduce user waiting time and tasks will be executed as background processes. Official Docs: Django, RabbitMQ, Celery Prerequisite: RabbitMQ Server (localhost, heroku or other rabbitmq server) running as message broker. Step 1: Preparation, Create Django Project create virtualenv: virtualenv venv start…Django3 min readDjango3 min read
Jan 28Python Celery Asynchronous Tasks with RabbitMQ BrokerRunning asynchronous task with Celery Worker and RabbitMQ. It strongly recommended for long running tasks. Prerequisite: RabbitMQ Server (localhost, heroku or other rabbitmq server) Step 1: Preparation create virtualenv: virtualenv venv start virtualenv: venv/Scripts/activate install celery in virtualenv: pip install celery sqlalchemy eventlet Create App Folder: mkdir app Go to myproject folder: cd app…Python2 min readPython2 min read
Jan 26Fake Backend API using JSON ServerSimple Fake Backend using JSON Server. Official docs Preparation Install via npm: npm install -g json-server Create db.json file { "users": [ { "id": 1, "username": "user1", "password": "password" }, { "id": 2, "username": "user2", "password": "password" } ] } Run via terminal/CMD json-server --watch db.jsonJson Server2 min readJson Server2 min read
Oct 28, 2022Django Admin PaginationDjango Admin Model List with Pagination. Using list_per_page in admin.py Project file structureDjango2 min readDjango2 min read
Jun 24, 2022Django Taggit: Model Tag, Admin and FilteringDjango Taggit, model tag, registered in admin, and filtering, with bootstrap. Official docs django-taggit. Project structure. templates folder, base.html, articles.html, myapp/urls.py files are manually created, other files are auto-generated.Django3 min readDjango3 min read
Jun 20, 2022Django FilterA library like django form to filter queryset. Official docs django-filter. Project file structure. templates folder, base.html, books.html, myapp/filters, myapp/urls.py files are manually created (new files), other files are auto-generated.Django2 min readDjango2 min read
Published in Towards Dev·Jun 15, 2022Django Form Validation with BootstrapDjango Form Validation with Bootstrap style. Django form official docs here. Bootstrap validation reference here. Project structure. templates folder, base.html, home.html, success.html, myapp/urls.py files are manually created (new files), other files are auto-generated.Django2 min readDjango2 min read
Published in Towards Dev·Jun 13, 2022Django PaginationDjango pagination with class based view and function based view. Official docs here. Style with bootstrap. Project file structure. templates folder, base.html, books.html, myapp/urls.py files are manually created (new files), other files are auto-generated.Django2 min readDjango2 min read
Jun 2, 2022Django Simple CaptchaDjango form field with simple captcha. Using django-simple-captcha library. django-simple-captcha official docs here. Step 1: Preparation, Create Django Project create virtualenv: virtualenv venv start virtualenv: venv/Scripts/activate install Django and Django simple captcha in virtualenv: pip install django==3.2 django-simple-captcha Create Django: django-admin startproject myproject Go to myproject folder: cd myprojectDjango2 min readDjango2 min read