Skip to content

πŸ“š Django BOOK: Practical recipes for building fast, robust, and secure web apps using Django 3 and Python

Notifications You must be signed in to change notification settings

Khayratdinov/Django-cookbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

76 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Django BOOK: Practical recipes for building fast, robust, and secure web apps using Django 3 and Python

DEMO


01. Getting Started with Django 3.0

  • Working with a virtual environment βœ…
  • Creating a project file structure βœ…
  • Handling project dependencies with pip βœ…
  • Configuring settings for development, testing, staging, and production environments βœ…
  • Defining relative paths in the settings βœ…
  • Handling sensitive settings βœ…
  • Including external dependencies in your project βœ…
  • Setting up STATIC_URL dynamically βœ…
  • Setting UTF-8 as the default encoding for the MySQL configuration βœ…
  • Creating the Git ignore file βœ…
  • Deleting Python-compiled files βœ…
  • Respecting the import order in Python files βœ…
  • Creating an app configuration βœ…
  • Defining overwritable app settings βœ…
  • Working with Docker containers for Django, Gunicorn, Nginx, and PostgreSQL βœ…

02. Models and Database Structure

  • Using model mixins βœ…
  • Creating a model mixin with URL-related methods βœ…
  • Creating a model mixin to handle creation and modification dates βœ…
  • Creating a model mixin to take care of meta tags βœ…
  • Creating a model mixin to handle generic relations βœ…
  • Handling multilingual fields βœ…
  • Working with model translation tables βœ…
  • Avoiding circular dependencies βœ…
  • Adding database constraints βœ…
  • Using migrations βœ…
  • Changing a foreign key to the many-to-many field βœ…

Chapter 3: Forms and Views Demo

In this chapter, we will cover the following topics:

  • Creating an app with CRUDL functions βœ…
  • Saving the author of a model instance βœ…
  • Uploading images βœ…
  • Creating a form layout with custom templates βœ…
  • Creating a form layout with django-crispy-forms βœ…
  • Working with formsets βœ…
  • Filtering object lists βœ…
  • Managing paginated lists βœ…
  • Composing class-based views βœ…
  • Providing Open Graph and Twitter Card data βœ…
  • Providing schema.org vocabularies βœ…
  • Generating PDF documents βœ…
  • Implementing a multilingual search with Haystack and Whoosh βœ…
  • Implementing a multilingual search with Elasticsearch DSL βœ…

Chapter 4: Templates and JavaScript Demo

In this chapter, we will cover the following topics:

  • Arranging the base.html template βœ…
  • Using Django Sekizai βœ…
  • Exposing settings in JavaScript βœ…
  • Using HTML5 data attributes βœ…
  • Providing responsive images(env)$ python manage.py migrate ideas zero βœ…
  • Implementing a continuous scrolling βœ…
  • Opening object details in a modal dialog βœ…
  • Implementing the Like widget βœ…
  • Uploading images via Ajax βœ…

Chapter 5: Custom Template Filters and Tags Demo

In this chapter, we will cover the following recipes:

  • Following conventions for your own template filters and tags βœ…
  • Creating a template filter to show how many days have passed since a post was published βœ…
  • Creating a template filter to extract the first media object βœ…
  • Creating a template filter to humanize URLs βœ…
  • Creating a template tag to include a template, if it exists βœ…
  • Creating a template tag to load a QuerySet in a template βœ…
  • Creating a template tag to parse content as a template βœ…
  • Creating template tags to modify request query parameters βœ…

Chapter 6: Model Administration Demo

In this chapter, we will cover the following topics:

  • Customizing columns on the change list page βœ…
  • Creating sortable inlines βœ…
  • Creating admin actions βœ…
  • Developing change list filters βœ…
  • Changing the app label of a third-party app βœ…
  • Creating a custom accounts app βœ…
  • Getting user Gravatars βœ…
  • Inserting a map into a change form βœ…

About

πŸ“š Django BOOK: Practical recipes for building fast, robust, and secure web apps using Django 3 and Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published