In this particular example, you have Character model being an inline of itself.

On Nov 24, 2010, at 8:07 PM, eric wrote:

> Well, there are a number of models, so I'll just give an example of
> the one that is misbehaving:
> 
> 
> from pages.models import Chapter
> from django.contrib import admin
> 
> class CharacterInline(admin.StackedInline):
>    model = Character
> 
> class CharacterAdmin(admin.ModelAdmin):
>    inlines = [CharacterInline]
>    list_display = ('name','role')
>    fieldsets = [
>                 (None,             {'fields':['name', 'role',
> 'stories', 'rank']}),
>                 ('content',          {'fields':['content']})]
> admin.site.register(Character, CharacterAdmin)
> 
> Repeat that for all the other 8 or 9 models, with appropriate fields.
> 
> Since I'm still working through the tutorial, I created the Inline/
> Admin classes after my first attempt at registering the class-so, it
> used to simply be:
> 
> from pages.models import Character,Other,Classes
> from django.contrib import admin
> 
> admin.site.register([Character,bunch, of, other,classes])
> 
> 
> On 11/24/10 2:04 PM, Jason Mayfield wrote:
>> Can you provide your admin.py file?
>> 
>> - Jason
>> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 

- Jason

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

Reply via email to