Commit afa3c6ee authored by onny's avatar onny
Browse files

added several new custom fields

parent 4eda615e
from django import forms
......@@ -11,6 +11,9 @@ class Artist(models.Model):
class Project(models.Model):
artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
name = models.CharField(max_length=100)
city = models.CharField(max_length=100)
datefrom = models.DateField()
dateto = models.DateField()
def __str__(self):
return self.name
......@@ -18,6 +21,21 @@ class Project(models.Model):
class Entry(models.Model):
project = models.ForeignKey(Project, on_delete=models.CASCADE)
signatory = models.CharField(max_length=100)
description = models.CharField(max_length=100)
filename = models.CharField(max_length=100)
dimension = models.CharField(max_length=100)
visibility = models.BooleanField(default=False)
TYPE_CHOICES = (
('VP', 'Vintage Print'),
('HS', 'Hand Sketch'),
('N', 'Negative'),
('P', 'Positive'),
('PL', 'Plan, Bauzeichnung'),
('MI', 'Microfiche'),
('AK', 'Akte')
)
type = models.CharField(max_length=20,choices=TYPE_CHOICES)
def __str__(self):
return self.signatory
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment