Skip to content

Commit

Permalink
Merge branch 'release/1.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
asyncee committed Oct 11, 2015
2 parents e197cac + 5d36cc0 commit 4c71409
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ in admin.
---------------


Project aims to support **Python 2.7**, **3.3** and **3.4**,
Project aims to support **Python 2.7** and **3.4** (at least),
**Django 1.6**, **1.7** and **1.8**.


Expand Down
5 changes: 4 additions & 1 deletion easy_select2/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

import django
from django import forms
from django.templatetags.static import static
from django.contrib.staticfiles.storage import staticfiles_storage
from django.conf import settings
from django.utils.safestring import mark_safe


static = staticfiles_storage.url


SELECT2_JS = getattr(
settings,
'SELECT2_JS',
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def run_tests(self):
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Software Development :: Widget Sets',
],
Expand Down
18 changes: 18 additions & 0 deletions tests/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,21 @@ def test_select2mixin_render(mocked):
result = s.render(attrs={'id': 'some_id'})
expected = "supersome_js"
assert result == expected


def test_staticfiles_url(settings):
js = widgets.SELECT2_WIDGET_JS
css = widgets.SELECT2_WIDGET_CSS

def all_startswith(string, iterable):
return all([x.startswith(string) for x in iterable])

assert all_startswith(
settings.STATIC_URL,
js,
)
for k, v in css.items():
assert all_startswith(
settings.STATIC_URL,
v,
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{27,33,34}-{django16,django17,django18},coverage
envlist = py{27,34}-{django16,django17,django18},coverage

[base]
deps =
Expand Down

0 comments on commit 4c71409

Please sign in to comment.