Generated: Wed 2014-02-05 16:32 CET
Source file: /home/dkaufhold/projects/bitmazk-contact-form/src/contact_form/models.py
Stats: 3 executed, 0 missed, 5 excluded, 21 ignored
"""Models for the ``contact_form`` app."""
from django.db import models
from django.utils.translation import ugettext_lazy as _
from hvad.models import TranslatableModel, TranslatedFields
class ContactFormCategory(TranslatableModel):
"""
The category of the users contact request.
Is created as translatable master data by the admin.
For translatable fields check the ``ContactFormCategoryTranslation`` model.
"""
slug = models.SlugField(
max_length=256,
verbose_name=_('Slug'),
)
translations = TranslatedFields(
name=models.CharField(
max_length=256,
verbose_name=_('Name'),
)
)
def __unicode__(self):
return self.slug
# return self.safe_translation_getter('name', self.slug)