Contributors Rishabh Singh / @stalwart201Shashank Aryan / @arlok31Shweta Suman / @cosmologist10Mannu Gupta / @theparadoxer02Shashank Kumar / @realslimshankyShivam Sharma / @shivams334
For Debian users: $ sudo apt-get install pip
$ sudo pip install django
$ pyhton -m django --version
$ django-admin startproject mysite 'mysite' is the name of the project
git init
git clone "url"
$ sudo pip install django
$ pyhton -m django --version
$ django-admin startproject mysite 'mysite' is the name of the project
git init
git clone "url"
$ sudo pip install django
$ pyhton -m django --version
$ django-admin startproject mysite 'mysite' is the name of the project
$ python manage.py startapp 'Appname'
A URL is simply a web address You can see a URL every time you visit a website It is visible in your browser's address bar urls.py file is made in mysite folder to link all urls
A view function, or view for short, is simply a Python function that takes a Web request and returns a Web response This response can be the HTML content of a Web page, or a redirect, or a 404 error, or an XML document, or an image or anything
A template is simply a text file. It can generate any text-based format (HTML, XML, CSV, etc.) A template contains variables, which get replaced with values when the template is evaluated, and tags These tags control the logic of the template
Display an HTML form with automatically generated form widgets (like a text field or date picker) Check submitted data against a set of validation rules Redisplay a form in case of validation errors Convert submitted form data to the relevant Python data types
To add, edit and delete the posts we've just modeled, we will use Django admin The admin is enabled in the default project template used by startproject To Register a model to the Admin
from django.contrib import admin
from .models import model
admin.site.register(Modelame)
Below are some references you should go to get in-depth knowledge about Django
Django Girls Tutorial
Two Scoops Of Django
Tango With Django
Mastering Django
Below are some video series that will give you a headstart in Django
Coding Entrepreneurs - Try Django
The New Boston - Django Tutorials for Beginners
Sentdex - Django Web Development with Python
Mike Hibbert - Python Django tutorial