I have one view for adding new object for model, for example new
Place for Places Model
def add(request,form_class=PlaceForm):
if request.method == 'POST':
form = form_class(request.POST)
if form.is_valid():
form.save(request)
return render_to_response('places/added.html', {'form' :
form},) #IF ALL OK
else:
form = form_class()
return render_to_response('places/add.html',
{ 'form' : form},
context_instance=RequestContext(request))
------
After saving a new place object I want to display confirmation message
like "New place PLACE_NAME saved succefully". The problem is, I don't
know how to send a place.name to a "added.html" template, because view
doesnt have any information about Place model instance - saving is
accomplished by form method save.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---