I'm trying to prepopulate a slug field with newforms-admin.
It works fine for the 'normal' Article model, but the inline Photo
model's slug field won't prepopulate from it's title field.

(If the code below doesn't make sense, I can paste the whole model.)
Two models: Article and Photo in the same models.py file.

# From the bottom of my models.py file:
from django.contrib import admin

class PhotoModelInline(admin.StackedInline):
    model = Photo
    extra = 1

class PhotoOptions(admin.ModelAdmin):
    prepopulated_fields = {'slug': ('title',)}

class ArticleOptions(admin.ModelAdmin):
    prepopulated_fields = {'slug': ('headline',)}
    inlines = [PhotoModelInline]

admin.site.register(Article, ArticleOptions)
admin.site.register(Photo, PhotoOptions)
--~--~---------~--~----~------------~-------~--~----~
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