Removed support and tests for Django <= 2.1

This commit is contained in:
Marco Bonetti 2021-01-11 11:13:05 +01:00
parent 870065a0a8
commit d0dcb47b98
8 changed files with 32 additions and 43 deletions

View file

@ -3,21 +3,13 @@ services: memcached
matrix:
include:
- python: "3.6"
env: TOX_ENV=py36-django20
- python: "3.6"
env: TOX_ENV=py36-django21
- python: "3.6"
env: TOX_ENV=py36-django22
- python: "3.7"
env: TOX_ENV=py37-django20
- python: "3.7"
env: TOX_ENV=py37-django21
- python: "3.7"
env: TOX_ENV=py37-django22
- python: "3.7"
env: TOX_ENV=py37-django30
- python: "3.7"
- python: "3.8"
env: TOX_ENV=py37-django31

View file

@ -5,6 +5,7 @@ Version History
Version 0.9.6 (unreleased)
--------------------------
* Remove 'providing_args' kwarg from signals instanciation (#250, thanks @mondeja)
* Removed support and tests for Django <= 2.1
Version 0.9.5

View file

@ -4,7 +4,7 @@ Rosetta
.. image:: https://travis-ci.org/mbi/django-rosetta.svg?branch=develop
:target: http://travis-ci.org/mbi/django-rosetta
.. image:: https://img.shields.io/pypi/v/django-rosetta
:target: https://pypi.org/project/django-rosetta/
@ -16,13 +16,12 @@ Rosetta is a `Django <http://www.djangoproject.com/>`_ application that facilita
Because it doesn't export any models, Rosetta doesn't create any tables in your project's database. Rosetta can be installed and uninstalled by simply adding and removing a single entry in your project's `INSTALLED_APPS` and a single line in your main ``urls.py`` file.
Note: as of version 0.7.13 django-rosetta requires Django 1.8 or later. As of version 0.9.0, django-rosetta requires Django 1.11 or later.
Note: as of version 0.9.0, django-rosetta requires Django 1.11 or later, as of version 0.9.6, django-rosetta requires Django 2.2 or later
********
Features
********
* Database independent
* Reads and writes your project's `gettext` catalogs (po and mo files)
* Installed and uninstalled in under a minute
* Uses Django's admin interface CSS

View file

@ -14,10 +14,11 @@ Install Rosetta
3. Add an URL entry to your project's ``urls.py``, for example::
from django.conf import settings
from django.conf.urls import include, re_path
if 'rosetta' in settings.INSTALLED_APPS:
urlpatterns += [
url(r'^rosetta/', include('rosetta.urls'))
re_path(r'^rosetta/', include('rosetta.urls'))
]

View file

@ -1,4 +1,4 @@
from django.conf.urls import url
from django.conf.urls import re_path
from django.urls import reverse_lazy
from django.views.generic.base import RedirectView
@ -6,40 +6,36 @@ from . import views
urlpatterns = [
url(r'^$',
re_path(
r'^$',
RedirectView.as_view(
url=reverse_lazy('rosetta-file-list', kwargs={'po_filter': 'project'}),
permanent=False
permanent=False,
),
name='rosetta-old-home-redirect',
),
url(r'^files/$',
),
re_path(
r'^files/$',
RedirectView.as_view(
url=reverse_lazy('rosetta-file-list', kwargs={'po_filter': 'project'}),
permanent=False
permanent=False,
),
name='rosetta-file-list-redirect',
),
url(r'^files/(?P<po_filter>[\w-]+)/$',
),
re_path(
r'^files/(?P<po_filter>[\w-]+)/$',
views.TranslationFileListView.as_view(),
name='rosetta-file-list',
),
url(r'^files/(?P<po_filter>[\w-]+)/(?P<lang_id>[\w\-_\.]+)/(?P<idx>\d+)/$',
),
re_path(
r'^files/(?P<po_filter>[\w-]+)/(?P<lang_id>[\w\-_\.]+)/(?P<idx>\d+)/$',
views.TranslationFormView.as_view(),
name='rosetta-form',
),
url(r'^files/(?P<po_filter>[\w-]+)/(?P<lang_id>[\w\-_\.]+)/(?P<idx>\d+)/download/$',
),
re_path(
r'^files/(?P<po_filter>[\w-]+)/(?P<lang_id>[\w\-_\.]+)/(?P<idx>\d+)/download/$',
views.TranslationFileDownload.as_view(),
name='rosetta-download-file',
),
url(r'^translate/$',
views.translate_text,
name='rosetta.translate_text',
),
),
re_path(r'^translate/$', views.translate_text, name='rosetta.translate_text'),
]

View file

@ -1,11 +1,13 @@
from django.conf.urls import include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf.urls import include, re_path
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
admin.autodiscover()
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^rosetta/', include('rosetta.urls'))
re_path(r'^admin/', admin.site.urls),
re_path(r'^rosetta/', include('rosetta.urls')),
]
urlpatterns += staticfiles_urlpatterns()

View file

@ -1,7 +1,6 @@
[tox]
envlist =
flake8,
py{36,37}-django{20,21},
py{36,37,38}-django{22,30,31},
gettext,
docs
@ -18,8 +17,6 @@ setenv =
PYTHONDONTWRITEBYTECODE=1
deps =
django20: Django==2.0.*
django21: Django>=2.1,<=2.1.99
django22: Django>=2.2.8,<=2.2.99
django30: Django>=3.0,<=3.0.99
django31: Django>=3.1,<=3.1.99
@ -46,6 +43,7 @@ commands =
msgfmt -c -o fr/LC_MESSAGES/django.mo fr/LC_MESSAGES/django.po
msgfmt -c -o hu/LC_MESSAGES/django.mo hu/LC_MESSAGES/django.po
msgfmt -c -o it/LC_MESSAGES/django.mo it/LC_MESSAGES/django.po
msgfmt -c -o ky/LC_MESSAGES/django.mo ky/LC_MESSAGES/django.po
msgfmt -c -o nl/LC_MESSAGES/django.mo nl/LC_MESSAGES/django.po
msgfmt -c -o pl/LC_MESSAGES/django.mo pl/LC_MESSAGES/django.po
msgfmt -c -o ru/LC_MESSAGES/django.mo ru/LC_MESSAGES/django.po