#2259: Primary keys should be readonly by default in admin
-------------------------------------+-------------------------------------
     Reporter:  ed@…                 |                    Owner:
                                     |  siddhartha-star-dev
         Type:  Bug                  |                   Status:  assigned
    Component:  contrib.admin        |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by siddhartha-star-dev):

 I come up with two ways to change primary key
 1. we store old pk in hidden field in the change form and we check for the
 hidden field's value and the current pk value, if they have changed, we
 create a new object with the new pk and delete the old one.
 2. there will be a popup which will open a new form where two fields will
 be old pk and new pk, specifically to change the primary key if needed,
 the idea is to have an "edit" option besides the pk field in the current
 form which will then open a popup to change the pk of the given object

-- 
Ticket URL: <https://code.djangoproject.com/ticket/2259#comment:40>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.55a53478c5c60e546def05d813e299a8%40djangoproject.com.

Reply via email to