Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
6b1a4386
Commit
6b1a4386
authored
Feb 16, 2014
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Override server error handler to get own context processors into this page
parent
65206abe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
weblate/trans/views/basic.py
weblate/trans/views/basic.py
+15
-0
weblate/urls.py
weblate/urls.py
+2
-0
No files found.
weblate/trans/views/basic.py
View file @
6b1a4386
...
...
@@ -27,6 +27,7 @@ from django.db.models import Sum, Count, Q
from
django.core.paginator
import
Paginator
,
EmptyPage
,
PageNotAnInteger
from
django.core.urlresolvers
import
reverse
from
django.utils.safestring
import
mark_safe
import
django.views.defaults
from
weblate.trans.models
import
(
Project
,
SubProject
,
Translation
,
Check
,
...
...
@@ -404,6 +405,20 @@ def not_found(request):
)
def
server_error
(
request
):
'''
Error handler for server erros.
'''
try
:
return
render
(
request
,
'500.html'
,
status
=
500
)
except
Exception
:
return
django
.
views
.
defaults
.
server_error
(
request
)
def
about
(
request
):
'''
Shows about page with version information.
...
...
weblate/urls.py
View file @
6b1a4386
...
...
@@ -53,6 +53,8 @@ admin.autodiscover()
handler404
=
'weblate.trans.views.basic.not_found'
handler500
=
'weblate.trans.views.basic.server_error'
admin
.
site
.
index_template
=
'admin/custom-index.html'
urlpatterns
=
patterns
(
...
...
Write
Preview
Markdown
is supported
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