Created
October 30, 2014 05:59
-
-
Save gowram/794294e2c037f17fe638 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from parler.models import TranslatableModel, TranslatedFields | |
from django.utils.translation import ugettext as _ | |
# Create your models here. | |
class MyQuiz(TranslatableModel): | |
translations = TranslatedFields( | |
title=models.CharField( | |
_('Title'), max_length=250, default=True, unique=True | |
), | |
description=models.CharField( | |
_('Description'), max_length=255, blank=True | |
), | |
comments=models.CharField( | |
_('Comments'), max_length=255, blank=True | |
), | |
icon=models.ImageField( | |
_("Icons"), upload_to='static/icons', blank=True | |
), | |
) | |
def __unicode__(self): | |
return self.title |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment