Skip to content

Commit fc760a2

Browse files
committed
Use Textarea Widget instead of Map for MunicipalityAdmin
1 parent 6034242 commit fc760a2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

django/gsmap/admin.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from django_json_widget.widgets import JSONEditorWidget
55
from django.utils.html import mark_safe
66
from django.contrib import messages
7+
from django.forms.widgets import Textarea
78
import requests
89
from sortedm2m_filter_horizontal_widget.forms import SortedFilteredSelectMultiple
910
from gsmap.models import Municipality, Snapshot, Workspace
@@ -19,6 +20,10 @@ class MunicipalityAdmin(admin.OSMGeoAdmin):
1920
list_filter = ('canton',)
2021
search_fields = ('id', 'name', 'canton')
2122

23+
def get_map_widget(self, db_field):
24+
return Textarea
25+
26+
2227

2328
class SnapshotAdmin(admin.OSMGeoAdmin):
2429
readonly_fields = ('id', 'created', 'modified', 'get_absolute_link',

0 commit comments

Comments
 (0)