Spaces:
Runtime error

Add-Sub / myapp /models.py
Noel-Teens's picture
Updated pages
ab72e04
Raw History Blame Contribute Delete
327 Bytes
from django.db import models
# Create your models here.
class Calc(models.Model):
num1 = models.IntegerField()
num2 = models.IntegerField()
operation = models.CharField(max_length=3)
time = models.DateTimeField(auto_now= True)
def __str__(self):
return f"{self.num1} {self.operation} {self.num2}"