James Bennett978-1-4302-1939-2
application development and flexible, reusable code—through both the tools it provides
to you directly and the development practices that it makes possible. I’ll guide you
through the development of several example applications and show you how the various
components and applications bundled with Django can help you write less code at each
stage of the development process. You’ll also see first-hand a number of best practices for
reusable code and learn how you can apply them in your own applications. Plus, you’ll
learn how to integrate existing third-party libraries into Django-powered applications to
minimize the amount of code you’ll need to write from scratch.
Table of contents :
Prelims
……Page 1
Contents at a Glance……Page 5
Contents……Page 7
About the Author……Page 13
About the Technical Reviewer……Page 15
Introduction……Page 17
What’s a Web Framework and Why Should I Want One?……Page 19
Saying Hello to Django……Page 20
Saying Hello to Python……Page 21
Installing Django……Page 22
taking your First Steps with Django……Page 23
exploring your Django Project……Page 25
Looking Ahead……Page 26
Configuring Your First Django Project……Page 27
Putting together the Cms……Page 30
introducing the Django template system……Page 36
Looking Ahead……Page 40
Adding Rich-Text Editing……Page 41
Adding a search system to the cms……Page 44
improving the search view……Page 49
improving the search Function with keywords……Page 51
looking Ahead……Page 58
Compiling a Feature Checklist……Page 61
Writing a Django Application……Page 62
Creating the Weblog Application……Page 63
Designing the models……Page 65
Building the entry model……Page 70
The Weblog models So Far……Page 80
Writing the First views……Page 83
using Django’s generic views……Page 87
Decoupling the urls……Page 90
looking Ahead……Page 93
Model……Page 95
Model……Page 101
Setting up Views for categories……Page 102
using generic Views (Again)……Page 104
Views for tags……Page 105
cleaning up the urlconf Module……Page 106
handling live entries……Page 111
looking Ahead……Page 113
Dealing with Repetitive Elements: The Power of Inheritance……Page 115
Defining the Base Template for the Blog……Page 118
Setting Up Section Templates……Page 121
Displaying Archives of Entries……Page 122
Defining Templates for Other Types of Content……Page 128
Extending the Template System with Custom Tags……Page 129
looking Ahead……Page 140
Implementing Model Inheritance and Abstract Models……Page 141
Moderating Comments……Page 147
Adding feeds……Page 158
looking Ahead……Page 165
Compiling a Feature Checklist……Page 167
Building the Initial Models……Page 168
Building Initial Views for Snippets and Languages……Page 174
Looking Ahead……Page 181
A Brief Tour of Django’s Form System……Page 183
Writing a Form for Adding code Snippets……Page 192
Automatically generating the Form from a model Definition……Page 197
Simplifying Templates That Display Forms……Page 200
editing Snippets……Page 201
looking Ahead……Page 204
Bookmarking Snippets……Page 205
Adding Basic Bookmark Views……Page 206
creating a new template tag:……Page 209
to Automatically populate template Variables……Page 214
Adding the user rating System……Page 216
Looking Ahead……Page 220
Using Version-Control Systems to Track Your Code……Page 223
Using Isolated Python Environments to Manage Software……Page 227
Using Build Tools……Page 230
Using a Deployment Tool……Page 232
Simplifying Your Django Development Process……Page 233
Looking Ahead……Page 240
Writing reusable Django applications……Page 241
One Thing at a Time……Page 242
Developing Multiple Applications……Page 244
Building for Flexibility……Page 246
Distributing Django Applications……Page 252
looking Ahead……Page 259
Index……Page 261
Reviews
There are no reviews yet.