Hi,
I'd like to clarify with some sample code. I hope this makes my
question clearer. My question is about the line marked with an
uppercase comment.
Mikah
#####
def modify(request, item_id):
''' View to modify a single node. '''
try:
manipulator = nodes.ChangeManipulator(item_id)
except nodes.NodeDoesNotExist:
raise Http404
item = manipulator.original_object
if request.POST:
new_data = request.POST.copy()
#### WHERE SHOULD THIS FUNCTIONALITY GO? #####
moveOK = moveNode(item.id, new_data['parent'])
errors = manipulator.get_validation_errors(new_data)
if not errors:
manipulator.do_html2python(new_data)
manipulator.save(new_data)
return HttpResponseRedirect("/nodes/modify/%i/" % item.id)
else:
errors = {}
new_data = item.__dict__
#####
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---