#28205: ModelAdmin.prepopulated_fields. Auto generating does not work while 
editing
object
-------------------------------------+-------------------------------------
               Reporter:  Ju         |          Owner:  nobody
                   Type:  Bug        |         Status:  new
              Component:             |        Version:  1.11
  contrib.admin                      |
               Severity:  Normal     |       Keywords:  prepopulated_fields
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 ModelAdmin.prepopulated_fields auto generating works only while creating
 new records but not while editing them.

 {{{

 from django.db import models

 class Item(models.Model):
     title = models.CharField(max_length=200, blank=False)
     slug = models.SlugField(max_length=200)

 }}}

 {{{

 from django.contrib import admin
 from .models import Item

 class ItemAdmin(admin.ModelAdmin):

   prepopulated_fields = {"slug": ("title",)}

 admin.site.register(Item, ItemAdmin)
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28205>
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/049.783e8dd083064e163114d44145c01f44%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to