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
a46f87d9
Commit
a46f87d9
authored
Jun 02, 2016
by
Brian Jacobel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add docstrings
parent
dfd684ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
common/djangoapps/pipeline_mako/templates/static_content.html
+10
-0
No files found.
common/djangoapps/pipeline_mako/templates/static_content.html
View file @
a46f87d9
...
...
@@ -78,6 +78,11 @@ source, template_path = Loader(engine).load_template_source(path)
%
>
${source | n, decode.utf8}
</
%
def>
<
%
def
name=
"require_module(module_name, class_name)"
>
<
%
doc
>
Loads Javascript onto your page synchronously.
Uses RequireJS in development and a plain script tag in production.
Use this form of require_module for all new code.
</
%
doc>
% if not settings.REQUIRE_DEBUG:
<script
type=
"text/javascript"
src=
"${staticfiles_storage.url(module_name + '.js') + '?raw'}"
></script>
% endif
...
...
@@ -91,6 +96,11 @@ source, template_path = Loader(engine).load_template_source(path)
</
%
def>
<
%
def
name=
"require_module_async(module_name, class_name)"
>
<
%
doc
>
Legacy mode of require_module that operates asynchronously, required for certain edge cases
(notably where Javascript is required outside of a
<
%
block
name=
"js_extra"
or
"
headextra
").
Do
not
use
for
any
new
code
;
instead
create
a
factory
and
use
require_module
above
.
</%
doc
>
<script
type=
"text/javascript"
>
(
function
(
require
)
{
%
if
settings
.
REQUIRE_DEBUG
:
...
...
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