Take a look here: http://www.djangoproject.com/documentation/shortcuts/#render-to-response
keith On Sep 4, 2:44 pm, Cortland Klein <[EMAIL PROTECTED]> wrote: > I have two templates, one called via a Generic View and one via my own > View. They both extend a base.html view that has {{MEDIA_URL}} in it. > > When the generic view is hit, the base.html template gets it's > value,http://rtdev.apple.com/media/ > , but when my own View hits MEDIA_URL blanks. > > I tried to get MEDIA_URL in my views.py to pass it in to my > render_to_response but it seems from there that global isn't defined. > > views.py: > > > from django.shortcuts import render_to_response, get_object_or_404 > > > from models import Event > > > def results(request): > > event = get_object_or_404(Event, pk=request.REQUEST['event']) > > response = {} > > response['correct_answers'] = 0 > > response['total_questions'] = 0 > > response['passed'] = 0 > > response['name'] = request.REQUEST['name'] > > > # ... > > > return render_to_response('whatsnew/results.html', response) > > -- > Cortland Klein <[EMAIL PROTECTED]> +1 408 506 9791http://pixelcort.com/ > 2260 California Street #13 > Mountain View, CA, USA 94040 > > Alumni, Business Management <[EMAIL PROTECTED]> > San José State University > > Alumni Technical Advisor, Entrepreneurial Society <[EMAIL PROTECTED] > >http://e-society.org/ > > Q&A Techie, Silicon Valley Mac User Grouphttp://svmug.org/ > > Member, Silicon Valley Google Technology User Grouphttp://sv-gtug.org/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---