On Sun, 2009-03-01 at 14:40 -0800, AKK wrote:
> Is this what you mean?
>
> TEMPLATE_CONTEXT_PROCESSORS = (
> "django.core.context_processors.media"
> )
If that's a cut-and-paste, then you need a trailing comma. In Python
("a") is not a 1-tuple, it's the string "a". ("a",) -- with a trailing
Is this what you mean?
TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.media"
)
regards,
Andrew
On 1 Mar, 18:33, Brian Morton wrote:
> From the traceback, it would appear that one or more of your
> processors is named or formed improperly. Can you
>From the traceback, it would appear that one or more of your
processors is named or formed improperly. Can you post the code from
your setting.py file where you specify your processors? Not just the
strings, but the entire Python structure where you define those.
On Mar 1, 7:51 am, AKK
Having looked at the traceback i gather its something to do with the
imports:
Environment:
Request Method: GET
Request URL: http://localhost:8080/
Django Version: 1.0.2 final
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
Thank you. I had forgotten the context instance part but now i've
added that as below:
"render_to_response('blogSite/index.html', locals(),
context_instance=RequestContext(request))"
and i get:
Exception Type: ValueError
Exception Value: Empty module name
but if i take out
On Sat, 2009-02-28 at 15:13 -0800, AKK wrote:
> Actually i thought i have but i haven't, i added:
>
> TEMPLATE_CONTEXT_PROCESSORS = (
> "django.core.context_processors.media"
> )
Keep in mind that that will remove all the other context processors,
which might not be what you want.
Actually i thought i have but i haven't, i added:
TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.media"
)
to my settings.py (it didn't seem to be in there by default, i don't
know if thats supposed to be the case).
Then when it didn't work i tried creating a simple
Managed to get it working. Thanks for the help.
Andrew
On 28 Feb, 00:36, Malcolm Tredinnick wrote:
> On Fri, 2009-02-27 at 11:53 -0800, AKK wrote:
> > Sorry I must mean the media url. Are the media_root and the media_url
> > automatically linked?
>
> No. The
On Fri, 2009-02-27 at 11:53 -0800, AKK wrote:
> Sorry I must mean the media url. Are the media_root and the media_url
> automatically linked?
No. The MEDIA_ROOT (capitalisation is important) setting is a storage
path. It could be anywhere. It's then up to you to configure your
webserver so that
Sorry I must mean the media url. Are the media_root and the media_url
automatically linked? In my settings.py i have:
C:/Program Files/Apache2.2/myproject/
media/ as the root &
http://localhost:8080/akonline/media/
as the url
and i have an image (imgs/img.jpg) in my
On Thu, 2009-02-26 at 17:04 -0800, AKK wrote:
> Hi,
>
> I have a template and I want to get some images out of my media root.
> I was wondering is there anyway to automatically return the media root
> from settings.py rather than manually specifying it rather each time.
You are probably wanting
if you include the django.core.context_processors.media context processor
http://docs.djangoproject.com/en/dev/ref/templates/api/?from=olddocs#django-core-context-processors-media
On Thu, Feb 26, 2009 at 8:04 PM, AKK wrote:
>
> Hi,
>
> I have a template and I want
Hi,
I have a template and I want to get some images out of my media root.
I was wondering is there anyway to automatically return the media root
from settings.py rather than manually specifying it rather each time.
Thanks
Andrew
--~--~-~--~~~---~--~~
You
13 matches
Mail list logo