Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. def CustomComment(models.Model):
  2. comment = models.TextInput()
  3. content_type = models.ForeignKey(ContentType, related_name="colllaboration_set", null=True, blank=True)
  4. object_id = models.PositiveIntegerField(null=True, blank=True)
  5. content_object = generic.GenericForeignKey(ct_field='content_type', fk_field='object_id')
  6. #more fields
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement