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
75ff35e2
Commit
75ff35e2
authored
May 20, 2014
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proxy raw further along
parent
8080261a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
common/djangoapps/pipeline_mako/__init__.py
+8
-6
common/djangoapps/pipeline_mako/templates/static_content.html
+1
-1
lms/templates/textannotation.html
+2
-2
No files found.
common/djangoapps/pipeline_mako/__init__.py
View file @
75ff35e2
...
...
@@ -6,7 +6,7 @@ from pipeline.utils import guess_type
from
static_replace
import
try_staticfiles_lookup
def
compressed_css
(
package_name
):
def
compressed_css
(
package_name
,
raw
=
False
):
package
=
settings
.
PIPELINE_CSS
.
get
(
package_name
,
{})
if
package
:
package
=
{
package_name
:
package
}
...
...
@@ -15,17 +15,19 @@ def compressed_css(package_name):
package
=
packager
.
package_for
(
'css'
,
package_name
)
if
settings
.
PIPELINE
:
return
render_css
(
package
,
package
.
output_filename
)
return
render_css
(
package
,
package
.
output_filename
,
raw
=
raw
)
else
:
paths
=
packager
.
compile
(
package
.
paths
)
return
render_individual_css
(
package
,
paths
)
return
render_individual_css
(
package
,
paths
,
raw
=
raw
)
def
render_css
(
package
,
path
):
def
render_css
(
package
,
path
,
raw
=
False
):
template_name
=
package
.
template_name
or
"mako/css.html"
context
=
package
.
extra_context
url
=
try_staticfiles_lookup
(
path
)
if
raw
:
url
+=
"?raw"
context
.
update
({
'type'
:
guess_type
(
path
,
'text/css'
),
'url'
:
url
,
...
...
@@ -33,8 +35,8 @@ def render_css(package, path):
return
render_to_string
(
template_name
,
context
)
def
render_individual_css
(
package
,
paths
):
tags
=
[
render_css
(
package
,
path
)
for
path
in
paths
]
def
render_individual_css
(
package
,
paths
,
raw
=
False
):
tags
=
[
render_css
(
package
,
path
,
raw
)
for
path
in
paths
]
return
'
\n
'
.
join
(
tags
)
...
...
common/djangoapps/pipeline_mako/templates/static_content.html
View file @
75ff35e2
...
...
@@ -12,7 +12,7 @@ except:
<
%
def
name=
'css(group, raw=False)'
>
% if settings.FEATURES['USE_DJANGO_PIPELINE']:
${compressed_css(group)}
${compressed_css(group
, raw=raw
)}
% else:
% for filename in settings.PIPELINE_CSS[group]['source_filenames']:
<link
rel=
"stylesheet"
href=
"${staticfiles_storage.url(filename.replace('.scss', '.css'))}${"
?
raw
"
if
raw
else
""}"
type=
"text/css"
media=
"all"
/ >
...
...
lms/templates/textannotation.html
View file @
75ff35e2
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
<
%
namespace
name=
'static'
file=
'/static_content.html'
/>
<
%
static:css
group=
'style-vendor-tinymce-content'
raw=
True
/>
<
%
static:css
group=
'style-vendor-tinymce-skin'
raw=
True
/>
${static.css(group='style-vendor-tinymce-content', raw=True)}
${static.css(group='style-vendor-tinymce-skin', raw=True)}
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/tinymce/js/tinymce/tinymce.full.min.js', raw=True)}"
/>
<
script
type
=
"text/javascript"
src
=
"${static.url('js/vendor/tinymce/js/tinymce/jquery.tinymce.min.js', raw=True)}"
/>
...
...
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