Skip to main content

Über dieses Buch

Discover the Django web application framework and get started building Python-based web applications. This book takes you from the basics of Django all the way through to cutting-edge topics such as creating RESTful applications. Beginning Django also covers ancillary, but essential, development topics, including configuration settings, static resource management, logging, debugging, and email. Along with material on data access with SQL queries, you’ll have all you need to get up and running with Django 1.11 LTS, which is compatible with Python 2 and Python 3.
Once you’ve built your web application, you’ll need to be the admin, so the next part of the book covers how to enforce permission management with users and groups. This technique allows you to restrict access to URLs and content, giving you total control of your data. In addition, you’ll work with and customize the Django admin site, which provides access to a Django project’s data.
After reading and using this book, you’ll be able to build a Django application top to bottom and be ready to move on to more advanced or complex Django application development.
What You'll LearnGet started with the Django framework
Use Django views, class-based views, URLs, middleware, forms, templates, and Jinja templates
Take advantage of Django models, including model relationships, migrations, queries, and forms
Leverage the Django admin site to get access to the database used by a Django project
Deploy Django REST services to serve as the data backbone for mobile, IoT, and SaaS systemsWho This Book Is For

Python developers new to the Django web application development framework and web developers new to Python and Django.



Chapter 1. Introduction to the Django Framework

The Django framework started in 2003, as a project done by Adrian Holovaty and Simon Willison at the Journal-World newspaper in Lawrence, Kansas, in the United States. In 2005, Holovaty and Willison released the first public version of the framework, naming it after the Belgian-French guitarist Django Reinhardt.

Daniel Rubio

Chapter 2. Django Urls and Views

In this chapter, you’ll learn more about Django urls, which are the entry point into a Django application workflow. You’ll learn how to create complex url regular expressions, how to use url values in view methods and templates, how to structure and manage urls, and how to name urls.

Daniel Rubio

Chapter 3. Django Templates

Django templates define the layout and final formatting sent to end users after a view method is finished processing a request. In this chapter, you’ll learn the syntax used by Django templates, the configuration options available for Django templates, as well as the various Django template constructs (e.g., filters, tags, context processors) that allow you to create elaborate layouts and apply formatting to the content presented to end users.

Daniel Rubio

Chapter 4. Jinja Templates in Django

However, the adoption and growth behind Jinja templates in Django projects is in part due to the design limitations of Django templates, which have changed little to nothing since Django's creation.

Daniel Rubio

Chapter 5. Django Application Management

Django, like all modern application development frameworks, requires that you eventually manage tasks to support the core operation of a project. This can range from efficiently setting up a Django application to run in the real world, to managing an application’s static resources (e.g., CSS, JavaScript, image files).

Daniel Rubio

Chapter 6. Django Forms

Forms are the standard way that users input or edit data in web applications. At their lowest level, forms are made up of HTML tags with special meaning. While you can directly add HTML form tags to Django or Jinja templates, you really want to avoid this and use Django's built-in form support to make form processing easier.

Daniel Rubio

Chapter 7. Django Models

The typical way for Django applications to interact with data is through Django models. A Django model is an object-oriented Python class that represents the characteristics of an entity. For example, an entity can be a person, a company, a product, or some other concept used by an application.

Daniel Rubio

Chapter 8. Django Model Queries and Managers

As you learned in the previous chapter, Django models encapsulate data through classes, enforce data validation, are used to interact with a Django project’s relational database, and have a myriad of options to guarantee and customize how data operates in Django projects.

Daniel Rubio

Chapter 9. Django Model Forms and Class Views

In the previous two chapters you learned how Django models are used to move data between a relational database and a Django project. Although this is the main purpose of Django models, there’s another important set of functionalities fulfilled by Django models that isn’t tied directly to a database.

Daniel Rubio

Chapter 10. Django User Management

In this chapter you’ll learn about Django administers users, groups, and permissions. You’ll learn how to conditionally display content depending on a user, how to restrict urls and class-based views, as well as how to manage CRUD (Create-Read-Update-Delete) permissions for Django model records based on user permissions.

Daniel Rubio

Chapter 11. Django admin Management

The Django admin is a user-friendly application to administer the contents of a relational database linked to a Django project.

Daniel Rubio

Chapter 12. REST Services with Django

In this chapter, you’ll learn about the options available to create REST services with Django, including plain Python/Django REST services and framework specific REST services. In addition, you’ll learn how to create REST services with plain Python/Django packages and when they’re preferable over using framework specific REST services packages. In addition, you’ll also learn how to create and use some of the most important features of REST services created with the Django REST framework, as well as incorporate essential security into Django REST framework services.

Daniel Rubio


Weitere Informationen

Premium Partner

Neuer Inhalt

BranchenIndex Online

Die B2B-Firmensuche für Industrie und Wirtschaft: Kostenfrei in Firmenprofilen nach Lieferanten, Herstellern, Dienstleistern und Händlern recherchieren.



Best Practices für die Mitarbeiter-Partizipation in der Produktentwicklung

Unternehmen haben das Innovationspotenzial der eigenen Mitarbeiter auch außerhalb der F&E-Abteilung erkannt. Viele Initiativen zur Partizipation scheitern in der Praxis jedoch häufig. Lesen Sie hier  - basierend auf einer qualitativ-explorativen Expertenstudie - mehr über die wesentlichen Problemfelder der mitarbeiterzentrierten Produktentwicklung und profitieren Sie von konkreten Handlungsempfehlungen aus der Praxis.
Jetzt gratis downloaden!