UPDATE / DELETE on multiple models

169 views
Skip to first unread message

Stephan Groß

unread,
Nov 6, 2012, 4:18:39 AM11/6/12
to django-res...@googlegroups.com
I'm working on an extentions to update / delete lists of models.

the topic itself is rather easy to implement but... i'm stuck cause of naming problems.

there is already:

CreateModelMixin     <-- single object
ListModelMixin          <-- multiple objects
RetrieveModelMixin     <-- single object
UpdateModelMixin      <-- single object
DestroyModelMixin     <-- single object

and for that:

CreateAPIView
ListAPIView
RetrieveAPIView
DestroyAPIView
UpdateAPIView
ListCreateAPIView
RetrieveDestroyAPIView
RetrieveUpdateDestroyAPIView

so.... how to name that new mixin's?

1.
UpdateModelListMixin
DeleteModelListMixin

2.
ListUpdateModelMixin
ListDeleteModelMixin

3.
MultipleUpdateModelMixin
MultipleDeleteModelMixin

4.
something else?

i personally like option 1 and 3. number 2 seems to be confusing because it isnt a ListMixing its delete of a list...
you also can make suggestions for some prebuild views.

i wanna know your opinions. so please response :-)

Greets Stephan

Tom Christie

unread,
Nov 6, 2012, 5:52:20 AM11/6/12
to django-res...@googlegroups.com
Personally, 3 sounds good.

Daniel Sokolowski

unread,
Nov 6, 2012, 9:10:36 AM11/6/12
to django-res...@googlegroups.com
I feel like #1, it groups all the updates/deletes together.

Stephan Groß

unread,
Nov 6, 2012, 9:49:06 AM11/6/12
to django-res...@googlegroups.com
btw... following this "convention" ListModelMixin could be RetrieveModelListMixin or MultipleRetrieveModelMixin :>
Reply all
Reply to author
Forward
0 new messages