Re: {{ STATIC_URL }} and RequestContext()

2011-04-26 Thread Alendit
Hi, static context processor is simply this: return {'STATIC_URL': settings.STATIC_URL} so you can just add it to your context. Regarding your design decision, i'm not sure, why don't you just give the whole object to the context and access its attributes/functions in the template. Would look m

Re: {{ STATIC_URL }} and RequestContext()

2011-04-25 Thread Ernesto Guevara
Hello! You need create a "static" folder in your project and inside in this folder you create a "css" folder. I use this configuration and works. settings.py import os.path STATIC_ROOT = '' # URL prefix for static files. STATIC_URL = '/static/' ADMIN_MEDIA_PREFIX = '/static/admin/' TEMPLATE_D

{{ STATIC_URL }} and RequestContext()

2011-04-25 Thread Joakim Hove
Hello, I have just started using the {{ STATIC_URL }} template tag to insert proper url's to static resources in my templates. To use this tag I need to create the context for rendering as RequestContext() instance, which takes the request as a parameter for the initialisation. In my code I have