On Feb 28, 5:56 am, "MattW" <[EMAIL PROTECTED]> wrote: > > The change from dev to production seems like it might be a pain. >
I agree somewhat. Speaking as a person transitioning from Tomcat to Django. Dealing with static files is one of the things about Django that does take some getting used to. I have it mostly figured out now but Being curious to see how the experts handle this issue, I looked at the Cheeserater example source code. Firstly, he uses this code in urls.py: if settings.DEBUG: urlpatterns += patterns('', (r'^m/(?P<path>.*)$', serve, {'document_root' : Path(__file__).parent.child("media")}) ) No problems here. Makes perfect sense. But when I took a look at the base template, a bit of ugliness reveals itself: <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="http://media.jacobian.org/ cheeserater/reset.css" type="text/css"> <link rel="stylesheet" href="http://media.jacobian.org/ cheeserater/cheeserater.css" type="text/css"> ... Note the fixed URL for the link to the CSS. In the author's case, he seems to be fortunate that the URLs for the media are the same in both production and development environments. In general however, the URLs may have to be modified - although this ought to be easy since this is within a template. Rangachari Anand --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---