Is it possible to use a parameter from the url with the extra_content
dictionary when using the generic direct_to_template? I know it
executes functions within the extra_content right before loading the
template, so I would think you should be able to access this someone.
Any help would be much appreciated, thanks! Here is my code:
from django.conf.urls.defaults import *
from main_site.transaction.models import TransactionEvent
def getUserName(transaction_event_id):
..
return username
urlpatterns = patterns('django.views.generic.simple',
(r'^rollback/(?P\d+)','direct_to_template',
{'template': 'error_page/rollback.html', 'extra_context':
{'username':getUserName('??transaction_event_id??')}}),
)
As you can see I want to use the transaction_event_id from the url
with the getUserName function. Is this even possible?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---