Skip to content

Instantly share code, notes, and snippets.

@m000
Created February 9, 2012 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m000/1780036 to your computer and use it in GitHub Desktop.
Save m000/1780036 to your computer and use it in GitHub Desktop.
imagestore customizations
from imagestore.models.bases.image import BaseImage
from django.utils.translation import ugettext_lazy as _
from django.db import models
class ImageLicenceInfo(models.Model):
author_name = models.CharField(_('Author Name'), max_length=100)
# more fields to be added later...
class Meta:
verbose_name = _('Image Licence Information')
verbose_name_plural = _('Image Licence Information')
db_table = 'imagestore_licenceinfo'
#app_label = 'imagestore'
class Image(BaseImage):
class Meta(BaseImage.Meta):
abstract = False
verbose_name = _('Image')
verbose_name_plural = _('Images')
db_table = 'imagestore_image'
app_label = 'imagestore'
licence_info = models.ForeignKey(ImageLicenceInfo, null=True, blank=True, related_name='same_licence_with')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment