I have an app that is modeled after the django admin app.  In general
it seems to me that the admin app is RESTful.  However, I am
encountering a situation that is similar to the admin apps delete
confirmation process, and I'm curious if anyone out there could
comment on whether this particular part is considered "RESTful", or if
not "RESful", I guess I'd just like opinions on if it's a good way to
do things.  Let me describe my question more.

In the django admin, you can click on a bunch of objects and then
select the "delete" action, and then click "go".  This takes you to a
delete confirmation page that asks if you are sure.  You can click
"I'm sure" to proceed with your delete. This delete confirmation page
has the same url as the objects changelist page.  And that's the core
of my question - is that a good thing?

I have a situation that is quite similar, but a bit more complex.  To
give a hopefully simple analogy, suppose that the admin's delete
confirmation page had an input field associated with each object,
which required the user to put in a "reason" prior to clicking "I'm
sure".  And if the user doesn't put in a reason, imagine they should
be presented with the same delete confirmation page, but with an error
on the fields where no reason was supplied.   Should this page also be
at the same changlist url?

I *think* the answer to this question is yes (though perhaps it is not
RESTful).  My reason behind that is that if I create a different url,
which is exposed to the user, then I would really need to make that
URL "GETable".  IE, the user should be able to type it in and have it
be meaningful.  However in the case of the admin delete (and in my app
as well), the info on what we are going to delete is transient and
can't be recreated through a new GET, so doing a GET on this new URL
would have no purpose and would be confusing to the user.

I know there is no "right" answer here.  I'm just looking for opinions
from people who value well structured APIs.

Thanks for any insights!

Margie

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to