On 11/15/06, jefurii <[EMAIL PROTECTED]> wrote:
>
> This may be more of an Apache question, but is it possible to hide
> certain directories from Django, and have them be served either as
> static HTML or as PHP?
>
> I'm refactoring a site and while I'd love to have it be pure Django,
> there are several PHP components (a wiki and a bulletin board) that
> need to be kept as they are, with their current URLs.
>
> For example, these URLs would be served by Django:
>   /
>   /about/
>   /whatever/
>   /morestuff/
>   /reports/aaa
>   /reports/bbb
>   /reports/ccc
>
> But these would need to be interpreted by PHP or served as HTML:
>   /forum/
>   /wiki/
>   /reports/super_special_report/
>
> I'm using Django with Apache/mod_python.  I was able to get it going
> using the docs at
> http://www.djangoproject.com/documentation/modpython/.
>
> <Location "/">
>   SetHandler python-program
>   PythonHandler django.core.handlers.modpython
>   PythonPath "sys.path+['/var/www/django']"
>   SetEnv DJANGO_SETTINGS_MODULE myapp.settings
>   PythonDebug Off
> </Location>
>

Add a location for each dir that you do not want served by django. You
should be doing this for media already. See this page:
http://www.djangoproject.com/documentation/modpython/#serving-media-files

So, for the forum dir do:

<Location "/forum/">
SetHandler None
</Location>


> Many thanks!
>
>
> >
>


-- 
----
Waylan Limberg
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
 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