I have searched these forums and online for an answer to this
question, but I'm not sure about the best practice.

We are using django 1.2.1 with apache and mod_python on ubuntu. We
have created a portals app within a django project to handle
customized portals (with hosts like portal1.oursite.com). We would
like to use the same django settings.py file for the the entire
project.

I'm not sure that the Sites framework necessarily addresses this need,
since we want the portals app to apply various configuration
parameters dynamically based on the host (portal1.oursite.com, etc.)
-- but within the same django project with a single settings.py file.

So if a request comes in for portal1.oursite.com, we would like apache
and mod_python to serve that request from the portals app, which in
turn lives with other apps in our www.oursite.com django project.
Example:
- oursite_djangoproject
      - locations_app
      - portals_app
      - store_app
      - etc.

Is this just a matter of using apache's mod_rewrite to redirect
requests with non www subdomains of oursite.com to
www.oursite.com/portals/<subdomain>/rest/of/url/path -- or is there a
better way? I guess this would mean we would need to change our
virtual host setting to a wildcard apache virtual host like
*.oursite.com and then some weird mod_rewrite stuff to get the non-www
subdomains to secretly have /portals/ and the subdomain appended to
the path. We would *not* want public URLs like portal1.oursite.com/
portals/portal1/rest/of/url/. We would want portal1.oursite.com/rest/
of/url/.

Does that make any sense?

Thanks for any guidance. And sorry if this is more an apache question
than a django one.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.

Reply via email to