Re: Is it a good practice to delegate views based on GET / POST?
Sorry, answered directly to author by accident.
Isn't this achieved by using class based views?
from django.views.generic import View
class MyView(View):
def get(request, *args, **kwargs)
...
def post(request, *args, **kwargs)
...
In addition, you can use the built-in mixins. Also, the django-rest-
framework uses this paradigm and it's amazing. So why use such a
strange method like mentioned in the django book?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home