Commit fbb16533 authored by okhin's avatar okhin 🚴

Adding model translations

parent 4a7f5edc
from modeltranslation.translator import register, TranslationOptions
from picampaign.campaign.models import Campaign, Argumentary
@register(Campaign)
class CampaignTranslationOptions(TranslationOptions):
fields = ('title', 'description')
@register(Argumentary)
class ArgumentaryTranslationOptions(TranslationOptions):
fields = ('title', 'text')
......@@ -36,6 +36,7 @@ INSTALLED_APPS = (
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'modeltranslation',
'picampaign.contact',
'picampaign.campaign',
'picampaign.organization',
......
......@@ -8,6 +8,7 @@ README = open(os.path.join(here, 'README.md')).read()
requires = [
'django',
'djangorestframework',
'django-modeltranslation',
'drf-nested-routers',
'requests',
'pillow',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment