This repository has been archived on 2019-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
2017-10-01 00:44:26 +02:00

20 lines
597 B
Python

from __future__ import unicode_literals
from django.utils import timezone
from django.db import models
MAX_LENGTH = 60
# Create your models here.
class Event(models.Model):
id = models.AutoField(primary_key=True)
title = models.CharField(max_length=MAX_LENGTH)
category = models.CharField(max_length=MAX_LENGTH)
link = models.CharField(max_length=MAX_LENGTH)
location = models.CharField(max_length=MAX_LENGTH)
time = models.TimeField(default=timezone.now)
date = models.DateField(default=timezone.now)
class Meta:
unique_together = ('date', 'location')