Monday, October 25, 2010

Re: Slug auto-complete after save

File "admin_modify.py" method "def prepopulated_fields_js(context)"
Line 11:

if context['add'] and 'adminform' in context:

should be changed to

if 'adminform' in context:

to allow slug be auto updated every time and not only on the entity
creation in admin.

Is there any setting to do it without changing Django internal source
code?

On 24 Жов, 18:29, Alex <person...@gmail.com> wrote:
> Hi all,
>
> Slug autocomplete feature is really cool with:
>
> prepopulated_fields = {'slug':('title',)}
>
> Is it possible to prepopulating slug field even after save - when I
> want to change title for example?
>
> Actually I use django-multilingual and prepopulating of slug works
> only for the first language (en for example), when I switch to another
> language tab (es for example) - the entity is already saved and I have
> now prepopulating for Spanish language.
>
> Is it possible to solve this issue somehow?
>
> Thanks.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment