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
d7061007
Unverified
Commit
d7061007
authored
Dec 06, 2016
by
Thom Wiggers
📐
Browse files
Crash test dummy
parent
3964929a
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/thaliawebsite/urls.py
View file @
d7061007
...
...
@@ -98,5 +98,7 @@ urlpatterns = [
url
(
r
'^tinymce/'
,
include
(
'tinymce.urls'
)),
# Javascript translation catalog
url
(
r
'jsi18n/$'
,
JavaScriptCatalog
.
as_view
(),
name
=
'javascript-catalog'
),
# XXX
url
(
r
'crash/$'
,
views
.
crash
),
]
+
static
(
settings
.
MEDIA_URL
+
'public/'
,
document_root
=
os
.
path
.
join
(
settings
.
MEDIA_ROOT
,
'public'
))
website/thaliawebsite/views.py
View file @
d7061007
from
django.conf
import
settings
from
django.contrib.auth
import
authenticate
from
django.contrib.admin.views.decorators
import
staff_member_required
from
django.http
import
(
HttpResponseBadRequest
,
HttpResponseForbidden
,
JsonResponse
)
from
django.utils
import
timezone
...
...
@@ -43,3 +44,8 @@ def wiki_login(request):
return
JsonResponse
({
'status'
:
'error'
,
'msg'
:
'Authentication Failed'
},
status_code
=
403
)
@
staff_member_required
def
crash
(
request
):
raise
Exception
(
"Test exception"
)
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