Last active
July 16, 2019 21:42
-
-
Save aballah-chamakh/fdebb0f0fb0e556db63aab17534325bc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| from django.db import models | |
| class Article(models.Model): | |
| analytic = models.OneToOneField(on_delete=models.SET_NULL,null=Yrue) | |
| title = models.CharField(max_length=255) | |
| description = models.TextField() | |
| def __str__(self): | |
| return self.title | |
| class Analytic(moodels.Model): | |
| views = models.IntegerField() | |
| def __str__(self): | |
| return self.views | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment