-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from COEXCZ/fixes_upgrades
Fixes upgrades
- Loading branch information
Showing
14 changed files
with
390 additions
and
259 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,3 @@ django>=2.2.20 | |
djangorestframework>=3.7.1 | ||
requests>=2.18.4 | ||
django-rq==2.4.1 | ||
django-redis-cache==3.0.0 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,16 +4,21 @@ | |
PACKAGE = "translation_manager" | ||
NAME = "django-translation-manager" | ||
DESCRIPTION = "Django app for managing translations from admin" | ||
AUTHOR = "Pavel Císař, Martin Kubát, Mikuláš Mrva, Jakub Ladra, Michal Kašpar, Jan Češpivo - COEX s.r.o (http://www.coex.cz)" | ||
AUTHOR = "Pavel Císař, Martin Kubát, Mikuláš Mrva, Jakub Ladra, Michal Kašpar, Jan Češpivo, Milan Vlasák - COEX s.r.o (http://www.coex.cz)" | ||
AUTHOR_EMAIL = "[email protected]" | ||
URL = "https://github.com/COEXCZ/django-translation-manager" | ||
VERSION = '1.1.1' | ||
LICENSE = "Mozilla Public License 2.0 (MPL 2.0)" | ||
|
||
with open('README.rst') as readme: | ||
LONG_DESCRIPTION = readme.read() | ||
|
||
setup( | ||
name=NAME, | ||
version=VERSION, | ||
description=DESCRIPTION, | ||
long_description=LONG_DESCRIPTION, | ||
long_description_content_type='text/x-rst', | ||
author=AUTHOR, | ||
author_email=AUTHOR_EMAIL, | ||
license=LICENSE, | ||
|
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from django.test import override_settings | ||
from rest_framework.test import APITestCase | ||
|
||
from translation_manager.models import TranslationEntry | ||
from translation_manager import defaults | ||
|
||
|
||
@override_settings(TRANSLATIONS_ENABLE_API_COMMUNICATION=True) | ||
class TranslationTests(APITestCase): | ||
|
||
def setUp(self): | ||
TranslationEntry.objects.create(language='cs', original='admin-test', translation='test in admin', | ||
is_published=True) | ||
TranslationEntry.objects.create(language='cs', original='test', translation='other test', is_published=True) | ||
|
||
def test_get_translations(self): | ||
defaults.TRANSLATIONS_API_QUERYSET_FORCE_FILTERS = [] | ||
response = self.client.get('/translations/cs/') | ||
self.assertTrue(len(response.data) == 2) | ||
|
||
def test_force_filter(self): | ||
defaults.TRANSLATIONS_API_QUERYSET_FORCE_FILTERS = ['admin-'] | ||
response = self.client.get('/translations/cs/') | ||
self.assertTrue(len(response.data) == 1) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
default_app_config = 'translation_manager.apps.TranslationManagerConfig' |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import os | ||
|
||
from django.apps import AppConfig | ||
from django.conf import settings | ||
|
||
|
||
class TranslationManagerConfig(AppConfig): | ||
name = 'translation_manager' | ||
default_auto_field = "django.db.models.BigAutoField" | ||
|
||
def ready(self): | ||
for path in settings.LOCALE_PATHS: | ||
os.makedirs(path, exist_ok=True) |
Oops, something went wrong.