Django Tutorial
Django Tutorial
Image Source
● So far, we have done Django templates
and how to insert dynamic data into
templates
● Now we will move further to Django
staticfiles.
● As in our previous lecture, we have
created a very simple HTML page.
● What if we want to add some styles,
animation to our website?
● The answer is Django staticfiles.
● Websites generally need to serve
additional files such as images,
JavaScript, or CSS. In Django, we refer to
these files as “static files”.
Steps to add staticfiles
● First of all, we will create a new
directory/folder inside of the project
called static ( just like we did for
templates)
● Then we will add this folder path to the
project’s settings.py file
●
Steps to add staticfiles
● An administrator (admin) is
someone who can make
changes on a website that
will affect other users.
● Admin can change security
settings, add user, delete user
DJANGO ADMIN
TO CREATE USER
● Registration (Website)
● Online Cricket Scoring
● Cart
Django Login,
Logout, auth
DJNAGO LOGIN SYSTEM
● HttpResponseRedirect()
according to user type
● Template inheritance in
dashboard page
○ Base.html >
dashboard_base.html
DJNAGO LOGIN SYSTEM