Django For Beginners: Learn Web Development With Django 2.0

E-Book Overview

Django for Beginners takes you from total beginner to confident Django developer. Proceed step-by-step through five progressively more complex web applications: from a "Hello World" app all the way to a robust Newspaper app with a custom user model, complete user authentication flow, foreign key relationships, and more. Learn current best practices around class-based views, templates, urls, user authentication, testing, and deployment. The material is up-to-date with the latest versions of both Django (2.0) and Python (3.6). TABLE OF CONTENTS: * Introduction * Chapter 1: Initial Setup * Chapter 2: Hello World app * Chapter 3: Pages app * Chapter 4: Message Board app * Chapter 5: Blog app * Chapter 6: Forms * Chapter 7: User Accounts * Chapter 8: Custom User Model * Chapter 9: User Authentication * Chapter 10: Bootstrap * Chapter 11: Password Change and Reset * Chapter 12: Email * Chapter 13: Newspaper app * Chapter 14: Permissions and Authorizations * Chapter 15: Comments * Conclusion

E-Book Content

Django for Beginners Learn web development with Django 2.0 William S. Vincent © 2018 William S. Vincent Contents Introduction Why Django Why this book Book Structure Book layout Conclusion 1 1 3 3 5 7 Chapter 1: Initial Setup The Command Line Install Python 3 on Mac OS X Install Python 3 on Windows Install Python 3 on Linux Virtual Environments Install Django Install Git Text Editors Conclusion 8 8 11 13 14 15 16 20 21 21 Chapter 2: Hello World app Initial Setup Create an app Views and URLConfs Hello, world! Git Bitbucket Conclusion 22 22 25 27 30 31 33 37 Chapter 3: Pages app Initial Setup Templates Class-Based Views URLs Add an About Page 39 39 41 44 45 47 CONTENTS Extending Templates Tests Git and Bitbucket Local vs Production Heroku Additional Files Deploy Conclusion Chapter 4: Message Board app Initial Setup Create a database model Activating models Django Admin Views/Templates/URLs Adding new posts Tests Bitbucket Heroku configuration Heroku deployment Conclusion 49 52 54 56 57 58 61 64 65 65 68 69 70 77 81 85 90 91 93 95 Chapter 5: Blog app Initial Setup Database Models Admin URLs Views Templates Static files Individual blog pages Tests Git Conclusion 96 96 98 100 105 107 108 111 116 122 125 125 Chapter 6: Forms Forms Update Form Delete View Tests Conclusion 127 127 138 145 151 155 Chapter 7: User Accounts 156 CONTENTS Login Updated homepage Logout link Signup Bitbucket Heroku config Heroku deployment Conclusion 156 159 161 164 170 171 173 177 Chapter 8: Custom User Model Setup Custom User Model Forms Superuser Conclusion 178 178 180 182 185 187 Chapter 9: User Authentication Templates URLs Admin Conclusion 188 188 192 197 203 Chapter 10: Bootstrap Pages app Tests Bootstrap Signup Form Next Steps 204 204 208 211 219 224 Chapter 11: Password Change and Reset Password Change Customizing password change Password reset Custom Templates Conclusion 226 226 228 231 235 240 Chapter 12: Email SendGrid Custom emails Conclusion 241 241 246 250 Chapter 13: Newspaper app Articles app 251 251 CONTENTS URLs and Views Edit/Delete Create page Conclusion 257 262 268 276 Chapter 14: Permissions and Authorization Improved CreateView Authorizations Mixins Updating views Conclusion 277 277 279 281 283 285 Chapter 15: Comments Model Admin Template Conclusion 286 286 288 295 299 Conclusion Django Resources Python Books Blogs to Follow Feedback 301 302 302 303 303 Introduction Welcome to Django for Beginners, a proje
You might also like

High Performance Data Mining
Authors: Guo , Grossman. (eds.)    167    0


Lectures On Image Processing
Authors: Morse B.S.    115    0


Digital Image Processing: Piks Scientific Inside
Authors: William K. Pratt    123    0


Principles Of Constraint Programming
Authors: Krzysztof Apt    107    0


современный фортран
Authors: Бартеньев О.    189    0


Webster's New World Telecom Dictionary
Authors: Ray Horak    129    0


A Handbook Of Statistical Analyses Using R
Authors: Brian S. Everitt , Torsten Hothorn    93    0


Introduction To Robust Estimation And Hypothesis Testing
Authors: Rand R. Wilcox    77    0


More Math Into Latex
Authors: George Grätzer    84    0


Adobe Photoshop Elements 3.0 A-z
Authors: Philip Andrews    111    0