14 lines
366 B
Python
14 lines
366 B
Python
from django.db import models
|
|
from django.contrib.auth.models import User
|
|
|
|
|
|
class Events(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
start = models.DateTimeField(null=True,blank=True)
|
|
end = models.DateTimeField(null=True,blank=True)
|
|
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
|
|
|
def __str__(self):
|
|
return self.name
|
|
|