﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
14684	RESTful Model View	gdoermann	Łukasz Rekucki	"I love the changes that now allow class views.  I am probably a bit late in the discussion, but the problem with how they are currently designed is that in the views/generic/edit.py are not RESTful.  You have to have a Create, Update and Delete view for each model.  I spent some time writing a ModelView that uses the existing code, but allows for a single model view that takes care of all CRUD.  The only drawback is that you must use an ""action"" hidden field whose name can be specified by the ""action_name"" variable if you want to delete and your browser does not support the DELETE HTTP verb.  This is the current way of handling RESTful applications in non-RESTful browsers (or the best way I have found and read about).  It does a safe get on the object so if the pk or slug are not passed in it assumes you are creating a new object (so... this could be changed to use the action key as well, but I just played off of what you were doing in the existing get_object for the ModelFormMixin).

Attached is the generic ModelFormView.  

Thanks,

Greg"	New feature	closed	Generic views	1.3-alpha	Normal	needsinfo	models, views, sprintdec2010	gdoermann@… kamedov@… paradise.qingfeng@… lrekucki@… Tom Christie	Someday/Maybe	1	1	1	1	0	0
