Tango with Django
Jaysinh shukla (~jaysinh) |
To teach Django framework by implementing a demo project.
A tool which helps the members to write, manage and publish their Blog.
Django is a battery included framework. The framework has saved developers from many falls. It is experienced that development time of Django project is less than any other web framework. Despite having such advantages I have noticed it has a hard learning curve. Django documentation has a nice tutorial section but it is impossible to not lost while implementing it. During this workshop, I will try to introduce Django framework by hacking with blog project. Hands on development will help a newcomer to get an overview of the framework. Below is workshop outline.
- Introduction to Virtual environment
- Installation of Django package from PyPI
- Introduction to Django framework and its philosophy
- Overview of
- Create a Django project. The project is blogging tool
- Structure of settings.py file, various configurations of it.
- Configure Database with Django project.
- How to apply migrations.
- Explanation of Django apps and Create Django apps
- Structure of Django app. The purpose for model.py, view.py, urls.py.
Creating and applying Django migrations by
$> python manage.py makemigrations
$> python manage.py migrate
Running Django server
$> python manage.py runserver
Creating a model for the blog.
- state: draft, published
Introduction to Django shell
$> python manage.py shellIntroduction to Django ORM. Create entries to blog model using Django shell. Demonstration of Django ORM's
create, deletemethod. Creating a search using
filtermethod. Deleting existing records with
deletemethod. Introduction to Django templates Creating final view for displaying Blog posts Introduction to small Python regular expression and their use in URL definition of Django. Connecting Django views with the controller. Introduction to Django forms Create a form for Blog create and connecting Django form with a template. Introduction to Django admin panel for management. Q&A
- Installation of Python in Any architecture
- IDE for writing code in Python
A Full-stack developer by profession, A Computer scientist by heart, An Actor by gene. I am Speaker, Vimmer, Blogger and Organizer. Core member of PyKutch.