lms.djangoapps.static_template_view package#
Submodules#
lms.djangoapps.static_template_view.urls module#
URLs for static_template_view app
lms.djangoapps.static_template_view.views module#
- lms.djangoapps.static_template_view.views.index(request, template)#
- lms.djangoapps.static_template_view.views.render(request, template)#
This view function renders the template sent without checking that it exists. Do not expose template as a regex part of the url. The user should not be able to ender any arbitray template name. The correct usage would be:
url(r’^jobs$’, ‘static_template_view.views.render’, {‘template’: ‘jobs.html’}, name=”jobs”)
- lms.djangoapps.static_template_view.views.render_403(request, exception=None)#
Render the permission_denied template unless it’s a ratelimit exception in which case use the rate limit template.
- lms.djangoapps.static_template_view.views.render_404(request, exception=None)#
- lms.djangoapps.static_template_view.views.render_429(request, exception=None)#
Render the rate limit template as an HttpResponse.
- lms.djangoapps.static_template_view.views.render_500(request)#
Render the generic error page when we have an uncaught error.
- lms.djangoapps.static_template_view.views.render_press_release(request, slug)#
Render a press release given a slug. Similar to the “render” function above, but takes a slug and does a basic conversion to convert it to a template file. a) all lower case, b) convert dashes to underscores, and c) appending “.html”