#22768: CreateUpdateView view class
-------------------------------------+-------------------------------------
     Reporter:  adi.andreias@…       |                    Owner:  nobody
         Type:  New feature          |                   Status:  closed
    Component:  Generic views        |                  Version:  master
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  CBV class based      |             Triage Stage:
  view update create                 |  Unreviewed
  CreateUpdateView                   |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  1                    |
-------------------------------------+-------------------------------------
Changes (by erikr):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 Assuming, as you say, that the only difference is those two lines, that
 would also mean it is trivial to create this yourself: use a
 `BaseUpdateView` based class, and override `get_object()` in your class to
 return `None` whenever you want it to behave as a create view, instead of
 an update view. That will not introduce any code duplication.

 I'm closing wontfix, as I then consider this to be something that is
 trivial to do, by design, outside of Django core.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/22768#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/080.d9209a4e402b259b5ec36a2dc5d00924%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to