Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Coursera

Django Web Development

Packt via Coursera

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
This course features Coursera Coach! A smarter way to learn with interactive, real-time conversations that help you test your knowledge, challenge assumptions, and deepen your understanding as you progress through the course. Dive into Django web development and build dynamic web applications using Python’s popular framework. This course will guide you through all aspects of Django, from setting up your project to managing databases, creating templates, and building a functional API. By the end, you'll have a deep understanding of the Django framework and how to use it to build professional-grade applications. You'll start by learning about the Django framework and its Model-View-Controller (MVC) pattern. You'll understand how the MVC pattern is implemented in Django and learn to create a new project in PyCharm. From there, you'll explore the process of creating Django applications, configuring routing, and setting up your development server. As you progress, you will learn how to manage databases and migrations, create models for entities like courses and categories, and build dynamic templates. The course also covers more advanced topics such as creating APIs with Django, integrating authentication, and testing the functionality of your application. This course is ideal for beginners who want to learn web development using Django. It is perfect for developers with some basic knowledge of Python looking to expand their skills into web development. No prior experience with Django is required, but familiarity with Python is beneficial.

Syllabus

  • Introduction to the Django Web Framework
    • In this module, we will explore the foundational elements of the Django web framework, starting with an overview of its features and how it structures a web project. You will also gain an in-depth understanding of the Model-View-Controller (MVC) architecture and how Django uniquely implements this pattern. Additionally, you’ll learn how to set up a Django project in the PyCharm IDE, laying the groundwork for your development journey.
  • Creating a Django project
    • In this module, we will guide you through creating a new Django project, explaining its default structure and key components. You will gain insight into the role of the manage.py file and how it aids in managing your Django project. Additionally, we will show you how to start and verify the Django development server, and explore key settings and routing configurations essential for your project.
  • Creating a Django Application
    • In this module, we will walk you through the process of creating a new Django application, using the 'Shop' app as a practical example. You will explore the components and files generated within the app, understand why the project is named "base," and learn how to create view functions that handle HTTP requests. We’ll also demonstrate how to link view functions to specific URLs and integrate the app’s routes into the main project routing configuration.
  • Database and Migrations in Django
    • In this module, we will guide you through the process of working with databases and migrations in Django. You’ll start by executing default migrations, creating a superuser, and developing models for 'Course' and 'Category' entities. We’ll show you how to apply migrations, modify database models, and create instances of 'Category' and 'Course' both in the Django shell and admin interface. Additionally, you’ll learn how to customize the way these entities are displayed in the admin panel and serve data as HTTP responses to client requests.
  • Creating Templates in Django
    • In this module, we will explore the process of creating and using templates in Django. You will learn how to design HTML templates, integrate them with Django view functions, and populate the templates with dynamic data from the database. We will also break down the workflow connecting templates, views, and models in Django. Finally, you'll enhance the look of your templates by adding the Bootstrap CSS library for a more polished user interface.
  • Extending Other Templates in Django
    • In this module, we will guide you through the process of extending templates in Django. You’ll start by creating a base HTML template that serves as the foundation for consistent UI elements across multiple views. We’ll show you how to integrate a navigation bar into this base template for easy site-wide access. Additionally, we’ll walk you through a hands-on challenge and solution for dynamically updating the title of web pages based on the content being displayed.
  • Creating Multiple routes and View Functions
    • In this module, we will explore how to create multiple routes and view functions in Django. You will start by setting up a specific route to display individual course detail pages and develop a corresponding view function to fetch and display the course information. We’ll present a challenge for designing an HTML template for the course page, followed by a guided solution. Finally, we’ll show you how to handle cases where a course is not found in the database by returning a 404 error response.
  • Routing between Pages in Django
    • In this module, we will dive into routing between pages in Django, covering how to use relative and absolute paths to navigate between different views. You’ll learn how to set up routing based on URL pattern names and the significance of app naming in the routing configuration. We will guide you through adding a navigation link to the "All Courses" page, reorganizing the project structure by moving the templates folder, and refining the 'Course' model to meet evolving requirements. Finally, we’ll introduce you to API development by installing the django-tastypie library.
  • Creating an API Django Application
    • In this module, we will walk you through the creation of a dedicated Django application tailored for API development. You’ll learn how to design data models for the API, set up routing for the application's endpoints, and test the functionality of the API service. Additionally, we will cover how to implement versioning for the API to support future updates, and show you how to use Postman to send GET and DELETE requests to evaluate your API’s responses.
  • Managing Authentication for API Requests
    • In this module, we will guide you through managing authentication for API requests in Django. You will learn how to create unique API keys for users and set up authentication and authorization mechanisms, especially for DELETE requests. We will also cover how to allow public access for GET requests, create new resources via POST requests, and ensure correct data relationships between 'Course' and 'Category' using the 'Hydrate' method. Additionally, we’ll introduce the 'Dehydrate' method to modify data before sending it to the client, and wrap up the module by reviewing GET, POST, and DELETE request handling.
  • Django Project Refactoring and Admin Settings
    • In this module, we will focus on refining and optimizing your Django project setup. You’ll learn how to refactor routing configurations for the API application and set up an index route, integrating it into the site’s navigation bar. Additionally, we will guide you through modifying the Django admin panel to enhance its usability and organization. The module will conclude with a recap of the key achievements from the Django courses project, reinforcing what you’ve learned.

Taught by

Packt - Course Instructors

Reviews

Start your review of Django Web Development

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.