hi florian -

Florian Lindner wrote:
> I have the site xgm.de with a blog, an abbreviation database and some static 
> pages.
> How would a organize such a site with Django?
> Create an app for the blog, an app for the DB and the static pages as 
> templates of the project?

you really have a lot of flexibility & you can search this group for
prior discussions of a general django project layout, but here are my
thoughts ;).

you might consider contrib.flatpages for the static pages in your project.

http://www.djangoproject.com/documentation/flatpages/

also i find myself using direct_to_template a lot to as a shortcut to
build simple views:

# yourproject/urls.py
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from myapp.models import News, Sidebar

urlpatterns = patterns('',
(r'^$', direct_to_template, {'template': 'frontpage.html',
'extra_context': {'news': News.objects.all, 'sidebars':
Sidebar.objects.all } }),

(r'blog/$', include('blog.urls')),
)

or something like that.  more about direct_to_template here:
http://www.djangoproject.com/documentation/generic_views/

best
jake

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to