summaryrefslogtreecommitdiffstats
path: root/askbot/skins
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2013-03-14 16:46:17 -0500
committerTyler Mandry <tmandry@gmail.com>2013-03-16 01:10:50 -0500
commitdcb2cf752a24ef78899bdcef65962c93cda40855 (patch)
tree87aebd64cd74b9c98283d7533a6923de3065669d /askbot/skins
parentcb0c3f008a8d71b84ce3412c065b67250ee284a5 (diff)
downloadaskbot-dcb2cf752a24ef78899bdcef65962c93cda40855.tar.gz
askbot-dcb2cf752a24ef78899bdcef65962c93cda40855.tar.bz2
askbot-dcb2cf752a24ef78899bdcef65962c93cda40855.zip
Add ability to use LESS development mode with extra.less
Diffstat (limited to 'askbot/skins')
-rw-r--r--askbot/skins/loaders.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/askbot/skins/loaders.py b/askbot/skins/loaders.py
index 50276f34..367433eb 100644
--- a/askbot/skins/loaders.py
+++ b/askbot/skins/loaders.py
@@ -59,9 +59,15 @@ class SkinEnvironment(CoffinEnvironment):
or empty string - depending on the existence of file
SKIN_PATH/media/style/extra.css
"""
- url = utils.get_media_url('style/extra.css', ignore_missing = True)
+ url = None
+ if django_settings.ASKBOT_CSS_DEVEL is True:
+ url = utils.get_media_url('style/extra.less', ignore_missing = True)
+ rel = "stylesheet/less"
+ if url is None:
+ url = utils.get_media_url('style/extra.css', ignore_missing = True)
+ rel = "stylesheet"
if url is not None:
- return '<link href="%s" rel="stylesheet" type="text/css" />' % url
+ return '<link href="%s" rel="%s" type="text/css" />' % (url, rel)
return ''
def load_skins():