Skip to content

Latest commit

 

History

History
200 lines (152 loc) · 15.8 KB

File metadata and controls

200 lines (152 loc) · 15.8 KB

Stars Badge Forks Badge Pull Requests Badge Issues Badge GitHub contributors Visitors

Don't forget to hit the ⭐ if you like this repo.

E-book

1. Django Project Blueprints

Django is a high-level web framework that eases the creation of complex, database-driven websites. It emphasizes on the reusability and pluggability of components, rapid development, and the principle of don't repeat yourself. It lets you build high-performing, elegant web applications quickly. There are several Django tutorials available online, which take as many shortcuts as possible, but leave you wondering how you can adapt them to your own needs. This guide takes the opposite approach by demonstrating how to work around common problems and client requests, without skipping the important details. If you have built a few Django projects and are on the lookout for a guide to get you past the basics and to solve modern development tasks, this is your book. Seven unique projects will take you through the development process from scratch, leaving no stone unturned. In the first two projects, you will learn everything from adding ranking and voting capabilities to your App to building a multiuser blog platform with a unique twist. The third project tackles APIs with Django and walks us through building a Nagios-inspired infrastructure monitoring system. And that is just the start! The other projects deal with customizing the Django admin to create a CMS for your clients, translating your web applications to multiple languages, and using the Elasticsearch search server with Django to create a high performing e-commerce web site. The seventh chapter includes a surprise usage of Django, and we dive deep into the internals of Django to create something exciting! When you're done, you'll have consistent patterns and techniques that you can build on for many projects to come.

Code Bundle for Django Project Blueprints, published by Packt Publishing, it contains all the code files required to get started with this book from start to finish.

What you need for this Code files:

To create and run all the web applications that we will develop throughout, you will need working copies of the following software:

Related Django products:

Download code

Welcome to Django for Beginners, a project-based approach to learning web development with the Django web framework. In this book you will build five progressively more complex web applications, starting with a simple Hello, World app, progressing to a Pages app, a Message Board app, a Blog app with forms and user accounts, and finally a Newspaper app that uses a custom user model, email integration, foreign keys, authorization, permissions, and more. By the end of this book you should feel confident creating your own Django projects from scratch using current best practices.

Django is a free, open source web framework written in the Python programming language. First released in 2005, Django has been in continuous development since then and today powers many of the largest websites in the world including Instagram, Pinterest, Bitbucket, and Disqus. At the same time, it is flexible enough to be a popular choice for early-stage startups and side projects.

In the book you’ll learn how to:

  • Build 5 websites from scratch, including a Blog and Newspaper
  • Deploy online using security best practices
  • Customize the look and feel of your sites
  • Write tests and run them for all your code
  • Integrate user authentication, email, and custom user models
  • Add permissions and authorizations to make your app more secure

If you’re curious about Python-based web development, Django for Beginners is a best practices guide to writing and deploying your own websites quickly.

Download code

Django 4 by Example, written by Antonio Melé and published by Packt.

About the Book

Django 4 by Example (4th edition) will guide you through the entire process of developing professional web applications with Django. The book not only covers the most relevant aspects of the framework, but it will also teach you how to integrate other popular technologies into your Django projects.

The book will walk you through the creation of four real-world applications, solving common problems, and implementing best practices, using a step-by-step approach that is easy to follow. After reading this book, you will have a good understanding of how Django works and how to build practical, advanced web applications.

Requirements

This book requires Python 3.10+ and Django 4.1.

Django Projects

The book covers a wide range of web app development topics divided into four different Django projects:

  • Blog Application (chapters 1-3): Create a complete blog application

    • Build data models, views, and URLs
    • Implement an administration site for your blog
    • Use canonical URLs for modles and implement SEO-friendly URLs for posts
    • Build post pagination and learn how to create class-based views
    • Use forms to allow readers to share posts via email and implement a comment system using model forms
    • Add tags to posts using django-taggit and recommend similar posts based on shared tags
    • Implement custom template tags to display latest posts and most commented posts
    • Implement a custom template filter to render Markdown
    • Create a sitemap and a RSS feed for your blog
    • Implement a full-text search engine using PostgreSQL
  • Social Website (chapters 4-7): Create a website to bookmark and share images

    • Implement authentication using the Django authentication framework
    • Extend the user model with a custom profile model
    • Use the Diango messages framework
    • Build a custom authentication backend
    • Implement social authentication (OAuth2) with Facebook, Twitter, and Google using Python Social Auth
    • Use django-extensions to run the development server through HTTPS
    • Generate image thumbnails with easy-thumbnails
    • Implement many-to-many relationships in models
    • Build a JavaScript bookmarklet with JavaScript and Django
    • Add asynchronous HTTP requests with the JavaScript Fetch API and Django
    • Implement infinite scroll pagination
    • Build a user follow system
    • Create a user activity stream and optimize QuerySets
    • Learn to use Django signals
    • Use django-debug-toolbar to obtain relevant debug information
    • Count image views with Redis
    • Build an image ranking with Redis
  • Ecommerce Application (chapters 8-11): Create a fully-featured on-line shop

    • Build the models of the product catalog
    • Create a shopping cart using Django sessions
    • Create custom context processors
    • Manage customer orders
    • Send asynchronous notifications using Celery and RabbitMQ
    • Monitory Celery using Flower
    • Integrate Stripe to process payments
    • Implement a webhook to receive payment notifications from Stripe
    • Build custom views in the Django administration site
    • Create admin actions and generate CSV files
    • Generate PDF invoices dynamically using Weasyprint
    • Create a coupon system to apply disconts to orders
    • Integrate discounts with Stripe payments
    • Build a product recommendation engine using Redis
    • Add internationalization to the shop
    • Generate and manage translation files
    • Use Rosetta to manage translations
    • Translate URL patterns and build a language selector
    • Translate models using django-parler
    • Localize forms using django-localflavor
  • eLearning Platform (chapters 12-17): Create an eLearning platform including a CMS

    • Build course models
    • Create and use data fixtures
    • Use model inheritance to create polymorphic Content
    • Create a custom model field to order course contents
    • Implement authentication views
    • Build a content management system using class-based views and mixins
    • Restrict access using groups and permissions
    • Build formsets to manage course contents
    • Create drag-and-drop functionality to reorder content in-place using JavaScript and Django
    • Using generic mixins from django-braces
    • Implement public views and student enrolment views
    • Render different type of contents and use django-embed-video
    • Cache content using the cache framework
    • Use the Memached and Redis cache backends
    • Monitor Redis using django-redisboard
    • Build an API using Django REST Framework
    • Create serializers for models and custom API views
    • Handle API authentication and permissions
    • Build API viewsets and routers
    • Consume your API using Python requests
    • Create a real-time chat server using Django Channels
    • Implement a WebSocket consumer/client using Django and JavaScript
    • Use Redis to set up a channel layer
    • Make your WebSocket fully-asynchronous
    • Create settings for multiple environments
    • Configure a production environment using Docker Compose with PostgreSQL, Redis, Nginx, uWSGI and Daphne
    • Serve your project securely through HTTPS
    • Use the Django system check framework
    • Build a custom middleware
    • Create custom management commands

Source Code

4. Python Crash Course, 3rd Edition

A Hands-On, Project-Based Introduction to Programming
by Eric Matthes. December 2022, 552 pp.

Python Crash Course is the world’s best-selling guide to the Python programming language. This fast-paced, thorough introduction will have you writing programs, solving problems, and developing functioning applications in no time.

You’ll start by learning basic programming concepts, such as variables, lists, classes, and loops, and practice writing clean code with exercises for each topic. You’ll also learn how to make your programs interactive and test your code safely before adding it to a project. You’ll put your new knowledge into practice by creating a Space Invaders–inspired arcade game, building a set of data visualizations with Python’s handy libraries, and deploying a simple application online.

As you work through the book, you’ll learn how to:

  • Use powerful Python libraries and tools, including pytest, Pygame, Matplotlib, Plotly, and Django
  • Make increasingly complex 2D games that respond to keypresses and mouse clicks
  • Generate interactive data visualizations using a variety of datasets
  • Build apps that allow users to create accounts and manage their own data, and deploy your apps online
  • Troubleshoot coding errors and solve common programming problems

New to this edition: This third edition is completely revised to reflect the latest in Python code. New and updated coverage includes VS Code for text editing, the pathlib module for file handling, pytest for testing your code, as well as the latest features of Matplotlib, Plotly, and Django.

If you’ve been thinking about digging into programming, Python Crash Course will provide you with the skills to write real programs fast. Why wait any longer? Start your engines and code!

Download code

Contribution 🛠️

Please create an Issue for any improvements, suggestions or errors in the content.

You can also contact me using Linkedin for any other queries or feedback.

Visitors