Hello everyone
I've got a views.py in my forms application that emails form data off to
another department.
It's a bookign form for events that appears on the events details page.
www.bongo.com/events/EVENTSLUG
The form is displayed in a template and is on our web site, works a treat.
I've also got a forms.py in the application, in which we define the contents
of the forms in classes.
eg.
class TrainingEventForm(Form):
"""A form for email bookings of training events"""
firstname = CharField()
surname = CharField()
username = CharField()
I need to be able to pull out the EVENTSLUG from the referring URL in the
form in order to only select the event that has that slug.
I know how to do it in a view with request.META, but I'm in a form now,
there is no request and Form does not have an object type of META.
Anyone got any ideas how to pull that data out of the reffering URL? Or
even a better suggestion on how to accomplish this.
Any assistance greatly appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---