Commit c41c9b27 authored by Denis Laxalde's avatar Denis Laxalde
Browse files

Get rid of cwtags dependency

cwtags is not Python3 friendly and can be easily replaced by
cubicweb.tags in this project.
parent c7e55fdc01bb
......@@ -15,7 +15,6 @@ web = 'http://www.cubicweb.org/project/%s' % distname
__depends__ = {
'cubicweb': '>= 3.24.0',
'cwtags': '>= 1.1.0',
}
__recommends__ = {}
......
......@@ -16,9 +16,8 @@
# with this program. If not, see <http://www.gnu.org/licenses/>.
"""cubicweb-postgis views/forms/actions/components for web ui"""
from cwtags.tag import div, label, input
from cubicweb import uilib
from cubicweb import tags, uilib
from cubicweb.utils import UStringIO
from cubicweb.web import formfields
from cubicweb.web import formwidgets
......@@ -61,14 +60,18 @@ class RefpointWidget(formwidgets.TextInput):
value = wkb.loads(value.decode('hex'))
longitude = value.x
latitude = value.y
with div(w, class_='form-group'):
w(label(u'longitude'))
w(input(type='text', value=longitude,
name=field.input_name(form, 'longitude')))
with div(w, class_='form-group'):
w(label(u'latitude'))
w(input(type='text', value=latitude,
name=field.input_name(form, 'latitude')))
w(tags.div(
tags.label(u'longitude')
+ tags.input(type='text', value=longitude,
name=field.input_name(form, 'longitude')),
klass='form-group',
))
w(tags.div(
tags.label(u'latitude')
+ tags.input(type='text', value=latitude,
name=field.input_name(form, 'latitude')),
klass='form-group',
))
return ustring.getvalue()
def process_field_data(self, form, field):
......
......@@ -15,7 +15,6 @@ Package: cubicweb-postgis
Architecture: all
Depends:
python-cubicweb (>= 3.24.0),
python-cwtags (>= 1.1.0),
${python:Depends},
${misc:Depends},
Description: Cube for GIS data support using PostGIS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment