I ONLY use it for development with the Django server. I only set up to serve static pages when DEBUG = True (as they show toward the bottom of the page).
No need to change links on the production server (apache + mod_python) because the URLs are a different location than what I have set up for mod_python. You set up mod_python using <Location></Location> if you are using Apache. This tells apache that ONLY what matches the specified location will use mod_python. An example: <Location "/my_django_site/"> SetHandler python-program PythonHandler django.core.handlers.modpython PythonInterpreter my_arbitrary_unique_name_here PythonPath "['/my/django/code'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE WebSite.settings SetEnv PYTHON_EGG_CACHE /tmp/.python-eggs PythonDebug On </Location> With this setup, only those URLs that have /my_django_site/ will go to Django (via mod_python). Any other URLs will get serviced by Apache as normal. It is quite discouraged to have Django serve static pages on a production server since it's not meant for that, so it's slow and inefficient. On Tue, 2009-01-27 at 09:06 -0800, May wrote: > Hello, > > The tutorial suggests not serving the static pages with this method on > a permanent basis. Are you using this method for your production > server? I'm using windows/apache/modpython and I've tried using the > IP address and still run into django url requests. Do you know of a > way to get apache to override django? > > Thanks, > > Ana > > On Jan 27, 8:55 am, Adam Stein <a...@eng.mc.xerox.com> wrote: > > Check out: > > > > http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs > > > > I have Django serve static files during development so that all my links > > that don't need to go thru Django work. > > > > > > > > On Tue, 2009-01-27 at 08:42 -0800, May wrote: > > > Hello, > > > > > I'm converting PHP pages to Django. I'm using base.html for my > > > formatting. I've included the left-side bar in the base.html, which > > > includes links that do not require using a database, such as the > > > "contact us" page. Since I'm using localhost for testing my link > > > looks something like this: > > > > > <a href="http://127.0.0.1/contactus.html/" >Contact Us</a> > > > > > Since the left-side bar is in base.html when the link is selected > > > django requires that I place the link in the URL.py and include it in > > > View.py. I have many links like this and would prefer that the links > > > go directly to the page ignoring the django requests. > > > > > Is there a simple work around for this, that will allow me to continue > > > to use the convenience of the base.html inheritance? > > > > > Thanks, > > > > > Ana > > > -- > > > > Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com > > > > Disclaimer: Any/All views expressed > > here have been proven to be my own. [http://www.csh.rit.edu/~adam/] > -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com Disclaimer: Any/All views expressed here have been proven to be my own. [http://www.csh.rit.edu/~adam/] --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---