Skip to content

Commit

Permalink
Merge pull request #211 from ODM2/afterdjango2
Browse files Browse the repository at this point in the history
change for sampling features form
  • Loading branch information
Miguel Leon authored Oct 25, 2018
2 parents c3a0bc8 + 1f3689b commit 479197f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions odm2admin/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

from .readonlyadmin import ReadOnlyAdmin
from .listfilters import SamplingFeatureTypeListFilter

# import pyproj

# from .admin import MeasurementresultvaluesResource
# AffiliationsChoiceField(People.objects.all().order_by('personlastname'),
Expand Down Expand Up @@ -787,10 +787,12 @@ def __init__(self, *args, **kwargs):
u'here: <a href="http://vocabulary.odm2.org/elevationdatum/" ' \
u'target="_blank">http://vocabulary.odm2.org/elevationdatum/</a>'
elevation_datum.allow_tags = True
featuregeometry = forms.PointField(label='Featuregeometry',
widget=forms.OpenLayersWidget(), required=False)
# featuregeometry is not working in production I think GDAL_DATA setting is needed but I'm not sure what to point
# it to. This was not working well in either case though.
# featuregeometry = forms.PointField(label='Featuregeometry',
# widget=forms.OSMWidget(), required=False)

featuregeometry.initial = GEOSGeometry("POINT(0 0)")
# featuregeometry.initial = GEOSGeometry("POINT(0 0)")


class SitesInline(admin.StackedInline):
Expand Down

2 comments on commit 479197f

@aufdenkampe
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miguelcleon
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! @aufdenkampe next I need to update docker. I haven't worked on that in a while.

Please sign in to comment.