Skip to content

Commit

Permalink
[deps] Updated dependencies + django 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Aug 16, 2020
1 parent 42ee1e5 commit 00ade2c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 21 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ python:
- "3.7"

env:
- DJANGO="django>=2.2,<2.3"
- DJANGO="django>=3.0,<3.1"
- DJANGO="django~=2.2"
- DJANGO="django~=3.0"
- DJANGO="django~=3.1"

branches:
only:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Reusable django-app for storing GIS and indoor coordinates of objects.
Dependencies
------------

* Python >= 3.5
* Python >= 3.6
* GeoDjango (`see GeoDjango Install Instructions <https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#requirements>`_)
* One of the databases supported by GeoDjango

Expand Down
5 changes: 4 additions & 1 deletion django_loci/base/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,11 @@ class Media:
js = (
'admin/js/jquery.init.js',
'django-loci/js/loci.js',
'django-loci/js/floorplan-widget.js',
)
css = {'all': ('django-loci/css/loci.css',)}
css = {
'all': ('django-loci/css/loci.css', 'django-loci/css/floorplan-widget.css')
}

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Expand Down
13 changes: 0 additions & 13 deletions django_loci/widgets.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import logging

from django import forms
from django.templatetags.static import static
from leaflet.forms.widgets import LeafletWidget as BaseLeafletWidget

logger = logging.getLogger(__name__)
_floorplan_css = {'all': (static('django-loci/css/floorplan-widget.css'),)}


class ImageWidget(forms.FileInput):
Expand Down Expand Up @@ -36,11 +34,6 @@ def get_context(self, name, value, attrs):
logger.error(msg.format(value.name))
return c

@property
def media(self):
css = _floorplan_css
return forms.Media(css=css)


class FloorPlanWidget(forms.TextInput):
"""
Expand All @@ -49,12 +42,6 @@ class FloorPlanWidget(forms.TextInput):

template_name = 'admin/widgets/floorplan.html'

@property
def media(self):
js = (static('django-loci/js/floorplan-widget.js'),)
css = _floorplan_css
return forms.Media(js=js, css=css)


class LeafletWidget(BaseLeafletWidget):
include_media = True
Expand Down
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ attrs>=17.4.0
pytest-django>=3.4.2,<3.10.0
pytest-asyncio>=0.10.0,<0.15.0
pytest-cov>=2.7.0,<2.11.0
openwisp-utils[qa]~=0.5.1
openwisp-utils[qa]~=0.6.0
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
django>=2.2,<3.1
django>=2.2,<3.2
django-leaflet>=0.23,<0.28
channels>=2.1.3,<2.5.0
channels>=2.3.0,<2.5.0
Pillow~=7.2.0
openwisp-utils~=0.5.1
openwisp-utils~=0.6.0

0 comments on commit 00ade2c

Please sign in to comment.