Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.db import models
- # Create your models here.
- class Customer(models.Model):
- name = models.CharField(max_length = 50)
- class Tweet(models.Model):
- content = models.CharField(max_length = 140)
- pub_date = models.DateTimeField()
- author = models.ForeignKey(Customer)
- taguser = models.ForeignKey("Tags")
- tagcom = models.ForeignKey("Tags")
- class Tags(models.Model):
- company_tags = models.CharField(max_length = 25)
- user_tag = models.CharField(max_length = 25)
- --------------------------------------------------------------
- aravind@aravindPC:~/djan-apps/twijango$ python manage.py syncdb
- Error: One or more models did not validate:
- 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'.
- 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'.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement