Many thanks! This was really timely and helpful. In case someone's
googling, I'm 99% sure that the book Oleg is referring to is Practical
Django Projects by James Bennett.

It's mostly excellent, but I haven't been so far found anywhere on the
Apress site that has a) a list of errata b) code snippets from the
book to download.

Thanks again, Donn.

g

On Aug 11, 3:26 am, Donn <[EMAIL PROTECTED]> wrote:
> On Monday, 11 August 2008 08:56:13 Oleg Oltar wrote:> I want to use text 
> stored in field title to generate slugs.
>
> In the svn (> 0.96) you have to use ModelAdmin like this:
>
> clas Toon(models.Model):
>   title = models.CharField(max_length=50)
>   slug = models.SlugField(db_index=True,unique=True)
>
> class ToonAdmin(admin.ModelAdmin):
>   prepopulated_fields = {"slug": ("title",)} #sluggify the title field
>
> admin.site.register(Toon, ToonAdmin)
>
> HTH,
> \d

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to