prepopulated_fields is not changed only after user typed text there

57 views
Skip to first unread message

Vitaly

unread,
Oct 7, 2014, 2:54:29 PM10/7/14
to django...@googlegroups.com
Hi all

Does anybody know the reason why in django1.7 prepopulated fields is not changed only after user typed text there? Is that bug or what?

For example


class Post(models.Model):

    title = models.CharField('Title', max_length=128)
    url = models.SlugField('Url')

class PostAdmin(admin.ModelAdmin):

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


When editing existing Post if user clicks on Title field then Url is overrided by value from Title. In django 1.6 url is not changed if user changes Title. That's why I think it is regression django bug.

Collin Anderson

unread,
Oct 7, 2014, 3:14:32 PM10/7/14
to django...@googlegroups.com
It looks like it's supposed to only change the slug if the slug was blank when the page loaded.

Reply all
Reply to author
Forward
0 new messages