
Explore Django, the powerful Python web framework, by building three real world apps—from an employee directory to a todo app and a blog dashboard—through hands-on, beginner-to-intermediate lessons.
Use Django, a popular open-source Python framework, to build fast, secure, scalable web apps. Delivers ORM, built-in authentication, PBKDF2 hashing, and a default admin panel for easy CRUD.
Leverage Django, an open-source, fast and scalable web framework built with Python, to enjoy a built-in admin interface, strong community support, and comprehensive documentation for rapid development.
Install vs code as the primary editor for django apps, with optional git bash for linux commands, and be prepared to set your git identity.
Create a dedicated virtual environment for each Django project to manage specific package versions, preventing conflicts and ensuring your projects run with the required Django and Pillow versions.
Create a project folder, build and activate a virtual environment. Install django in the activated environment and use pip freeze to compare with global packages.
Create a Django project, activate the virtual environment, and run the development server, while exploring core files like manage.py, settings.py, urls.py, wsgi.py, asgi.py, and sqlite3 in the mysite directory.
Explore Django settings by examining settings.py, including base dir, secret key, debug, and allowed hosts. Review apps, middleware, root url conf, templates, databases, and internationalization.
This lecture explains the model view template design pattern in Django, and how the view bridges the model to the template via URL patterns and data flow.
Set up django urls and http responses by creating a home view in views.py, wiring it in urls.py, and returning an http response with hello world.
Learn how to render HTML templates in Django by creating a templates folder, building home.html, and wiring render in views; configure settings.py templates dirs for dynamic home page content.
Implement bootstrap in your Django project by adding cdn links in the head, wrap content in a container, and use bootstrap utilities like padding (p-5) to style tables and headings.
Learn how Django serves static files by configuring static URLs, setting up a static folder with CSS and images, and loading them in templates using the static tag.
Create and manage Django apps as Python packages within a project, separating features like authentication and orders. Explore app structure including __init__.py, admin.py, apps.py, models.py, views.py, and tests.
Explore the django admin panel, set up migrations and the admin url, create a super user, log in, and perform basic crud through site administration and user management.
Create an employee model in models.py to store data in sqlite3, defining fields for first name, last name, photo, designation, email (unique), phone, and created at and updated at.
Add employees app in settings.py and activate the virtual environment; install pillow for the image field. Run makemigrations and migrate to create 0001_initial, then register the Employee model in admin.py.
Configure and load media files in Django by creating a media folder, setting MEDIA_URL and MEDIA_ROOT in settings, and serving uploaded files in development via urls.py and static().
Fetch data from the database by querying the employee model with objects.all, pass the results in a context to home.html, and render them using a for loop and template variables.
Learn to render a dynamic django table by looping over employees, displaying full name, designation, and phone number, with a for loop counter for serial numbers.
Drills down into building a django employee detail view by routing with urls.py, using a primary key and get object or 404 to fetch data, then return an http response.
Render an employee detail page in Django by passing an employee object in context and displaying first name, last name, email address, designation, and photo in a Bootstrap card.
Build Django fundamentals by creating three projects: a simple employee directory, a todo app with login and registrations, permissions, authors, categories, and a blog application.
Create a todo app by building a Django project, setting up a virtual environment, and installing Django. Build a simple HTML, CSS, Bootstrap front end and run the server.
Run migrations to create Django's admin, content type, and sessions tables; then create a superuser and implement a home view by wiring urls and returning a simple http response.
Create and render a Django template for a todo app by configuring templates in settings, creating home.html, and implementing CRUD operations for tasks.
Create a GitHub account, set up a private repository, initialize git, add and commit changes, and push to the main branch with origin for your Django project.
Register a todo app, define a task model with fields for task, is_completed, created_at, and updated_at, then migrate and use front-end input to add and complete tasks.
Fetch tasks from the task model using is_completed false to display not completed items, pass them in the home context, and render on the front end by looping in home.html.
Learn to customize the Django admin by creating a TaskAdmin with a list_display of task, is_completed, and updated_at, then register it and optionally add search_fields to improve task tracking.
Wire url patterns to an add_task view and configure a post form with a csrf token to store the task in the database.
Explore how to implement a Django add task function that handles post form data, creates a task with default is_completed false, and redirects to the home page with updatedat ordering.
List completed tasks by filtering Task.objects.filter(is_completed=true) and pass them to home.html to render on the right side.
Implement a mark as done feature by passing the task primary key in the url, fetching the task with get_object_or_404, setting is_completed to true, saving, and redirecting home.
Define the edit task url pattern in the todo app, pass the task primary key to the edit_task view, and render the edit_task.html template with a bootstrap page.
Designs an edit task page for a Django todo app, integrating bootstrap and font awesome, handling get and post requests, and passing a task object from view to template.
Demonstrates the edit task feature using a post request to update a task in a Django view, capturing new task from request.post and redirecting to the home page.
Implement delete task functionality in a Django blog app by creating a delete task URL and view that fetches, deletes the task, and redirects home, illustrating CRUD operations.
Push all code to GitHub by checking status, staging with git add -A, committing with -m, and pushing to origin main for the todo app.
Build a Django blog application by creating a virtual environment, installing Django 4.1.7, upgrading pip, and starting a new project named blog_main, then run the server to load the app.
Run python manage.py migrate to create the default database tables, then create a super user with python manage.py createsuperuser, and log in to the admin panel after starting the server.
Define the home url as an empty path in blog_main/urls.py, map it to the home view, render the home.html template, and configure settings to locate the templates directory.
Design the homepage using bootstrap ready-made templates and a blog layout, then configure django static files to load CSS and images.
Set up git for the Django blog by creating a dot gitignore to ignore env, sqlite3, and media, then initialize, commit, set main, and push to origin on GitHub.
Create a category model with a unique category name, created at, updated at, and a string representation. Apply makemigrations and migrate, and register the blogs app in admin.
Configure django media by setting media url and media root, and create a media folder for featured images. Update urls and static imports, then proceed to create the blog model.
Define a blog model with fields for title, slug, category, author, featured image, short description, body, status, and timestamps for creation and update. Make slug unique for SEO.
Explore how to auto-generate slugs in Django using pre-populated fields in the blog admin by configuring BlogAdmin from admin.ModelAdmin and pre_populated_fields from title.
Configure the blog admin to display title, category, author, is featured, and status, enable search by id, title, category name, and status, and use status choices like draft and published.
Push your blog app code to GitHub by staging changes with git add -A, committing with a message, and pushing to origin main, then verify the new commit.
In this course, you will master the basics of Django, a popular Python web framework used for developing robust, scalable, and secure web applications.
We will dive into the key concepts of Django, such as models, views, templates, and URL routing by developing a simple practical Employee Directory website.
Then, you'll dive into building the To-Do application, which will give you hands-on experience with Django's Object-Relational Mapping (ORM), views, templates, and forms and most importantly it will teach you how to perform the CRUD Operations.
Level Up: The Complete Django Blog
Throughout the course, you will learn how to create, read, update, and delete blog posts in the application. You will also gain practical experience with Django's built-in authentication and authorization system, which will enable you to manage user accounts and permissions in your application.
Additionally, you will learn how to create dynamic pages, custom dashboards, search functionality, and display data using Django's built-in template language.
Master Django Fundamentals: Build a Strong Foundation in Python Web Development with Django!
Build a simple Employee Directory Website with Django
Build a To-Do app using the Django framework
Learn how to create, read, update, and delete tasks in the application
Understand the basics of Django's Model-View-Controller (MVC) framework
Gain hands-on experience with Django's Object-Relational Mapping (ORM)
Build a Blog application using the Django framework
Learn to build the CRUD functionalities
Complete Assignments