- Author:
- dronestudios
- Posted:
- August 4, 2010
- Language:
- Python
- Version:
- 1.2
- Score:
- 0 (after 0 ratings)
Works on saving an already existing entry (updating) but not on saving a new one.
1 2 3 4 5 | def change_view(self, request, object_id, extra_context=None):
result = super(TodoAdmin, self).change_view(request, object_id, extra_context)
if not request.POST.has_key('_addanother') and not request.POST.has_key('_continue'):
result['Location'] = "/"
return result
|
More like this
- Template tag - list punctuation for a list of items by shapiromatron 10 months, 3 weeks ago
- JSONRequestMiddleware adds a .json() method to your HttpRequests by cdcarter 10 months, 4 weeks ago
- Serializer factory with Django Rest Framework by julio 1 year, 5 months ago
- Image compression before saving the new model / work with JPG, PNG by Schleidens 1 year, 6 months ago
- Help text hyperlinks by sa2812 1 year, 7 months ago
Comments
Please login first before commenting.