Merge pull request #364 from ThomasWaldmann/py37
py37 and django2 fixes
This commit is contained in:
commit
a8128fe9e3
34
.travis.yml
34
.travis.yml
@ -4,16 +4,6 @@ language: python
|
||||
|
||||
os: linux
|
||||
|
||||
dist: trusty
|
||||
|
||||
python:
|
||||
- "2.7"
|
||||
- "pypy"
|
||||
- "3.4"
|
||||
- "3.5"
|
||||
- "3.6"
|
||||
- "3.6-dev"
|
||||
|
||||
env:
|
||||
global:
|
||||
- SECRET_KEY=justfortravis
|
||||
@ -22,24 +12,24 @@ env:
|
||||
- TEST_K="not ddns_client"
|
||||
- TEST_OPTS=""
|
||||
- COVERAGE=""
|
||||
matrix:
|
||||
- DJANGO=1.11
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
- python: "2.7"
|
||||
env: DJANGO=1.11
|
||||
- python: "3.6"
|
||||
env: DJANGO=1.11
|
||||
- python: "3.6-dev"
|
||||
env: DJANGO=1.11
|
||||
include:
|
||||
- python: "2.7"
|
||||
dist: trusty
|
||||
env: DJANGO=1.11 COVERAGE="coverage run -m" TEST_K="not ddns_client" TEST_OPTS="--pep8"
|
||||
- python: "3.6"
|
||||
- python: "3.4"
|
||||
dist: trusty
|
||||
env: DJANGO=1.11
|
||||
- python: "3.6-dev"
|
||||
env: DJANGO=2.0
|
||||
- python: "3.5"
|
||||
dist: trusty
|
||||
env: DJANGO=1.11
|
||||
- python: "3.6"
|
||||
dist: trusty
|
||||
env: DJANGO=1.11
|
||||
- python: "3.7"
|
||||
dist: xenial
|
||||
env: DJANGO=2.1
|
||||
|
||||
install:
|
||||
- ./scripts/travis/install.sh
|
||||
|
@ -15,7 +15,7 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='UserProfile',
|
||||
fields=[
|
||||
('user', models.OneToOneField(related_name='profile', primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL, verbose_name='user')),
|
||||
('user', models.OneToOneField(related_name='profile', primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL, verbose_name='user', on_delete=models.CASCADE)),
|
||||
('language', models.CharField(default=b'', choices=[(b'en', b'English'), (b'de', b'German'), (b'fr', b'French'), (b'it', b'Italian'), (b'pl', b'Polish'), (b'zh-cn', b'Chinese (China)')], max_length=10, blank=True, null=True, verbose_name='language')),
|
||||
],
|
||||
options={
|
||||
|
@ -1,22 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from django.conf.urls import url
|
||||
from django.contrib.auth.views import login, logout, password_reset, password_reset_done, \
|
||||
password_reset_confirm, password_reset_complete
|
||||
from django.contrib.auth.views import LoginView, LogoutView, \
|
||||
PasswordResetView, PasswordResetDoneView, PasswordResetConfirmView, PasswordResetCompleteView
|
||||
|
||||
urlpatterns = (
|
||||
# login and logout url
|
||||
url(r'^login/$', login, {'template_name': 'login.html'}, name='login'),
|
||||
url(r'^login/$', LoginView.as_view(), {'template_name': 'login.html'}, name='login'),
|
||||
# or use logout with template 'logout.html'
|
||||
url(r'^logout/$', logout, name='logout'),
|
||||
url(r'^logout/$', LogoutView.as_view(), name='logout'),
|
||||
|
||||
# password reset urls
|
||||
url(r'^password_reset/$', password_reset, {'template_name': 'password_reset.html'},
|
||||
url(r'^password_reset/$', PasswordResetView.as_view(), {'template_name': 'password_reset.html'},
|
||||
name='password_reset'),
|
||||
url(r'^password_reset_done/$', password_reset_done,
|
||||
url(r'^password_reset_done/$', PasswordResetDoneView.as_view(),
|
||||
{'template_name': 'password_reset_done.html'}, name='password_reset_done'),
|
||||
url(r'^password_reset_confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
|
||||
password_reset_confirm, {'template_name': 'password_reset_confirm.html'},
|
||||
PasswordResetConfirmView.as_view(), {'template_name': 'password_reset_confirm.html'},
|
||||
name='password_reset_confirm'),
|
||||
url(r'^password_reset_complete/$', password_reset_complete,
|
||||
url(r'^password_reset_complete/$', PasswordResetCompleteView.as_view(),
|
||||
{'template_name': 'password_reset_complete.html'}, name='password_reset_complete'),
|
||||
)
|
||||
|
@ -21,7 +21,7 @@ class Migration(migrations.Migration):
|
||||
('name_re', models.CharField(help_text='Blacklisted domain. Evaluated as regex (search).', unique=True, max_length=255)),
|
||||
('last_update', models.DateTimeField(auto_now=True)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
('created_by', models.ForeignKey(related_name=u'blacklisted_domains', to=settings.AUTH_USER_MODEL)),
|
||||
('created_by', models.ForeignKey(related_name=u'blacklisted_domains', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
},
|
||||
@ -40,7 +40,7 @@ class Migration(migrations.Migration):
|
||||
('comment', models.CharField(default=b'', max_length=255, null=True, help_text='Some arbitrary comment about your domain. If your domain is public, the comment will be also publicly shown.', blank=True)),
|
||||
('last_update', models.DateTimeField(auto_now=True)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
('created_by', models.ForeignKey(related_name=u'domains', to=settings.AUTH_USER_MODEL)),
|
||||
('created_by', models.ForeignKey(related_name=u'domains', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
},
|
||||
@ -68,8 +68,8 @@ class Migration(migrations.Migration):
|
||||
('tls_update_ipv6', models.BooleanField(default=False)),
|
||||
('last_update', models.DateTimeField(auto_now=True)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
('created_by', models.ForeignKey(related_name=u'hosts', to=settings.AUTH_USER_MODEL)),
|
||||
('domain', models.ForeignKey(to='main.Domain')),
|
||||
('created_by', models.ForeignKey(related_name=u'hosts', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)),
|
||||
('domain', models.ForeignKey(to='main.Domain', on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
},
|
||||
@ -84,7 +84,7 @@ class Migration(migrations.Migration):
|
||||
('interface_id_ipv4', models.CharField(default=b'', help_text='The IPv4 interface ID of this host. Use IPv4 notation.', max_length=16)),
|
||||
('interface_id_ipv6', models.CharField(default=b'', help_text='The IPv6 interface ID of this host. Use IPv6 notation.', max_length=22)),
|
||||
('available', models.BooleanField(default=True, help_text="Check if host is available/in use - if not checked, we won't accept updates for this host")),
|
||||
('main_host', models.ForeignKey(related_name=u'relatedhosts', to='main.Host')),
|
||||
('main_host', models.ForeignKey(related_name=u'relatedhosts', to='main.Host', on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
},
|
||||
@ -103,7 +103,7 @@ class Migration(migrations.Migration):
|
||||
('accept_ipv6', models.BooleanField(default=False)),
|
||||
('last_update', models.DateTimeField(auto_now=True)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
('created_by', models.ForeignKey(related_name=u'serviceupdater', to=settings.AUTH_USER_MODEL)),
|
||||
('created_by', models.ForeignKey(related_name=u'serviceupdater', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
},
|
||||
@ -121,9 +121,9 @@ class Migration(migrations.Migration):
|
||||
('give_ipv6', models.BooleanField(default=False)),
|
||||
('last_update', models.DateTimeField(auto_now=True)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
('created_by', models.ForeignKey(related_name=u'serviceupdaterhostconfigs', to=settings.AUTH_USER_MODEL)),
|
||||
('host', models.ForeignKey(related_name=u'serviceupdaterhostconfigs', to='main.Host')),
|
||||
('service', models.ForeignKey(to='main.ServiceUpdater')),
|
||||
('created_by', models.ForeignKey(related_name=u'serviceupdaterhostconfigs', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)),
|
||||
('host', models.ForeignKey(related_name=u'serviceupdaterhostconfigs', to='main.Host', on_delete=models.CASCADE)),
|
||||
('service', models.ForeignKey(to='main.ServiceUpdater', on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
},
|
||||
|
@ -47,7 +47,7 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='blacklistedhost',
|
||||
name='created_by',
|
||||
field=models.ForeignKey(related_name='blacklisted_domains', verbose_name='created by', to=settings.AUTH_USER_MODEL),
|
||||
field=models.ForeignKey(related_name='blacklisted_domains', verbose_name='created by', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
@ -83,7 +83,7 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='domain',
|
||||
name='created_by',
|
||||
field=models.ForeignKey(related_name='domains', verbose_name='created by', to=settings.AUTH_USER_MODEL),
|
||||
field=models.ForeignKey(related_name='domains', verbose_name='created by', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
@ -167,13 +167,13 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='host',
|
||||
name='created_by',
|
||||
field=models.ForeignKey(related_name='hosts', verbose_name='created by', to=settings.AUTH_USER_MODEL),
|
||||
field=models.ForeignKey(related_name='hosts', verbose_name='created by', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='host',
|
||||
name='domain',
|
||||
field=models.ForeignKey(verbose_name='domain', to='main.Domain'),
|
||||
field=models.ForeignKey(verbose_name='domain', to='main.Domain', on_delete=models.CASCADE),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
@ -269,7 +269,7 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='relatedhost',
|
||||
name='main_host',
|
||||
field=models.ForeignKey(related_name='relatedhosts', verbose_name='main host', to='main.Host'),
|
||||
field=models.ForeignKey(related_name='relatedhosts', verbose_name='main host', to='main.Host', on_delete=models.CASCADE),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
@ -305,7 +305,7 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='serviceupdater',
|
||||
name='created_by',
|
||||
field=models.ForeignKey(related_name='serviceupdater', verbose_name='created by', to=settings.AUTH_USER_MODEL),
|
||||
field=models.ForeignKey(related_name='serviceupdater', verbose_name='created by', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
@ -353,7 +353,7 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='serviceupdaterhostconfig',
|
||||
name='created_by',
|
||||
field=models.ForeignKey(related_name='serviceupdaterhostconfigs', verbose_name='created by', to=settings.AUTH_USER_MODEL),
|
||||
field=models.ForeignKey(related_name='serviceupdaterhostconfigs', verbose_name='created by', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
@ -371,7 +371,7 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='serviceupdaterhostconfig',
|
||||
name='host',
|
||||
field=models.ForeignKey(related_name='serviceupdaterhostconfigs', verbose_name='host', to='main.Host'),
|
||||
field=models.ForeignKey(related_name='serviceupdaterhostconfigs', verbose_name='host', to='main.Host', on_delete=models.CASCADE),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
@ -401,7 +401,7 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='serviceupdaterhostconfig',
|
||||
name='service',
|
||||
field=models.ForeignKey(verbose_name='service', to='main.ServiceUpdater'),
|
||||
field=models.ForeignKey(verbose_name='service', to='main.ServiceUpdater', on_delete=models.CASCADE),
|
||||
preserve_default=True,
|
||||
),
|
||||
]
|
||||
|
@ -156,7 +156,7 @@ TEMPLATES = [
|
||||
},
|
||||
]
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
MIDDLEWARE = (
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
|
@ -19,9 +19,9 @@ WWW_IPV6_HOST = 'ip6-localhost:8000'
|
||||
|
||||
# ALLOWED_HOSTS is not needed here, as DEBUG is True
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
MIDDLEWARE = (
|
||||
'debug_toolbar.middleware.DebugToolbarMiddleware',
|
||||
) + MIDDLEWARE_CLASSES
|
||||
) + MIDDLEWARE
|
||||
INTERNAL_IPS = ['127.0.0.1', '::1', ] # needed for DebugToolbar!
|
||||
|
||||
DEBUG_TOOLBAR_PATCH_SETTINGS = False
|
||||
|
@ -29,7 +29,7 @@ urlpatterns = [
|
||||
url(r'^accounts/', include('nsupdate.login.urls')),
|
||||
# registration and user settings
|
||||
url(r'^account/', include('nsupdate.accounts.urls')),
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
url(r'^admin/', include((admin.site.get_urls(), 'admin'), namespace='admin')),
|
||||
url(r'^i18n/', include('django.conf.urls.i18n')),
|
||||
url(r'^', include('nsupdate.main.urls')),
|
||||
]
|
||||
|
3
setup.py
3
setup.py
@ -48,7 +48,7 @@ setup(
|
||||
install_requires=[
|
||||
'dnspython',
|
||||
'netaddr',
|
||||
'django~=1.11.0',
|
||||
'django',
|
||||
'django-bootstrap-form',
|
||||
'django-registration-redux',
|
||||
'django-extensions',
|
||||
@ -68,6 +68,7 @@ setup(
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Topic :: Internet :: Name Service (DNS)',
|
||||
],
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user