Book Image

Mastering Django: Core

By : Nigel George
Book Image

Mastering Django: Core

By: Nigel George

Overview of this book

Mastering Django: Core is a completely revised and updated version of the original Django Book, written by Adrian Holovaty and Jacob Kaplan-Moss - the creators of Django. The main goal of this book is to make you a Django expert. By reading this book, you’ll learn the skills needed to develop powerful websites quickly, with code that is clean and easy to maintain. This book is also a programmer’s manual that provides complete coverage of the current Long Term Support (LTS) version of Django. For developers creating applications for commercial and business critical deployments, Mastering Django: Core provides a complete, up-to-date resource for Django 1.8LTS with a stable code-base, security fixes and support out to 2018.
Table of Contents (33 chapters)
Mastering Django: Core
Credits
About the Author
www.PacktPub.com
Preface
Free Chapter
1
Introduction to Django and Getting Started

Your first app


Now that you've verified that the connection is working, it's time to create a Django app--a bundle of Django code, including models and views, that live together in a single Python package and represent a full Django application. It's worth explaining the terminology here, because this tends to trip up beginners. We've already created a project, in Chapter 1, Introduction to Django and Getting Started, so what's the difference between a project and an app? The difference is that of configuration vs. code:

  • A project is an instance of a certain set of Django apps, plus the configuration for those apps. Technically, the only requirement of a project is that it supplies a settings file, which defines the database connection information, the list of installed apps, the DIRS, and so forth.

  • An app is a portable set of Django functionality, usually including models and views, that live together in a single Python package.

For example, Django comes with a number of apps, such as the...