X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/154468a29ddb2a3ea4a078888be55c303a5239bb..9c9d869e6252d1af4e4747fdfe0d0d7a4ede3d19:/apps/attachments/models.py?ds=sidebyside diff --git a/apps/attachments/models.py b/apps/attachments/models.py new file mode 100644 index 00000000..42c3bfa6 --- /dev/null +++ b/apps/attachments/models.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals +from django.db import models +from django.utils.translation import ugettext_lazy as _ + + +class Attachment(models.Model): + key = models.CharField(_('key'), help_text=_('A unique name for this attachment'), primary_key=True, max_length=255) + attachment = models.FileField(upload_to='attachment') + + class Meta: + ordering = ('key',) + verbose_name, verbose_name_plural = _('attachment'), _('attachments') + + def __unicode__(self): + return self.key