Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
2d71b8a5
Unverified
Commit
2d71b8a5
authored
Nov 29, 2017
by
Thom Wiggers
📐
Browse files
Fix compatibility issues
parent
46306a40
Changes
5
Hide whitespace changes
Inline
Side-by-side
website/activemembers/migrations/0024_auto_20171129_2129.py
0 → 100644
View file @
2d71b8a5
# 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'
),
),
]
website/events/migrations/0022_auto_20171129_2129.py
0 → 100644
View file @
2d71b8a5
# 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'
),
),
]
website/registrations/models.py
View file @
2d71b8a5
...
...
@@ -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
:
...
...
website/thaliawebsite/settings/settings.py
View file @
2d71b8a5
...
...
@@ -174,7 +174,7 @@ REST_FRAMEWORK = {
'DEFAULT_PAGINATION_CLASS'
:
'rest_framework.pagination.LimitOffsetPagination'
,
'DEFAULT_VERSIONING_CLASS'
:
'rest_framework.versioning.
Namespace
Versioning'
,
'rest_framework.versioning.
URLPath
Versioning'
,
}
# Internationalization
...
...
website/thaliawebsite/urls.py
View file @
2d71b8a5
...
...
@@ -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'
)),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment