Book Image

Web Development with Django - Second Edition

By : Ben Shaw, Saurabh Badhwar, Chris Guest, Bharath Chandra K S
4.7 (3)
Book Image

Web Development with Django - Second Edition

4.7 (3)
By: Ben Shaw, Saurabh Badhwar, Chris Guest, Bharath Chandra K S

Overview of this book

Do you want to develop reliable and secure applications that stand out from the crowd without spending hours on boilerplate code? You’ve made the right choice trusting the Django framework, and this book will tell you why. Often referred to as a “batteries included” web development framework, Django comes with all the core features needed to build a standalone application. Web Development with Django will take you through all the essential concepts and help you explore its power to build real-world applications using Python. Throughout the book, you’ll get the grips with the major features of Django by building a website called Bookr – a repository for book reviews. This end-to-end case study is split into a series of bitesize projects presented as exercises and activities, allowing you to challenge yourself in an enjoyable and attainable way. As you advance, you'll acquire various practical skills, including how to serve static files to add CSS, JavaScript, and images to your application, how to implement forms to accept user input, and how to manage sessions to ensure a reliable user experience. You’ll cover everyday tasks that are part of the development cycle of a real-world web application. By the end of this Django book, you'll have the skills and confidence to creatively develop and deploy your own projects.
Table of Contents (19 chapters)

An Introduction to Django Admin

This chapter introduces you to the basic functionality of the Django admin app. You will start by creating superuser accounts for the Bookr app, before moving on to executing Create, Read, Update, and Delete (CRUD) operations with the admin app. You will learn how to integrate your Django app with the admin app, and you’ll also look at the behavior of ForeignKeys in the admin app. At the end of this chapter, you will see how you can customize the admin app according to a unique set of preferences by sub-classing the AdminSite and ModelAdmin classes, making its interface more intuitive and user-friendly.

In this chapter, we will cover the following topics:

  • Creating a superuser account
  • CRUD operations using the Django admin app
  • Managing Django users and groups
  • Registering models with the admin app
  • Customizing the admin interface

By the end of this chapter, you will be able to do the following:

  • Create an...