Practical Django Projects (Expert's Voice in Web Development)
James Bennett
Language: English
Pages: 272
ISBN: 1430219386
Format: PDF / Kindle (mobi) / ePub
Build a Django content management system, blog, and social networking site with James Bennett as he introduces version 1.1 of 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 introduces this popular framework by way of a series of real–world projects. Readers follow along with the development of each project, implementing and running each application while learning new features along the way. This edition is updated for Django 1.1 and includes an all-new chapter covering practical development tools and techniques you'll be able to apply to your own development workflow.
What you’ll learn
- Capitalize upon the well–defined and stable framework architecture of Django 1.1 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 this book is for
Web developers seeking to use the powerful Django framework to build powerful web sites.
Table of Contents
- Welcome to Django
- Your First Django Site: A Simple CMS
- Customizing the Simple CMS
- A Django-Powered Weblog
- Expanding the Weblog
- Templates for the Weblog
- Finishing the Weblog
- A Social Code-Sharing Site
- Form Processing in the Code-Sharing Application
- Finishing the Code-Sharing Applications
- Practical Development Techniques
- Writing Reusable Django Applications
Web, Graphics & Perl TK: Best of the Perl Journal
FrontPage 2003 All-in-One Desk Reference For Dummies
time you open up a command line (although you might also need to add it to a *odn_ or *^]odn_ file). On Windows, the setup is a bit more involved. This is largely because Windows, unlike UNIX-based systems, isn’t as friendly to command-line–based programs. In the Control Panel’s System area, under the Advanced tab, you can set environment variables. The LUPDKJL=PD variable should already be set up with the initial value that Python provided, and you can add new directories to it (directories in
ik`aho*lu file so it’ll be easier to understand and edit later on. I’ve mentioned previously that Python has an official style guide. It’s a good idea to follow that whenever you’re writing Python code because it will make your code clearer and more understandable to anyone who needs to read it (including you). There’s also a (much shorter) style guide for Django, which also provides some useful conventions for keeping your code readable. The guideline for model classes is to lay them out in this
#]n_dera[ej`at#(hejg[ejbk[`e_p( #_khpn]ja[hejg[]n_dera[ej`at#%( $n#Zhejgo+$;L8ua]n:X`w0y%+ #( #]n_dera[ua]n#(hejg[ejbk[`e_p( #_khpn]ja[hejg[]n_dera[ua]n#%( $n#Zhejgo+$;L8ua]n:X`w0y%+$;L8ikjpd:Xsw/y%+ #( #]n_dera[ikjpd#(hejg[ejbk[`e_p( #_khpn]ja[hejg[]n_dera[ikjpd#%( $n#Zhejgo+$;L8ua]n:X`w0y%+$;L8ikjpd:Xsw/y%+$;L8`]u:X`w.y%+ #( #]n_dera[`]u#(hejg[ejbk[`e_p( #_khpn]ja[hejg[]n_dera[`]u#%(
qnhl]ppanjo. Because the end result is JUST AN ORDINARY 0YTHON LIST YOU CAN CONTINUE WORKING WITH IT )N THIS CASE YOURE GOING TO TAKE ADVANTAGE OF THE FACT THAT YOU CAN ADD TOGETHER 0YTHON LISTS USING THE PLUS SIGN ') operator. You simply call l]ppanjo$% a second time and add the result onto the qnhl]ppanjo variable you ALREADY HAVE (OWEVER THIS TIME YOULL USE A DIFFERENT PREFIX _khpn]ja*reaso. 3O ADD THE FOLLOWING code at the bottom of qnho*lu (you’re actually using '9 instead of just
H]jcq]ca objects and fill in some Ojellapo: For a list of the languages luciajpo supports, and the language codes for the lexers, read luciajpo’ lexer documentation online at dppl6++luciajpo*knc+`k_o+hatano+. In the next chapter, you’ll see how to set up public-facing views that let ordinary users submit snippets without having to use the admin interface. Building Initial Views for Snippets and Languages As you wrote the weblog application, you relied heavily on Django’s generic views to provide