On Thu, Feb 21, 2008 at 3:02 PM, Karen Tracey <[EMAIL PROTECTED]> wrote:
> On Thu, Feb 21, 2008 at 3:55 AM, Almir Karic <[EMAIL PROTECTED]> wrote:
>
> >
> > from django.db import models
> > from django.contrib import admin
> >
> >
> > # Create your models here.
> >
> > class Category(models.Model):
> >        name = models.CharField(max_length=50)
> >
> >        def __str__(self):
> >                return self.name
> >
> > class Forum(models.Model):
> >        cat = models.ForeignKey(Category)
> >        name = models.CharField(max_length=50)
> >
> >        def __str__(self):
> >                return self.name
> >
> > class Category_admin(admin.ModelAdmin):
> >        model = Category
> >        inlines = [Forum]
> >
> >
>
> You don't list your Model classes directly in inlines, but rather create a
> class based off of admin.StackedInline or admin.TabularInline (which is
> where you specify the actual Model), and list that class in inlines.
>
> See:
> http://code.djangoproject.com/wiki/NewformsHOWTO#Q:HowdoIsetupedit_inline
> and the last part of: http://code.djangoproject.com/wiki/NewformsAdminBranch
> for examples.

thanks :)


what about that error? any ideas how to 'fix' it?




-- 
error: one bad user found in front of screen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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