On 10/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Django's database-centric approach seems to make certain kinds of > mostly-static sites harder to build. For example, most of what I want > to put on my site is probably going to come from RestructuredText > source, but that source isn't going to change in response to user > interaction. Yes, I could set up a ReST_page model and store the text > in the database, but that has some real disadvantages as compared with > keeping the content in my SVN repository along with the rest of the > code, css, images, and other elements that are not going to be changed > by user interaction: it gets harder to keep track of what I've done to > the site, test changes on a beta site before they go live, etc. I > need a clean separation between the data that is changed by > interacting with apps and data that isn't. > > Yes, Django is a framework, so I could build components that make this > possible, but it seems to me that it should be a fundamental, built-in > part of the system. Has anyone already addressed these issues?
I've done a site using Apache 2.0 plus mod_python and mod_rewrite such that most of the site (particularly the root) goes into Plone (via mod_rewrite with proxying) but selected top-level directories are either short-circuited out into local files or else directed into other things like Trac or Django, i.e. <LocationMatch "^/(foo|bar|baz)/"> SetHandler python-program PythonPath "['/usr/local/lib/django'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE MYAPP.settings </LocationMatch> You may only need the above section, but I have some rewrite rules after this: RewriteRule ^/(foo|bar|baz)/ - [L] RewriteRule ^/(.*) http://localhost:8001/VirtualHostBase/http/sitename:80/VirtualHostRoot/$1 [P,L] The first rule prevents any further rewriting on directories that should be handled by Django via mod_python. The second rule proxies everything else to a local Zope server. You can either take the approach that only a few directories get sent to Django and the rest are local static files, or else say that just a few are static files and everything else is handled by Django, depending on your site layout. -- This message has been scanned for memes and dangerous content by MindScanner, and is believed to be unclean. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---