Add tox support

This commit is contained in:
Gergely Polonkai
2015-11-26 17:15:12 +01:00
parent a53b2827a9
commit e00515c160
6 changed files with 31 additions and 0 deletions

View File

@@ -2,8 +2,10 @@ from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import get_language
@python_2_unicode_compatible
class Word(models.Model):
def translation(self, language):
try:
@@ -25,6 +27,7 @@ class Word(models.Model):
return ""
@python_2_unicode_compatible
class WordTranslation(models.Model):
word = models.ForeignKey(Word, related_name='translations')
language = models.CharField(max_length=5, db_index=True)

View File

@@ -1,3 +1,4 @@
# -*- coding: utf-8
from datetime import timedelta
from django.conf import settings
from django.contrib.auth.models import User