Cargando…

Django 2 by Example : Build powerful and reliable Python web applications from scratch.

Django is a powerful Python web framework designed to develop web applications quickly. If you want to learn about the entire process of developing professional web applications with Django, then this book is for you. This book will walk you through the creation of four professional Django projects,...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Mele, Antonio
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Publishing, 2018.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Title Page; Copyright and Credits; Dedication; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: Building a Blog Application; Installing Django; Creating an isolated Python environment; Installing Django with pip; Creating your first project; Running the development server; Project settings; Projects and applications; Creating an application; Designing the blog data schema; Activating your application; Creating and applying migrations; Creating an administration site for your models; Creating a superuser; The Django administration site.
  • Adding your models to the administration siteCustomizing the way models are displayed; Working with QuerySet and managers; Creating objects; Updating objects; Retrieving objects; Using the filter() method; Using exclude(); Using order_by(); Deleting objects; When QuerySets are evaluated; Creating model managers; Building list and detail views; Creating list and detail views; Adding URL patterns for your views; Canonical URLs for models; Creating templates for your views; Adding pagination; Using class-based views; Summary; Chapter 2: Enhancing Your Blog with Advanced Features.
  • Sharing posts by emailCreating forms with Django; Handling forms in views; Sending emails with Django; Rendering forms in templates; Creating a comment system; Creating forms from models; Handling ModelForms in views; Adding comments to the post detail template; Adding the tagging functionality; Retrieving posts by similarity; Summary; Chapter 3: Extending Your Blog Application; Creating custom template tags and filters; Creating custom template tags; Creating custom template filters; Adding a sitemap to your site; Creating feeds for your blog posts; Adding full-text search to your blog.
  • Installing PostgreSQLSimple search lookups; Searching against multiple fields; Building a search view; Stemming and ranking results; Weighting queries; Searching with trigram similarity; Other full-text search engines; Summary; Chapter 4: Building a Social Website; Creating a social website project; Starting your social website project; Using the Django authentication framework; Creating a login view; Using Django authentication views; Login and logout views; Changing password views; Resetting password views; User registration and user profiles; User registration; Extending the user model.
  • Using a custom user modelUsing the messages framework; Building a custom authentication backend; Adding social authentication to your site; Authentication using Facebook; Authentication using Twitter; Authentication using Google; Summary; Chapter 5: Sharing Content in Your Website; Creating an image bookmarking website; Building the image model; Creating many-to-many relationships; Registering the image model in the administration site; Posting content from other websites; Cleaning form fields; Overriding the save() method of a ModelForm; Building a bookmarklet with jQuery.