Created
March 7, 2018 14:18
-
-
Save nehajagadeesh/db8623207a9c29b746d3233a6f415254 to your computer and use it in GitHub Desktop.
Common Models
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example: | |
# from custom_user import CustomUser | |
# from custom_contenttype import CustomContentType | |
# from custom_genericcontenttypes import CustomGenericForeignKey | |
class Notes(models.Model): | |
notes = models.TextField() | |
createdon = models.DateTimeField(auto_now_add=True) | |
modifiedon = models.DateTimeField(auto_now=True) | |
user = models.ForeignKey(CustomUser) | |
content_type = models.ForeignKey(CustomContentType) | |
object_id = models.PositiveIntegerField() | |
content_object = CustomGenericForeignKey('content_type', 'object_id') | |
class Meta: | |
app_label = 'goibibo_models' | |
db_table = 'common_itemnotes' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment