Guides


Guides category
12 ноября 2017 г. 21:25

Setup Django Rest Framework with DataTable with searching and filtering, including related objects

1. Let me skip the topic of "how to install Django". You can clone demo project. 1. Install Django Rest Framework #!bash pip install djangorestframework 1. add django rest framework into installedd apps:\ #!python #settings.py INSTALLED_APPS = [ .. 'rest_framework', .. ] 1. create new app and add it to installed apps #!bash python manage.py st...

Share:
Published by: Dennis
8 июня 2018 г. 17:40

django-rest-framework-jwt authenticate using email as username

#The problem - use email field as username in Django JWT# !REST! framework !JWT! Auth uses **.USERNAME_FIELD** by default. If you read the !Django! Docs you could find out how to redefine this value. Just read [this.](https://docs.djangoproject.com/en/2.0/topics/auth/customizing/#django.contrib.auth.models.CustomUser.USERNAME_FIELD) But there is a problem. The problem is what you have ...

Share:
Published by: Dennis
9 мая 2018 г. 23:49

How to install Celery and Celerybeat in Daemon mode + Redis on Ubuntu 16.04 for Django

## 1. Prepare the system #!bash sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential sudo apt-get install python3-dev ## 2. Install !Redis!## #!bash sudo apt-get install redis-server ## 3. Check installation## #!bash redis-cli ping # should return PONG ## 4. Add !python! packages (activate virtual environment if needed)## #!bash pip inst...

Share:
Published by: Dennis
8 июня 2018 г. 14:55

Django Signals How-to (step-by-step)

As official documentation says: >!Django! includes a “!signal! dispatcher” which helps allow decoupled applications get notified when actions occur elsewhere in the framework. In a nutshell, !signals! allow certain senders to notify a set of receivers that some action has taken place. They’re especially useful when many pieces of code may be interested in the same events. The most common "...

Share:
Published by: Dennis
22 ноября 2017 г. 21:22

Step by step guide how to install Django to Ubuntu 16.04 + Apache

## 1. Update the system## #!terminal sudo apt-get update sudo apt-get upgrade ##2. Install tools## #!bash sudo apt-get install mc nano git ##3 . Configure locales(optoinal)## #!bash sudo dpkg-reconfigure locales ##4 . Install Apache2 server## #!bash sudo apt-get install apache2 sudo apt-get install libapache2-mod-wsgi-py3 ##5 . Install Python stuff## #!bash ...

Share:
Published by: Dennis
25 января 2018 г. 22:23