Re: Confused about where to put css and images

2006-01-09 Thread wiz
В Вск, 08/01/2006 в 16:24 -0500, Jeffrey E. Forcier пишет: > Oh, I see what you mean. I'm pretty sure you can just do an 'from > myproject import settings' in your view module, then throw the > variables from that into your template context, e.g. "context > ['MEDIA_URL'] = settings.MEDIA_URL"

Re: Confused about where to put css and images

2006-01-08 Thread Jeffrey E. Forcier
Oh, I see what you mean. I'm pretty sure you can just do an 'from myproject import settings' in your view module, then throw the variables from that into your template context, e.g. "context ['MEDIA_URL'] = settings.MEDIA_URL" and so forth. Regards, Jeff On Jan 8, 2006, at 2:00 PM, wiz wr

Re: Confused about where to put css and images

2006-01-08 Thread wiz
В Вск, 08/01/2006 в 11:42 -0500, Jeffrey E. Forcier пишет: > 0.9, but I'm not positive) generic view which lets you assign a URL > to a template directly without having to write a tiny custom view for > it. > http://www.djangoproject.com/documentation/generic_views/ Thanks, i'm already somewh

Re: Confused about where to put css and images

2006-01-08 Thread Jeffrey E. Forcier
On Jan 8, 2006, at 3:20 AM, wiz wrote: Is there a `portable` way of writing urls / passing settings right to templates, w\o having to write custom views and such mess? I may be misunderstanding you, but there's a fairly new-ish (since there's no note about the development version, I assume

Re: Confused about where to put css and images

2006-01-08 Thread wiz
В Сбт, 07/01/2006 в 08:41 -0800, PythonistL пишет: > For the production server (Apache with mod_Python) I have in my > settings.py > MEDIA_ROOT = "C:/Django/TEMPLATES/Static/" #Python Syntax eventhough > MEDIA_URL = "/Media/" > For both( development and production server) then I use in my templat

Re: Confused about where to put css and images

2006-01-07 Thread aaloy
Hello! Thank you for your answer! 2006/1/7, PythonistL : > > For my development server I only have one more line in urls.py > > (r'^Media/(?P.*)', 'django.views.static.serve', {'document_root' > : 'C:/Django/TEMPLATES/Static/', 'show_indexes':True}), > This is quite the same that I have actually

Re: Confused about where to put css and images

2006-01-07 Thread PythonistL
For my development server I only have one more line in urls.py (r'^Media/(?P.*)', 'django.views.static.serve', {'document_root' : 'C:/Django/TEMPLATES/Static/', 'show_indexes':True}), where 'C:/Django/TEMPLATES/Static/' is my dir on my XP . For the production server (Apache with mod_Python) I h

Confused about where to put css and images

2006-01-07 Thread aaloy
Hello! I'm a bit confused about where to put css and images to the application in order to use them in Django. I have read http://www.djangoproject.com/documentation/static_files/ and I'm trying to use the "if DEBUG trick" but it does not work for me. What I like to do is