Maybe I'm not setting up my models correctly but I like setting up a
slug charfield that prepopulates from the category_name charfield.  The
javascript works just fine when I create a new category but when I want
to alter my category django automatically sets:

document.getElementById("id_slug")._changed = true

which means that as I type in the new category_name the slug is
unresponsive.  I have to manually changed the slug or modify the
auto_populate templatetag.  Is there some reason why django doesn't
want the slug to change consistently with my category_name?  I don't
know much about database indexing (db_index) so maybe that's why I'm
confused.  I suppose that there is an argument that a slug is often
used in urls which should never change but I think more important to
have a url that makes sense than to have a permanent url that maps the
slug 'ruby-on-rails' to the category 'Django Rox'



category_name = models.CharField(maxlength=100)
slug = models.SlugField(prepopulate_from=('category_name',),
unique=True,)


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to