Ticket #255: downman.py

File downman.py, 492 bytes (added by andreas@…, 19 years ago)

model

Line 
1from django.core import meta
2
3class File(meta.Model):
4 fields = (
5 meta.CharField('name', maxlength=128),
6 meta.FileField('data', upload_to="upload"),
7 meta.CharField('mimetype', maxlength=256),
8 meta.DateTimeField('created', auto_now_add=True),
9 meta.DateTimeField('modified', auto_now_add=True),
10 meta.TextField('comment')
11 )
12
13 admin = meta.Admin()
14
15 def __repr__(self):
16 return "File(%s:%s)" % (self.id, self.name)
17
Back to Top