Fix compatibility issues

parent 46306a40
# Generated by Django 2.0rc1 on 2017-11-29 20:29
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('activemembers', '0023_auto_20171013_1416'),
]
operations = [
migrations.AlterField(
model_name='committee',
name='contact_mailinglist',
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='mailinglists.MailingList', verbose_name='contact mailing list'),
),
]
# Generated by Django 2.0rc1 on 2017-11-29 20:29
import datetime
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.query_utils
class Migration(migrations.Migration):
dependencies = [
('events', '0021_auto_20171013_1419'),
]
operations = [
migrations.AlterField(
model_name='registration',
name='member',
field=models.ForeignKey(blank=True, limit_choices_to=django.db.models.query_utils.Q(('membership__until__isnull', True), ('membership__until__gt', datetime.date(2017, 11, 29)), _connector='OR'), null=True, on_delete=django.db.models.deletion.CASCADE, to='members.Member'),
),
]
......@@ -2,9 +2,10 @@ import uuid
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
from django.core import urlresolvers, validators
from django.core import validators
from django.core.exceptions import ValidationError
from django.db import models
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
......@@ -264,6 +265,7 @@ class Registration(Entry):
class Renewal(Entry):
member = models.ForeignKey(
'members.Member',
on_delete=models.CASCADE,
verbose_name=_('member'),
blank=False,
null=False,
......@@ -390,7 +392,7 @@ class Payment(models.Model):
def get_admin_url(self):
content_type = ContentType.objects.get_for_model(self.__class__)
return urlresolvers.reverse("admin:%s_%s_change" % (
return reverse("admin:%s_%s_change" % (
content_type.app_label, content_type.model), args=(self.id,))
class Meta:
......
......@@ -174,7 +174,7 @@ REST_FRAMEWORK = {
'DEFAULT_PAGINATION_CLASS':
'rest_framework.pagination.LimitOffsetPagination',
'DEFAULT_VERSIONING_CLASS':
'rest_framework.versioning.NamespaceVersioning',
'rest_framework.versioning.URLPathVersioning',
}
# Internationalization
......
......@@ -105,7 +105,7 @@ urlpatterns = [
url(r'^', include('mailinglists.api.urls')),
url(r'^', include('pizzas.api.urls')),
url(r'^', include('pushnotifications.api.urls')),
], namespace='v1')),
])),
])),
url(r'^education/', include('education.urls')),
url(r'^announcements/', include('announcements.urls')),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment