summaryrefslogtreecommitdiff
path: root/archaeological_context_records
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-08-04 20:03:03 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-08-04 20:03:03 +0200
commit5f8af1caf220dfc3bd097aa3bd4c184d499b1390 (patch)
tree378d8f0de8fe2da0069a29b4c176b8a3db964400 /archaeological_context_records
parent8dac0d41c0760c4bce6de81ecae2edb7364b5772 (diff)
downloadIshtar-5f8af1caf220dfc3bd097aa3bd4c184d499b1390.tar.bz2
Ishtar-5f8af1caf220dfc3bd097aa3bd4c184d499b1390.zip
Admin: fix point management for context record
Diffstat (limited to 'archaeological_context_records')
-rw-r--r--archaeological_context_records/admin.py8
-rw-r--r--archaeological_context_records/models.py2
2 files changed, 4 insertions, 6 deletions
diff --git a/archaeological_context_records/admin.py b/archaeological_context_records/admin.py
index f20a9aebf..2733fa2ff 100644
--- a/archaeological_context_records/admin.py
+++ b/archaeological_context_records/admin.py
@@ -18,11 +18,9 @@
# See the file COPYING for details.
from ajax_select import make_ajax_form
-from ajax_select.fields import AutoCompleteSelectField, \
- AutoCompleteSelectMultipleField
+from ajax_select.fields import AutoCompleteSelectField
from django import forms
-from django.conf import settings
from django.contrib import admin
from django.contrib.gis.forms import PointField, PolygonField, OSMWidget
from django.utils.translation import ugettext_lazy as _
@@ -46,9 +44,9 @@ admin_site.register(models.Dating, DatingAdmin)
class AdminContextRecordForm(forms.ModelForm):
class Meta:
- model = models.Operation
+ model = models.ContextRecord
exclude = []
- point = PointField(label=_(u"Point"), required=False,
+ point_2d = PointField(label=_(u"Point"), required=False,
widget=OSMWidget)
polygon = PolygonField(label=_(u"Polygon"), required=False,
widget=OSMWidget)
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index e3a344be8..f968c1d6e 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -298,7 +298,7 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, ImageModel, OwnPerms,
related_context_records = models.ManyToManyField(
'ContextRecord', through='RecordRelations', blank=True)
point_2d = models.PointField(_(u"Point (2D)"), blank=True, null=True)
- point = models.PointField(_(u"Point"), blank=True, null=True, dim=3)
+ point = models.PointField(_(u"Point (3D)"), blank=True, null=True, dim=3)
polygon = models.PolygonField(_(u"Polygon"), blank=True, null=True)
cached_label = models.TextField(_(u"Cached name"), null=True, blank=True)
history = HistoricalRecords()