Jun 24Django 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 read
Jun 20Django 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 read
Published in Towards Dev·Jun 15Django 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 read
Published in Towards Dev·Jun 13Django 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 read
Jun 2Django 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 read
May 28Django Slug (Slugify URL)Simple slugify URL in Django. Official docs here. Step 1: Preparation, Create Django Project, Initial 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 Step 2: Create Django…Django2 min read
May 24Django with Autocomplete JQueryUIDjango form field with autocomplete jquery. Data is stored in model django and autocomplete by 3 letters typed by user. Autocomplete JQueryUI official docs here. Step 1: Preparation, Create Django Project, Initial 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…Django2 min read
Feb 10, 2021Django Rest Framework Simple JWTDjango rest framework with access and refresh token. Django rest framework simple jwt doc here. Django rest framework doc here. Step 1: Preparation, Create Django Project, Initial Migration create virtualenv: virtualenv venv start virtualenv: venv/Scripts/activate install Django in virtualenv: pip install django==3.0 install drf: pip install djangorestframework install drf simplejwt: pip install djangorestframework_simplejwt Create Django…Django Rest Framework2 min read
Dec 21, 2020Django Custom Language and Time ZoneSimple customization for language and timezone in django admin. By default django language is English and UTC Timezone. We can change to another language and timezone. Here’s the example, Language Bahasa Indonesia, timezone: GMT+7 (Jakarta’s Time). Official docs for Django internationalization and localization here. …Django2 min read
Nov 22, 2020Django Admin Export to Excel, CSV, and OthersExport data in django admin into excel spreadsheet, csv and other format using django-import-export library. Official docs here. Step 1: Preparation, Create Django Project, Initial Migration create virtualenv: virtualenv venv start virtualenv: venv/Scripts/activate install Django in virtualenv: pip install django==3.0 django-import-export Create Django: django-admin startproject myproject Go to myproject folder: cd myproject Initial Migration: python manage.py…Django2 min read