On 4/4/07, Joshua <[EMAIL PROTECTED]> wrote: > The specific task I have in front of me is to build a CMS that can be > customized for different sites and different "views" (templates) while > allowing a CMS admin user to add pages to a site - much like the > radiantCMS built with Rails (http://radiantcms.org/). However, unlike > radiant, I don't want to have to use ANOTHER template language (other > than the one provided with Django) to build my views.
The important thing to remember here is the concept of a "project" in Django; each project, even if all of them share a single database, has its own settings file, and this is the key. In each settings file you can specify the TEMPLATE_DIRS setting, which tells Django where to look for templates; this means that, for example, you can have several sites which each have the same INSTALLED_APPS setting and the same URL configuration, but use completely different sets of templates to render their output. In fact, this is largely what we do at World Online: our sites share a database and use the same sets of applications, but each uses its own template set and so has its own distinct look and feel. For example: http://www.lawrence.com/news/2007/apr/02/serving_silence/ http://www2.ljworld.com/news/2007/apr/04/man_rescued_plymouth_church_spire/ Note the similarity in the URLs -- both follow the same pattern of "/news/<year>/<month>/<day>/<slug>/", and both end up at the same view function in the same application, but the different TEMPLATE_DIRS settings for the two sites mean that the output can look drastically different. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---