I've been hacking around and googling for a little while now and can't
seem to track down a solution to what should be a pretty straight
forward problem.

The situation
============
I'm trying to setup a nice workflow between my development environment
and my production environment. I would like to be able to move changes
from development to production with a minimum of hassle.

Production setup
=============
I'm serving all the dynamic pages using Apache/mod_python. All static
content (images, scripts, styles, etc.) are served from a _different_
subdomain running lighttpd. This setup seems to work well and is in
line with what's recommended in the documentation (with the exception
of the different subdomain).

domain.tld => Django running on Apache/mod_python
sub.domain.tld => static content served from lighttpd

Development setup
===============
I've setup development much the same way. The difference here is the
server software. My development machine is Mac and my production
server is running Ubuntu. The development environment is running
straight from IP. So I've got:

ip:8000 => Django running on manage.py
ip:80 => static content served from Personal Web Sharing (basically
Apache)

Django configuration
================
I have 2 settings.py files (settings.py.development &
settings.py.production). One for development and one for production.
Each has the settings for the servers in the specific environment.
Right now I simply copy whichever settings.py.* file to settings.py
for the environment I'm working in at the time.

Problem
=======
Templates! I'd like to refer to my local static files when running in
my development environment. How do I setup the templates to use the
proper static files.

Right now my templates include lines like:

<link rel="stylesheet" href="http://sub.domain.tld/styles/base.css";
type="text/css" media="screen" />

I'm obviously missing something basic. I'm 99% sure I should be able
to say something like:

<link rel="stylesheet" href="http://
{{ static_content_domain_constant }}/styles/base.css" type="text/css"
media="screen" />

I have looked around for a solution but everything seems to point to
the Site object (which requires a different entry in the database
which I want to avoid, development should be a near exact mirror of
production) or passing a variable through a view (these changes should
be global).

I'm new so please be gentle.

Thanks in advance,
Mark


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