Django for Beginners: Build Websites with Python and Django

Django for Beginners: Build Websites with Python and Django

Django for Beginners: Build Websites with Python and Django
Автор: Vincent William S.
Дата выхода: 2022
Издательство: Lean Publishing
Количество страниц: 306
Размер файла: 2.2 MB
Тип файла: PDF
Добавил: codelibs
 Проверить на вирусы  Дополнительные материалы 

Table of Contents....4

Introduction....10

Why Django....10

Why This Book....11

Prerequisites....12

Book Structure....12

Book Layout....13

Advice on Getting Stuck....14

Community....15

Conclusion....15

Chapter 1: Initial Set Up....16

The Command Line....16

Shell Commands....18

Install Python 3 on Windows....21

Install Python 3 on Mac....22

Python Interactive Mode....23

Virtual Environments....23

Install Django....26

First Django Project....28

Text Editors....31

Install Git....32

Conclusion....34

Chapter 2: Hello World App....35

Initial Set Up....35

HTTP Request/Response Cycle....41

Model-View-Controller vs Model-View-Template....42

Create An App....43

Hello, World....45

Git....49

GitHub....51

SSH Keys....52

Conclusion....53

Chapter 3: Pages App....54

Initial Set Up....54

Templates....57

Class-Based Views....58

URLs....59

About Page....60

Extending Templates....62

Tests....64

Git and GitHub....69

Local vs Production....71

Heroku....71

Deployment Checklist....73

Conclusion....78

Chapter 4: Message Board App....79

Initial Set Up....79

Create a Database Model....82

Activating models....83

Django Admin....84

Views/Templates/URLs....89

Adding New Posts....92

Tests....93

GitHub....97

Heroku Configuration....98

Heroku Deployment....99

Conclusion....100

Chapter 5: Blog App....101

Initial Set Up....101

Database Models....103

Admin....105

URLs....109

Views....110

Templates....111

Static Files....113

Individual Blog Pages....118

Tests....122

Git....126

Conclusion....127

Chapter 6: Forms....128

CreateView....128

UpdateView....133

DeleteView....138

Tests....143

Conclusion....145

Chapter 7: User Accounts....146

Log In....146

Updated Homepage....149

Log Out Link....150

Sign Up....153

Sign Up Link....157

GitHub....159

Static Files....160

Heroku Config....163

Heroku Deployment....164

SQLite vs PostgreSQL....165

Conclusion....166

Chapter 8: Custom User Model....167

Initial Set Up....167

Custom User Model....168

Forms....170

Superuser....173

Conclusion....177

Chapter 9: User Authentication....178

Templates....178

URLs....181

Admin....185

Tests....190

Conclusion....192

Chapter 10: Bootstrap....193

Pages App....193

Tests....196

Testing Philosophy....197

Bootstrap....197

Sign Up Form....202

Conclusion....207

Chapter 11: Password Change and Reset....208

Password Change....208

Customizing Password Change....209

Password Reset....212

Custom Templates....215

Try It Out....219

Conclusion....221

Chapter 12: Email....222

SendGrid....222

Custom Emails....229

Conclusion....231

Chapter 13: Newspaper App....232

Articles App....232

URLs and Views....236

Detail/Edit/Delete....239

Create Page....246

Conclusion....251

Chapter 14: Permissions and Authorization....252

Improved CreateView....252

Authorizations....254

Mixins....256

LoginRequiredMixin....258

UpdateView and DeleteView....260

Conclusion....262

Chapter 15: Comments....263

Model....263

Admin....264

Template....272

Comment Form....277

Comment View....278

Comment Template....279

Comment Post View....281

Conclusion....286

Chapter 16: Deployment....287

Environment Variables....288

DEBUG & ALLOWED HOSTS....290

SECRET_KEY....293

DATABASES....294

Static Files....296

Deployment Checklist....298

GitHub....300

Heroku Deployment....300

Conclusion....303

Conclusion....304

Next Steps....304

3rd Party Packages....305

Learning Resources....305

Python Books....306

Feedback....306

Django for Beginners is a project-based introduction to Django, the popular Python-based web framework. Suitable for total beginners who have never built a website before as well as professional programmers looking for a fast-paced guide to modern web development and Django fundamentals.

In the book you’ll learn how to:

  • Build 5 websites from scratch, including a Blog and Newspaper website
  • 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
  • Identify common mistakes and errors so you can build your own websites

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.


Похожее:

Список отзывов:

Нет отзывов к книге.