SHARE
TWEET

Untitled

a guest Jul 31st, 2012 16 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from django.db import models
  2.  
  3. # Create your models here.
  4.  
  5. class Customer(models.Model):
  6.         name = models.CharField(max_length = 50)
  7.        
  8. class Tweet(models.Model):
  9.         content = models.CharField(max_length = 140)
  10.         pub_date = models.DateTimeField()
  11.         author = models.ForeignKey(Customer)
  12.         taguser = models.ForeignKey("Tags")
  13.         tagcom = models.ForeignKey("Tags")
  14.  
  15. class Tags(models.Model):
  16.         company_tags = models.CharField(max_length = 25)
  17.         user_tag = models.CharField(max_length = 25)
  18.  
  19. --------------------------------------------------------------
  20. aravind@aravindPC:~/djan-apps/twijango$ python manage.py syncdb
  21. Error: One or more models did not validate:
  22. tweetrack.tweet: Accessor for field 'tag_user' clashes with related field 'Tags.tweet_set'. Add a related_name argument to the definition for 'tag_user'.
  23. tweetrack.tweet: Accessor for field 'tag_company' clashes with related field 'Tags.tweet_set'. Add a related_name argument to the definition for 'tag_company'.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top