#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):
Replying to [comment:34 Mariusz Felisiak]:
> This issue is still valid please check
[https://code.djangoproject.com/ticket/2259#comment:27 Anssi's
proposition].
Those comments primarily relate to admin right ? As far as I can see right
now, the following code snipped results in the same problem:
`obj = TestModel.objects.get(email="[email protected]")`
`obj.email = "[email protected]"`
`obj.save()`
`exit()`
This creates a new object rather than updating the old one, should this
not be fixed right here ? That would mean that if and when we chose to
make the fields editable, we will just have to change how the form behaves
in the admin...
So should we just try and fix the case with `model.save()` first and then
move towards admin specifics ?
--
Ticket URL: <https://code.djangoproject.com/ticket/2259#comment:38>
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.405a0a52b2fc56ef4db4cd9a831ed905%40djangoproject.com.