Search This Blog........

Monday, 7 January 2019

Django cheat sheet from beginner to advanced


Django Cheat Sheet

Django Cheet Sheet

Provided information for bigineer to advanced.
Difference between django 1.10 vs 2.x version
Django
1.10 or lower 2.1.x
Django 1.11 supports Python 2.7. Django 2 only supports Python 3.x
Routing syntax changed url(r'^articles/(?P[0-9]{4})/$', views.year_archive), no re expressions path('articles//', views.year_archive)
include function from django.conf.urls import include from django.urls import include

Installation:

pip install django

Check installation

django-admin version 2.1.2

Creat Project:

django-admin startproject projectname

Create app

Goto inside project and run
python manage.py startapp application_name