|
Utterly Unblemished URL'sBog'liq CCCDjango2010Utterly Unblemished URL's
Example urls.py:
http://example.com/articles/2009/03/14
will result
in
news.views.article_detail(request, year='2009',
month='03', day='14')
being called
urlpatterns = patterns('',
(r'^articles/2003/$', 'news.views.special_case_2003'),
(r'^articles/(?P\d{4})/$', 'news.views.year_archive'),
(r'^articles/(?P\d{4})/(?P\d{2})/$', 'news.views.month_archive'),
(r'^articles/(?P\d{4})/(?P\d{2})/(?P\d+)/$', 'news.views.article_detail'),
)
Utterly Unblemished URL's
These are mostly like regular expressions, which
are outside of the scope of this class
Admin Interface
Awesome Automatic Admin
“Generating admin sites for your staff or clients to add, change and delete content is
tedious work that doesn’t require much creativity. For that reason, Django entirely
automates creation of admin interfaces for models.
Django was written in a newsroom environment, with a very clear separation between
“content publishers” and the “public” site. Site managers use the system to add
news stories, events, sports scores, etc., and that content is displayed on the public
site. Django solves the problem of creating a unified interface for site
administrators to edit content.
The admin isn’t necessarily intended to be used by site visitors; it’s for site managers.”
Reference: http://docs.djangoproject.com/en/dev/intro/tutorial02/
http://docs.djangoproject.com/en/dev/intro/tutorial02/
|
| |