Practical Django Projects
✍ Scribed by James Bennett
- Publisher
- Apress
- Year
- 2008
- Tongue
- English
- Leaves
- 257
- Series
- Pratical Projects
- Edition
- 1
- Category
- Library
No coin nor oath required. For personal study only.
✦ Synopsis
Build a django content management system, blog, and social networking site with James Bennett as he introduces the popular Django framework. You’ll work through the development of each project, implementing and running the applications while learning new features along the way.
Web frameworks are playing a major role in the creation of today’s most compelling web applications, because they automate many of the tedious tasks, allowing developers to instead focus on providing users with creative and powerful features. Python developers have been particularly fortunate in this area, having been able to take advantage of Django, a very popular open source web framework whose stated goal is to “make it easier to build better web applications more quickly with less code.”
Practical Django Projects is the first book to introduce this popular framework by way of a series of real–world projects.
What you’ll learn
- Capitalize upon Django’s well–defined framework architecture to build web applications faster than ever before.
- Learn by doing by working through the creation of three real–world projects, including a content management system, blog, and social networking site.
- Build user–friendly web sites with well–structured URLs, session tracking, and syndication options.
- Let Django handle tedious tasks such as database interaction while you focus on building compelling applications.
Who is this book for?
Web developers seeking to use the powerful Django framework to build powerful web sites.
✦ Table of Contents
Practical Django Projects......Page 1
Contents at a Glance......Page 7
Contents......Page 9
About the Author......Page 15
About the Technical Reviewer......Page 17
Introduction......Page 19
What’s a Web Framework and Why Should I Want One?......Page 21
Say Hello to Django......Page 22
Say Hello to Python......Page 23
Installing Django......Page 24
Your First Steps with Django......Page 25
Exploring Your Django Project......Page 27
Looking Ahead......Page 28
Configuring Your First Django Project......Page 29
Putting Together the CMS......Page 32
A Quick Introduction to the Django Template System......Page 38
Looking Ahead......Page 41
Adding Rich-Text Editing......Page 43
Adding a Search System to the CMS......Page 46
Improving the Search View......Page 51
Improving the Search Function with Keywords......Page 53
Looking Ahead......Page 60
Feature Checklist......Page 63
Projects vs. Applications......Page 64
Creating the Weblog Application......Page 65
Designing the Models......Page 67
The Entry Model......Page 72
Basic Fields......Page 73
Slugs, Useful Defaults, and Uniqueness Constraints......Page 74
Authors, Comments, and Featured Entries......Page 75
Different Types of Entries......Page 76
Categorizing and Tagging Entries......Page 78
Writing Entries Without Writing HTML......Page 79
Finishing Touches......Page 81
The Weblog Models So Far......Page 82
Writing the First Views......Page 85
Using Django's Generic Views......Page 89
How Did Django Do That?......Page 90
Decoupling the URLs......Page 92
Looking Ahead......Page 95
Model......Page 97
Model......Page 103
Setting Up Views for Categories......Page 104
Using Generic Views (Again)......Page 106
Views for Tags......Page 107
Cleaning Up the URLConf......Page 109
Handling Live Entries......Page 113
Looking Ahead......Page 115
Dealing with Repetitive Elements: The Power of Inheritance......Page 117
How Template Inheritance Works......Page 119
Defining the Base Template for the Blog......Page 120
Section Templates......Page 123
Entry Index......Page 124
Yearly Archive......Page 125
Monthly and Daily Archives......Page 126
Entry Detail......Page 127
Templates for Other Types of Content......Page 130
Extending the Template System with Custom Tags......Page 131
How a Django Template Works......Page 132
Writing the Node......Page 133
Using the New Tag......Page 134
Writing the Compilation Function......Page 136
Determining the Model to Retrieve Content From......Page 137
Writing the......Page 139
Registering and Using the New Tag......Page 140
Looking Ahead......Page 142
Installing the Comments Application......Page 143
Basic Setup......Page 144
Retrieving Lists of Comments for Display......Page 148
Comment Moderation......Page 149
Signals and the Django Dispatcher......Page 150
Building the Automatic Comment Moderator......Page 151
Adding Akismet Support......Page 152
E-mail Notification of Comments......Page 155
Dealing with Moderated Comments in Public-Facing Templates......Page 157
Adding Feeds......Page 158
Entries by Category: A More Complex Feed Example......Page 162
Looking Ahead......Page 166
Feature Checklist......Page 167
Building the Initial Models......Page 168
Model......Page 169
Model......Page 171
Testing the Snippets Application......Page 174
Initial Views for Snippets and Languages......Page 175
Syntax Highlighting......Page 176
Views for Languages......Page 177
An Advanced View: Top Authors......Page 178
Improving the View of Top Authors......Page 179
View......Page 182
Looking Ahead......Page 183
A Brief Tour of Django’s Form System......Page 185
A Simple Example......Page 186
Validating the Username......Page 188
Creating the New User......Page 189
How Form Validation Works......Page 191
Processing the Form......Page 193
A Form for Adding Code Snippets......Page 195
Writing a View to Process the Form......Page 198
Automatically Generating a Form for Adding Snippets......Page 200
Simplifying Templates That Display Forms......Page 203
Editing Snippets......Page 204
Looking Ahead......Page 206
Bookmarking Snippets......Page 207
Basic Bookmark Views......Page 208
A New Template Tag:......Page 212
Parsing Ahead in a Django Template......Page 213
Resolving Variables Inside a Template......Page 214
to Automatically Populate Template Variables......Page 216
Adding the User Rating System......Page 218
Rating Snippets......Page 221
Template Tag......Page 222
Retrieving a User’s Rating......Page 223
Looking Ahead......Page 224
Writing Reusable Django Applications......Page 225
Staying Focused......Page 226
Advantages of Tightly Focused Applications......Page 227
Developing Multiple Applications......Page 228
Drawing the Lines Between Applications......Page 229
Building for Flexibility......Page 230
Flexible Form Handling......Page 231
Flexible Template Handling......Page 232
Flexible Post-Form Processing......Page 233
Flexible URL Handling......Page 234
Staying Generic......Page 235
Python Packaging Tools......Page 237
Script with......Page 238
Standard Files to Include in a Package......Page 239
Documenting an Application......Page 240
Documentation Displayed Within Django......Page 241
What to Document......Page 242
Looking Ahead......Page 244
Index......Page 245
📜 SIMILAR VOLUMES
In my experience, the purpose of this book is extremely unusual in programming books. Most of them are either an introduction to the topic, or a reference book like a 'cookbook' or what basically amounts to a printed version of the online documentation. Those books get the job done for people with a
<p>Build a django content management system, blog, and social networking site with <strong>James Bennett</strong> as he introduces version 1.1 of the popular Django framework. </p> <p>You’ll work through the development of each project, implementing and running the applications while learning new fe
<p>Build a Django content management system, blog, and social networking site with <strong>James Bennett</strong> as he introduces the popular Django framework. You’ll work through the development of each project, implementing and running the applications while learning new features along the way. <
Build a Django content management system, blog, and social networking site with James Bennett as he introduces the popular Django framework. You'll work through the development of each project, implementing and running the applications while learning new features along the way.<br /><br />Web framew
<p> Build a django content management system, blog, and social networking site with <strong>James Bennett</strong> as he introduces version 1.1 of the popular Django framework. </p> <p> You’ll work through the development of each project, implementing and running the applications while learning n