Skip to content

Commit

Permalink
Merge pull request #171 from tam0407/fix/use-current-selectable-versi…
Browse files Browse the repository at this point in the history
…on-instead-of-pipy-version

Fix use current selectable version instead of pipy version
  • Loading branch information
mlavin committed Jun 16, 2016
2 parents f722bd2 + 044e187 commit 6a9e8e7
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ Rebecca Lovewell
Thomas Güttler
Yuri Khrustalev
@SaeX
Tam Huynh

Thanks for all of your work!
2 changes: 1 addition & 1 deletion example/core/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import unicode_literals

from six import python_2_unicode_compatible
from django.utils.six import python_2_unicode_compatible

try:
from localflavor.us.models import USStateField
Expand Down
4 changes: 4 additions & 0 deletions example/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
import os
import sys


# add parent path to PYTHONPATH so we can use current selectable package instead of installing it from pipy
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example.settings")

Expand Down
1 change: 0 additions & 1 deletion example/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
django>=1.4
django-localflavor
django-selectable
2 changes: 1 addition & 1 deletion selectable/templatetags/selectable_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ def include_jquery_libs(version='1.11.2', ui='1.11.3'):


@register.inclusion_tag('selectable/jquery-css.html')
def include_ui_theme(theme='base', version='1.11.3'):
def include_ui_theme(theme='smoothness', version='1.11.3'):
return {'theme': theme, 'version': version}
6 changes: 3 additions & 3 deletions selectable/tests/test_templatetags.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ def test_render(self):
template = Template("{% load selectable_tags %}{% include_ui_theme %}")
context = Context({})
result = template.render(context)
self.assertUICSS(result, 'base', '1.11.3')
self.assertUICSS(result, 'smoothness', '1.11.3')

def test_render_version(self):
"Render template tag with alternate version."
template = Template("{% load selectable_tags %}{% include_ui_theme 'base' '1.8.13' %}")
context = Context({})
result = template.render(context)
self.assertUICSS(result, 'base', '1.8.13')

def test_variable_version(self):
"Render using version from content variable."
version = '1.8.13'
Expand All @@ -105,7 +105,7 @@ def test_render_theme(self):
context = Context({})
result = template.render(context)
self.assertUICSS(result, 'ui-lightness', '1.11.3')

def test_variable_theme(self):
"Render using theme from content variable."
theme = 'ui-lightness'
Expand Down

0 comments on commit 6a9e8e7

Please sign in to comment.