Skip to content

Commit

Permalink
django 2.0 on the way
Browse files Browse the repository at this point in the history
  • Loading branch information
benzkji committed May 1, 2018
1 parent fd7e729 commit 68ad26f
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 34 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
==== 0.0.1 ===

- initial release
- support for django 1.11+
- support for custom user model still experimental, as nobody uses this, and it's hard to test.
5 changes: 0 additions & 5 deletions makemessages.sh

This file was deleted.

2 changes: 2 additions & 0 deletions separate_users/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@
'django.middleware.locale.LocaleMiddleware',
)

MIDDLEWARE = MIDDLEWARE_CLASSES

INSTALLED_APPS = EXTERNAL_APPS + INTERNAL_APPS
COVERAGE_MODULE_EXCLUDES += EXTERNAL_APPS

Expand Down
4 changes: 2 additions & 2 deletions separate_users/tests/test_app/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Migration(migrations.Migration):
},
bases=('auth.user',),
managers=[
(b'objects', separate_users.models.EditorManager()),
('objects', separate_users.models.EditorManager()),
],
),
migrations.CreateModel(
Expand All @@ -33,7 +33,7 @@ class Migration(migrations.Migration):
},
bases=('auth.user',),
managers=[
(b'objects', separate_users.models.FrontendUserManager()),
('objects', separate_users.models.FrontendUserManager()),
],
),
]
11 changes: 9 additions & 2 deletions separate_users/tests/test_permissions.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# -*- coding: utf-8 -*-
from django.contrib.auth.models import Permission
from django.core.urlresolvers import reverse
from django.test import Client
# from django.test import Client
from django.test import TestCase


# compat
import django
if django.VERSION[:2] < (1, 10):
from django.core.urlresolvers import reverse
else:
from django.urls import reverse


class PermissionsTestCase(TestCase):
"""
check if permissions are there, after management command was run.
Expand Down
4 changes: 2 additions & 2 deletions separate_users/tests/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""URLs to run the tests."""
from django.conf.urls import include, url
from django.conf.urls import url
from django.contrib import admin


urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^admin/', admin.site.urls),
]
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def read(fname):
packages=find_packages(),
install_requires=(
# 'Django>=1.3,<1.5', # no need to limit while in development
'Django>=1.8',
'Django>=1.11',
),
include_package_data=True,
zip_safe=False,
Expand Down
30 changes: 8 additions & 22 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@

[tox]
envlist = django18, django19, django110, django111
envlist = py{27,36}-django{111,20}

[testenv]
commands = python manage.py test
setenv =
DJANGO_SETTINGS_MODULE=separate_users.tests.settings
PYTHONPATH={toxinidir}

[base]
deps =
django111: Django>=1.11,<2.0
django20: Django>=2.0,<2.1
coverage
django-coverage
flake8

[testenv:django18]
deps =
{[base]deps}
django>=1.8, <1.9

[testenv:django19]
[testenv:py27-django20]
whitelist_externals = echo
deps =
{[base]deps}
django>=1.9, <1.10
commands= echo "no django 2.0 on python 2.7!"

[testenv:django110]
deps =
{[base]deps}
django>=1.10, <1.11

[testenv:django111]
deps =
{[base]deps}
django>=1.11, <1.12
[testenv:flake8]
commands = flake8
2 changes: 2 additions & 0 deletions compilemessages.sh → translations.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@


cd separate_users
django-admin.py makemessages -l en -l de -l fr
django-admin.py compilemessages
cd ..

0 comments on commit 68ad26f

Please sign in to comment.