Re: context porcessors request.context media_url breaks admin

2010-07-08 Thread Rolando Espinoza La Fuente
On Thu, Jul 8, 2010 at 8:21 AM, justin jools wrote: > Wow... django docs can be so confusing... > > I could not believe it worked just by using upper case MEDIA_URL {{ MEDIA_URL }} is already present in the templates because the django.core.context_processors.media context processor which is ena

Re: context porcessors request.context media_url breaks admin

2010-07-08 Thread justin jools
Wow... django docs can be so confusing... I could not believe it worked just by using upper case MEDIA_URL Thanks so much :) :) I spent a day trying figure this out... On 8 July, 13:14, Daniel Roseman wrote: > On Jul 8, 12:57 pm, justin jools wrote: > > > > > > > Thank for your quick response

Re: context porcessors request.context media_url breaks admin

2010-07-08 Thread justin jools
The 2 methods of using media_url with generic views I have tried: 1. http://www.b-list.org/weblog/2006/jun/14/django-tips-template-context-processors/ This knocked out my admin, but media_url did work 2. using templatetags yourApp/templatetags/media_url.py: from django.template import Library f

Re: context porcessors request.context media_url breaks admin

2010-07-08 Thread Daniel Roseman
On Jul 8, 12:57 pm, justin jools wrote: > Thank for your quick response Daniel. > I'm just confused about using media_url with generic views, I have > done it previously with: > > from django.conf import settings        # for media_url > media_url = settings.MEDIA_URL > > def dblist(request): >  

Re: context porcessors request.context media_url breaks admin

2010-07-08 Thread justin jools
Thank for your quick response Daniel. I'm just confused about using media_url with generic views, I have done it previously with: from django.conf import settings# for media_url media_url = settings.MEDIA_URL def dblist(request): obj_list_menu = dbModel1.objects.all() return rende

Re: context porcessors request.context media_url breaks admin

2010-07-08 Thread Daniel Roseman
On Jul 8, 11:40 am, justin jools wrote: > Thanks for that. I did read something about having to add services > back in to the context processors. > The reason I am doing this way is because I could not pass the {media > url} with generic views. > I did a search for trying to do this and hit a coup

Re: context porcessors request.context media_url breaks admin

2010-07-08 Thread justin jools
Thanks for that. I did read something about having to add services back in to the context processors. The reason I am doing this way is because I could not pass the {media url} with generic views. I did a search for trying to do this and hit a couple of posts saying it is not possible to use {media

Re: context porcessors request.context media_url breaks admin

2010-06-29 Thread Daniel Roseman
On Jun 29, 1:41 pm, justin jools wrote: > Hi Tom if you read my original post you will realise that the error is > being caused by setting of context processors to media_url (see > original post). > When context processors are active the {media_url} tag works > perfectly, but breaks the admin. > >

Re: context porcessors request.context media_url breaks admin

2010-06-29 Thread justin jools
Hi Tom if you read my original post you will realise that the error is being caused by setting of context processors to media_url (see original post). When context processors are active the {media_url} tag works perfectly, but breaks the admin. If I comment out : settings.py #TEMPLATE_CONTEXT_PROC

Re: context porcessors request.context media_url breaks admin

2010-06-29 Thread Tom Evans
On Tue, Jun 29, 2010 at 12:33 PM, justin jools wrote: > I corrected my settings.py links: > > TEMPLATE_DIRS = 'C:/django/portfolio_root/templates/' > MEDIA_ROOT = 'C:/django/portfolio_root/site-media/' > MEDIA_URL = '/site-media/' > ADMIN_MEDIA_PREFIX = '/media/' > > but I still get this error: >

Re: context porcessors request.context media_url breaks admin

2010-06-29 Thread justin jools
I corrected my settings.py links: TEMPLATE_DIRS = 'C:/django/portfolio_root/templates/' MEDIA_ROOT = 'C:/django/portfolio_root/site-media/' MEDIA_URL = '/site-media/' ADMIN_MEDIA_PREFIX = '/media/' but I still get this error: TemplateSyntaxError at /admin/ Caught an exception while rendering: us

Re: context porcessors request.context media_url breaks admin

2010-06-29 Thread justin jools
Yes I did accidentally set my ADMIN_MEDIA_PREFIX = '/site-media/' instead of media I'll try this On Jun 29, 8:57 am, bruno desthuilliers wrote: > On 29 juin, 00:44, justin jools wrote: > > > > > > > I am trying to use media_url with generic views: > > When I set context processors to media_url

Re: context porcessors request.context media_url breaks admin

2010-06-29 Thread bruno desthuilliers
On 29 juin, 00:44, justin jools wrote: > I am trying to use media_url with generic views: > When I set context processors to media_url, with generic views it > breaks Admin: > > Caught an exception while rendering: user > > settings.py > TEMPLATE_CONTEXT_PROCESSORS = > ('portfolio.context_processo