Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
782e5f51
Commit
782e5f51
authored
Oct 11, 2012
by
Tom Giannattasio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
template for 404 and 500 errors
parent
5eb0ca69
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
1 deletions
+73
-1
cms/djangoapps/contentstore/views.py
+7
-0
cms/static/sass/_alerts.scss
+38
-0
cms/templates/error.html
+24
-0
cms/urls.py
+4
-1
No files found.
cms/djangoapps/contentstore/views.py
View file @
782e5f51
...
@@ -786,3 +786,9 @@ def static_pages(request, org, course, coursename):
...
@@ -786,3 +786,9 @@ def static_pages(request, org, course, coursename):
def
edit_static
(
request
,
org
,
course
,
coursename
):
def
edit_static
(
request
,
org
,
course
,
coursename
):
return
render_to_response
(
'edit-static-page.html'
,
{})
return
render_to_response
(
'edit-static-page.html'
,
{})
def
not_found
(
request
):
return
render_to_response
(
'error.html'
,
{
'error'
:
'404'
})
def
server_error
(
request
):
return
render_to_response
(
'error.html'
,
{
'error'
:
'500'
})
\ No newline at end of file
cms/static/sass/_alerts.scss
View file @
782e5f51
...
@@ -25,4 +25,41 @@
...
@@ -25,4 +25,41 @@
@include
orange-button
;
@include
orange-button
;
}
}
}
}
}
body
.error
{
background
:
$darkGrey
;
color
:
#3c3c3c
;
.primary-header
{
display
:
none
;
}
.error-prompt
{
width
:
700px
;
margin
:
150px
auto
;
padding
:
60px
50px
90px
;
border-radius
:
3px
;
background
:
#fff
;
text-align
:
center
;
}
h1
{
float
:
none
;
margin
:
0
;
font-size
:
60px
;
font-weight
:
300
;
color
:
#3c3c3c
;
}
.description
{
margin-bottom
:
50px
;
font-size
:
21px
;
}
.back-button
{
@include
blue-button
;
padding
:
14px
40px
18px
;
font-size
:
18px
;
}
}
}
\ No newline at end of file
cms/templates/error.html
0 → 100644
View file @
782e5f51
<
%
inherit
file=
"base.html"
/>
<
%!
from
django
.
core
.
urlresolvers
import
reverse
%
>
<
%
block
name=
"bodyclass"
>
error
</
%
block>
<
%
block
name=
"title"
>
% if error == '404':
404 - Page Not Found
% elif error == '500':
500 - Internal Server Error
% endif
</
%
block>
<
%
block
name=
"content"
>
<article
class=
"error-prompt"
>
% if error == '404':
<h1>
Hmm…
</h1>
<p
class=
"description"
>
we can't find that page.
</p>
% elif error == '500':
<h1>
Oops…
</h1>
<p
class=
"description"
>
there was a problem with the server.
</p>
% endif
<a
href=
"/"
class=
"back-button"
>
Back to dashboard
</a>
</article>
</
%
block>
\ No newline at end of file
cms/urls.py
View file @
782e5f51
...
@@ -35,7 +35,10 @@ urlpatterns = ('',
...
@@ -35,7 +35,10 @@ urlpatterns = ('',
url
(
r'^edit_static/(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<coursename>[^/]+)$'
,
'contentstore.views.edit_static'
,
name
=
'edit_static'
),
url
(
r'^edit_static/(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<coursename>[^/]+)$'
,
'contentstore.views.edit_static'
,
name
=
'edit_static'
),
# temporary landing page for a course
# temporary landing page for a course
url
(
r'^landing/(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<coursename>[^/]+)$'
,
'contentstore.views.landing'
,
name
=
'landing'
)
url
(
r'^landing/(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<coursename>[^/]+)$'
,
'contentstore.views.landing'
,
name
=
'landing'
),
url
(
r'^not_found$'
,
'contentstore.views.not_found'
,
name
=
'not_found'
),
url
(
r'^server_error$'
,
'contentstore.views.server_error'
,
name
=
'server_error'
)
)
)
...
...
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