#9498: generic inline formsets: object has no attribute 'fk'
-----------------------------------+----------------------------------------
          Reporter:  fredbartle    |         Owner:  nobody                 
            Status:  new           |     Milestone:                         
         Component:  Contrib apps  |       Version:  SVN                    
        Resolution:                |      Keywords:  generic inline formsets
             Stage:  Unreviewed    |     Has_patch:  1                      
        Needs_docs:  0             |   Needs_tests:  1                      
Needs_better_patch:  0             |  
-----------------------------------+----------------------------------------
Comment (by fredbartle):

 Here's a basic example:

 {{{

 class Attribute(models.Model):
     content_type = models.ForeignKey(ContentType)
     object_id = models.PositiveIntegerField()
     content_object = generic.GenericForeignKey('content_type',
 'object_id')
     key = models.CharField(max_length=30)
     value = models.CharField(max_length=30)

 class MyModel(models.Model):
     name = models.CharField(max_length=30)
     attributes = generic.GenericRelation(Attribute)


 class AttributeInline(generic.GenericTabularInline):
     model = Attribute

 class MyModelAdmin(models.Model):
     inlines = [AttributeInline]

 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9498#comment:2>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to