Skip to content
GitLab
Menu
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
ce5c00eb
Verified
Commit
ce5c00eb
authored
May 31, 2017
by
Sébastiaan Versteeg
Browse files
Add NamespaceVersioning to Django
parent
132422fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
website/events/templates/events/index.html
View file @
ce5c00eb
...
...
@@ -35,10 +35,10 @@
<script>
$
(
document
).
ready
(
function
()
{
var
sources
=
{
events
:
"
/api/events/calendarjs
"
,
birthdays
:
"
/api/members/birthdays
"
,
partners
:
"
/api/partners/events
"
,
unpublishedEvents
:
"
/api/events/unpublished
"
events
:
"
/api/
v1/
events/calendarjs
"
,
birthdays
:
"
/api/
v1/
members/birthdays
"
,
partners
:
"
/api/
v1/
partners/events
"
,
unpublishedEvents
:
"
/api/
v1/
events/unpublished
"
};
...
...
website/thaliapp/urls.py
View file @
ce5c00eb
...
...
@@ -5,7 +5,6 @@ from . import views
app_name
=
"thaliapp"
urlpatterns
=
[
url
(
r
'^token-auth/'
,
rfviews
.
obtain_auth_token
),
url
(
r
'^login'
,
views
.
login
,
name
=
'thaliapp-login'
),
url
(
r
'^app'
,
views
.
app
,
...
...
website/thaliawebsite/settings/settings.py
View file @
ce5c00eb
...
...
@@ -171,6 +171,8 @@ REST_FRAMEWORK = {
),
'DEFAULT_PAGINATION_CLASS'
:
'rest_framework.pagination.LimitOffsetPagination'
,
'DEFAULT_VERSIONING_CLASS'
:
'rest_framework.versioning.NamespaceVersioning'
,
}
# Internationalization
...
...
website/thaliawebsite/urls.py
View file @
ce5c00eb
...
...
@@ -32,23 +32,23 @@ import os.path
from
django.conf
import
settings
from
django.conf.urls
import
include
,
url
from
django.conf.urls.static
import
static
from
django.contrib.auth.views
import
login
from
django.contrib
import
admin
from
django.contrib.auth.views
import
login
from
django.contrib.sitemaps.views
import
sitemap
from
django.views.generic
import
TemplateView
from
django.views.i18n
import
JavaScriptCatalog
from
rest_framework.authtoken
import
views
as
rfviews
import
members
from
activemembers.sitemaps
import
sitemap
as
activemembers_sitemap
from
documents.sitemaps
import
sitemap
as
documents_sitemap
from
events.feeds
import
DeprecationFeed
from
events.sitemaps
import
sitemap
as
events_sitemap
from
members.sitemaps
import
sitemap
as
members_sitemap
from
partners.sitemaps
import
sitemap
as
partners_sitemap
from
thabloid.sitemaps
import
sitemap
as
thabloid_sitemap
from
events.sitemaps
import
sitemap
as
events_sitemap
from
thaliawebsite.forms
import
AuthenticationForm
from
utils.views
import
private_thumbnails
,
generate_thumbnail
from
.
import
views
from
.sitemaps
import
StaticViewSitemap
...
...
@@ -100,11 +100,14 @@ urlpatterns = [
url
(
r
'^private-thumbnails/(?P<size_fit>\d+x\d+_[01])/(?P<path>.*)'
,
private_thumbnails
,
name
=
'private-thumbnails'
),
url
(
r
'^generate-thumbnail/(?P<size_fit>\d+x\d+_[01])/(?P<path>[^/]+)/(?P<thumbpath>[^/]+)'
,
generate_thumbnail
,
name
=
'generate-thumbnail'
),
url
(
r
'^api/'
,
include
([
url
(
r
'^'
,
include
(
'events.api.urls'
)),
url
(
r
'^'
,
include
(
'members.api.urls'
)),
url
(
r
'^'
,
include
(
'partners.api.urls'
)),
url
(
r
'^'
,
include
(
'thaliapp.urls'
)),
url
(
r
'wikilogin'
,
views
.
wiki_login
),
url
(
r
'^v1/'
,
include
([
url
(
r
'^token-auth'
,
rfviews
.
obtain_auth_token
),
url
(
r
'^'
,
include
(
'events.api.urls'
)),
url
(
r
'^'
,
include
(
'members.api.urls'
)),
url
(
r
'^'
,
include
(
'partners.api.urls'
)),
],
namespace
=
'v1'
)),
url
(
r
'^'
,
include
(
'thaliapp.urls'
)),
])),
url
(
r
'^education/'
,
include
(
'education.urls'
)),
url
(
r
'^announcements/'
,
include
(
'announcements.urls'
)),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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