Leanpub Header

Skip to main content

Getting started with Django 5

Your roadmap to developing web applications in Python with Django begins here

In this book, we are going to learn how the framework is formed, the basic characteristics that Django allows us as the framework par excellence to create CRUD processes, which range from the creation of views, templates, connection to models, routing, form validations, creating middleware among others.

This book is a translation into English of Primeros pasos con Django 5 which was originally written in Spanish

The author is letting you choose the price you pay for this book!

Pick Your Price...
PDF
EPUB
About

About

About the Book

Django is a framework with many options, it allows us to create applications with the language of the moment Python, a modular programming language, with an impeccable syntax that we can also use in a web environment.

It offers us a modular scheme between projects and applications, an important set of packages to extend the already complete framework and with this, the creation of scalable projects.

It is a framework that, by using Python, brings us its benefits of a clean, clear, precise syntax, a modular and scalable environment through packages.

This book is for anyone who wants to start developing with Django; you may come from another framework or even PHP; in both cases, it is a great idea to learn from one of the most advanced and complete web frameworks you can find.

For those who want to know the framework and who know other web frameworks, but do not have the necessary knowledge to venture into these.

For people who want to improve a skill in web development, who want to grow as a developer and who want to keep climbing their way with other frameworks similar to this one.

For those who want to learn or improve a skill and with this, increase their chances of employment or to carry out a personal project.

This book has a total of 18 chapters, it is recommended that you read in the order in which they are arranged and as we explain the components of the framework, go directly to the practice, replicate, test and modify the codes that we show in this book.

  1. Chapter 1: In this chapter we are going to present the software necessary to create projects in Django, Python as a programming language and in which the framework is developed, a code editor such as VSS, until preparing the environment.
  2. Chapter 2: In this chapter we are going to create the virtual environment to develop the application, we will create the project in Django, we will learn about its basic structure and the use of applications and projects in Django.
  3. Chapter 3: In this chapter we will give an introduction to Python, knowing its basic characteristics and functionalities such as variables, data types, functions, classes, among others.
  4. Chapter 4: In this chapter, we are going to create a simple CRUD type application and learn about all the elements of the framework that this implies such as management of forms, templates, views and models, in addition to the management of CSRF tokens, migrations, databases among others.
  5. Chapter 5: In this chapter, we are going to work with Django Admin to provide an interface for managing site content; that is, the typical CRUDs, we will learn how to customize them at the class level, validations, interpret requests, among others.
  6. Chapter 6: In this chapter, we are going to introduce the use of forms in Django, definition, validations, saving and structure in general.
  7. Chapter 7: In this chapter, we are going to present the different functionalities that templates have in Django.
  8. Chapter 8: In this chapter, we are going to introduce some functions that we can use with QuerySets when building queries.
  9. Chapter 9: In this chapter, we are going to build a Rest API with the Django Rest Framework.
  10. Chapter 10: In this chapter, we are going to consume the above Rest Api with an app in Vue 3 and NaiveUI; lists, forms will be created and integrated with Tailwind.css
  11. Chapter 11 : In this chapter, we are going to learn about class-based views by performing the typical operations that are needed in modern web development.
  12. Chapter 12: In this chapter, we are going to learn how to work with files in Django; specifically reading and generating excel and CSV and generating PDFs.
  13. Chapter 13: In this chapter, we are going to show the code of an application created with Alpine.js to create a to do list component.
  14. Chapter 14: In this chapter, we are going to adapt the Alpine.js application presented in the previous chapter, so that it works together with Django.
  15. Chapter 15: In this chapter, we are going to use Django Channels to learn how to create systems with full duplex communication and be able to create our own websockets and consume them, we will see how to create single and multiple channel applications, as well as how to consume a consumer from an app in Vue .
  16. Chapter 16: In this chapter, we are going to create a personalized authentication module with login, registration, recover passwords, sending emails, uploading the avatar among others.
  17. Chapter 17: In this chapter, we are going to learn how to use the signals system to intercept events in Django such as creation of entities in the database and execute custom code.
  18. Chapter 18: In this chapter, we will introduce the use of testing to create automated functions and test different modules of our application.

By the end of the book, you will have the knowledge to create any basic application with the framework and know more than just the basics of it.

Playlist with each of the chapters:

https://www.youtube.com/playlist?list=PLB5SYDBi8M3EQxcHQzgRO3qZuvjJt5QpV

Demo of one of the apps:

https://course-book-django-store-production.up.railway.app

I invite you to visit my website:

desarrollolibre.net

And get to know my work.

Share this book

Categories

This book is a translation into English of Primeros pasos con Django 5 which was originally written in Spanish

Price

Pick Your Price...

Minimum price

$20.00

$40.00

You pay

$40.00

Author earns

$32.00
$

All prices are in US $. You can pay in US $ or in your local currency when you check out.

EU customers: prices exclude VAT, which is added during checkout.

...Or Buy With Credits!

Number of credits (Minimum 2)

2
The author will earn $24.00 from your purchase!
You can get credits monthly with a Reader Membership

Author

About the Author

Andrés Cruz Yoris

Andrés Cruz Yoris, Licenciado en Computación, con más de 10 años de experiencia en el desarrollo de aplicaciones web en general; trabajo con PHP, Python y tecnologías del lado del cliente como HTML, JavaScript, CSS, Vue entre otras; y del lado del servidor como Laravel, Flask, Django y Codeigniter. También desarrollo con Android Studio, xCode y Flutter para la creación de aplicaciones nativas para Android e IOS.

Pongo a tú disposición parte de mi aprendizaje, reflejado en cada una de las palabras que componen mis libros sobre el desarrollo de aplicaciones en general.

Translations

Translations

Languages

Contents

Table of Contents

Getting started with Django 4

Tweet about the book!

About the Author

Copyright

Chapter 1: Required software and installation of tools

  1. Required Software

Chapter 2: Getting started with Django

  1. Packages and best practices when working with Python
  2. Prepare the development environment
  3. Django

Chapter 3: Create a CRUD application

  1. Models
  2. Introduction to migrations
  3. Run the project on a server
  4. Views, templates and routes
  5. Views, templates, routes and forms
  6. Save the data in the database
  7. Create a CRUD process

Chapter 4: Django Admin

  1. Add our own relations
  2. Customize Django Admin
  3. Register classes using a decorator

Chapter 5: Forms

  1. Django ModelForm
  2. Django Forms
  3. Case study
  4. Validations
  5. Reference the fields and labels of the form individually

Chapter 6: Templates: Master Templates, Labels, and Filters

  1. Render dynamic content
  2. tags
  3. Filters

Chapter 7: Working with QuerySets

Chapter 8: Create a Rest API with Django Rest Framework

  1. Create a Rest API in Django
  2. Install
  3. Create application for the Rest API
  4. Django Rest Framework in practice

Chapter 9: Consuming the Rest API with an app in Vue

  1. Prepare the environment
  2. Vue Router
  3. Configure axis
  4. Naive UI, for graphical interface components
  5. Install and configure Tailwind CSS
  6. Fix small details
  7. Bonus: Introduction to overriding the NaiveUI theme
  8. Form component for the type
  9. Form component for the element
  10. CKEditor: Editor for rich content
  11. Navigable menu options
  12. Format of the dates in the rest api
  13. Redirects on nonexistent routes
  14. Visual changes
  15. Multiple router-views

Chapter 10: Class Based Views (CBV)

  1. Create a project and application
  2. Create model, migration and form
  3. Class-Based Views
  4. CRUD-like class-based views
  5. Class-based views for authentication

Chapter 11: Reading Files

  1. Create a project and application
  2. CSV handling
  3. Excel handling (XLSX)
  4. Generate PDF

Chapter 12 : Create an Alpine.js to do list application

Chapter 13 : Integrating Alpine with Django

  1. Create virtual space, project and initial application
  2. Migrate to do list app to Django
  3. Create model and migration for the to do
  4. Create a Rest API for the to do
  5. Install axios

Get the free Community Edition

Enter your name and email address and click the buttons to the right to get the free Community Edition in PDF or EPUB, or just click this link to read a shorter sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub