Skip to main content

A Django translation server

Project description


=====
Django translation server
=====

Django translation server is a simple Django app to manage the project translations.

Obs: currently this projects only works with PostgreSQL database. Support for others databases will be added in future releases


Supported databases
-----------
- [x] PostgreSQL
- [ ] MySQL
- [ ] Sqlite



Requirements
-----------

Django REST framework - http://www.django-rest-framework.org/
django-filter
django-modeltranslation - http://django-modeltranslation.readthedocs.io/en/latest/installation.html#using-pip
PostgreSQL database - https://www.postgresql.org/
psycopg2 - https://pypi.python.org/pypi/psycopg2

Quick start
-----------

1. Add "translation_server" to your INSTALLED_APPS setting like this::

INSTALLED_APPS = [
...
'translation_server',
]

2. Include the Translation Server URLconf in your project urls.py like this::

from django.conf.urls import url, include
from rest_framework import routers
from translation_server import views as translation_server_views

router = routers.DefaultRouter()
router.register(r'translation', translation_server_views.TranslationViewSet, 'translations')
router.register(r'translation_type', translation_server_views.TranslationTypeViewSet, 'translations_types')

urlpatterns = [
...
url(r'^api/', include(router.urls, namespace='api'), ),
url(r'^api/last_translation_tag/(?P<tag>\w+)[/]?$', translation_server_views.LastTranslationTagView.as_view(), name='get_last_translation_tag'),
...
]


3. Run ```python manage.py makemigraions``` and ```python manage.py migrate``` to create the Translation models, and load the initial data.

4. Run ```python manage.py collectstatic``` to collect the necessary static files.

5. Start the development server and visit http://127.0.0.1:8000/admin/ to create a translation (you'll need the Admin app enabled).

6. Visit http://127.0.0.1:8000/api/translation/ to view all translations

7. Run `python manage.py translate` to apply the basic translations for en-US and pt-BR

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-translation-server-0.5.3.tar.gz (13.8 kB view details)

Uploaded Source

File details

Details for the file django-translation-server-0.5.3.tar.gz.

File metadata

File hashes

Hashes for django-translation-server-0.5.3.tar.gz
Algorithm Hash digest
SHA256 3984141f83cbba6d0c1edc377cd6efcbf9ff3d693a478dca201d12b61858ff2d
MD5 bbd809c1674622924349fffbca5cd046
BLAKE2b-256 a718f75ed649b7c56c7928696bec058d8310f2915ea8b47187991a7ae02e3637

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page