Django Essentials. için kapak resmi
Django Essentials.
Başlık:
Django Essentials.
Yazar:
Dauzon, Samuel.
ISBN:
9781783983711
Yazar Ek Girişi:
Fiziksel Tanımlama:
1 online resource (204 pages)
İçerik:
Django Essentials -- Table of Contents -- Django Essentials -- Credits -- About the Author -- About the Reviewers -- www.PacktPub.com -- Support files, eBooks, discount offers and more -- Why Subscribe? -- Free Access for Packt account holders -- Preface -- What this book covers -- What you need for this book -- Who this book is for -- Conventions -- Reader feedback -- Customer support -- Downloading the example code -- Errata -- Piracy -- Questions -- 1. Django's Position on the Web -- From Web 1.0 to Web 2.0 -- Web 1.0 -- Web 2.0 -- What is Django? -- Django - a web framework -- The MVC framework -- Why use Django? -- Summary -- 2. Creating a Django Project -- Installing Python 3 -- Installing Python 3 for Windows -- Installing Python 3 for Linux -- Installing Python 3 for Mac OS -- Installing setuptools -- Installing setuptools for Windows -- Installing setuptools for Linux -- Installing setuptools for Mac OS -- Installing PIP -- Installing PIP for Windows -- Installing PIP for Linux -- Installing PIP for Mac OS -- Installing Django -- Installing Django for Windows -- Installing Django for Linux -- Installing Django for Mac OS -- Starting your project with Django -- Creating an application -- Configuring the application -- Summary -- 3. Hello World! with Django -- Routing in Django -- Regular expressions -- The uninterpreted characters -- The beginning and the end of the line -- The any character regular expression -- Character classes -- Validating the number of characters -- Creating our first URL -- Creating our first view -- Testing our application -- Summary -- 4. Working with Templates -- Displaying Hello world! in a template -- Injecting the data from the view to the template -- Creating dynamic templates -- Integrating variables in templates -- Conditional statements -- Looping in a template -- Using filters.

The upper and lower filters -- The lower filter -- The upper filter -- The capfirst filter -- The pluralize filter -- The escape and safe to avoid XSS filters -- The linebreaks filter -- The truncatechars filter -- Creating DRY URLs -- Extending the templates -- Using static files in templates -- Summary -- 5. Working with Models -- Databases and Django -- Migrations with South -- Installing South -- Using the South extension -- Creating simple models -- The UserProfile model -- The Project model -- The relationship between the models -- Creating the task model with relationships -- Extending models -- The admin module -- Installing the module -- Using the module -- Advanced usage of models -- Using two relationships for the same model -- Defining the str method -- Summary -- 6. Getting a Model's Data with Querysets -- The persisting model's data on the database -- Filling a model and saving it in the database -- Getting data from the database -- Getting multiple records -- Getting only one record -- Getting a model instance from the queryset instance -- Using the get parameter -- Saving the foreign key -- Updating records in the database -- Updating a model instance -- Updating multiple records -- Deleting a record -- Getting linked records -- Advanced usage of the queryset -- Using an OR operator in a queryset -- Using the lower and greater than lookups -- Performing an exclude query -- Making a raw SQL query -- Summary -- 7. Working with Django Forms -- Adding a developer without using Django forms -- Template of an HTML form -- The view using the POST data reception -- Adding a developer with Django forms -- CSRF protection -- The view with a Django form -- Template of a Django form -- The form based on a model -- The supervisor creation form -- Advanced usage of Django forms -- Extending the validation form -- Customizing the display of errors.

Using widgets -- Setting initial data in a form -- When instantiating the form -- When defining fields -- Summary -- 8. Raising Your Productivity with CBV -- The CreateView CBV -- An example of minimalist usage -- Working with ListView -- An example of minimalist usage -- Extending ListView -- The DetailView CBV -- An example of minimalist usage -- Extending DetailView -- The UpdateView CBV -- An example of minimalist usage -- Extending the UpdateView CBV -- The DeleteView CBV -- Going further by extending the CBV -- Using a custom class CBV update -- Summary -- 9. Using Sessions -- Creating and getting session variables -- An example - showing the last task consulted -- About session security -- Summary -- 10. The Authentication Module -- How to use the authentication module -- Configuring the Django application -- Editing the UserProfile model -- Adding a user -- Login and logout pages -- Restricting access to the connected members -- Restricting access to views -- Restricting access to URLs -- Summary -- 11. Using AJAX with Django -- Working with jQuery -- jQuery basics -- CSS selectors in jQuery -- Getting back the HTML content -- Setting HTML content in an element -- Looping elements -- Importing the jQuery library -- Working with AJAX in the task manager -- Summary -- 12. Production with Django -- Completing the development -- Selecting the physical server -- Selecting the server software -- Selecting the server database -- Deploying the Django website -- Installing PIP and Python 3 -- Installing PostgreSQL -- Installing virtualenv and creating a virtual environment -- Installing Django, South, Gunicorn, and psycopg2 -- Configuring PostgreSQL -- Adaptation of Work_manager to production -- Initial South migration -- Using Gunicorn -- Starting Nginx -- Summary -- A. Cheatsheet -- The field types in models -- The numerical field type.

The string field type -- The temporal field type -- Other types of fields -- Relationship between models -- The model meta attributes -- Options common to all fields of models -- The form fields -- Common options for the form fields -- The widget form -- Error messages (forms and models) -- The template language -- Template tags -- Loops in dictionaries -- Conditional statements -- The template filters -- The queryset methods -- Index.
Özet:
This book features a step-by-step approach that shows you how to program, create, and improve the quality of web applications using Django, with the help of Python. This is an ideal book for developers who want to improve the quality and maintenance of their web application, and who already have knowledge of Python and web development.
Notlar:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Elektronik Erişim:
Click to View
Ayırtma: Copies: