This commit is contained in:
DerTyp187
2021-11-17 15:20:02 +01:00
parent ad7648261d
commit 1c11ebbfcc
2 changed files with 38 additions and 1 deletions

View File

@@ -1,3 +1,13 @@
from django.db import models
from django.db.models.deletion import CASCADE
from django.utils import timezone
from main.models import Category,Topic
# Create your models here.
class View(models.Model):
ip = models.CharField(max_length=200)
date = models.DateTimeField(default=timezone.now)
topic = models.ForeignKey(Topic, on_delete=CASCADE)
category = models.ForeignKey(Category, on_delete=CASCADE)
def __str__(self):
return self.ip