See CREATE sql statements for example
On 20 дек, 15:52, madhav <[EMAIL PROTECTED]> wrote:
> as a part of using generic relations, i got struck up at one point,
> where i need to run the sql to have a field:
> summary = generic.GenericRelation(Summary)
>
> where Summary is a class defined as:
> class Summary(models.Model):
> id = models.AutoField(primary_key=True)
> content_type = models.ForeignKey(ContentType)
> content_object = generic.GenericForeignKey()
> created_on = models.DateTimeField(auto_now_add= True)
> modified_on = models.DateTimeField(auto_now= True)
>
> And I am using a class called Book which will be having the summary
> field mentioned above. So to alter the Book model at the database
> level, i need to run the alter table for Book. I dont know the
> equivalent sql to create a generic relation column in the table.
> Please help me.
> Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---