Answer the question
In order to leave comments, you need to log in
Django-easy-map not displaying in admin?
I did everything according to the example from here, it displays correctly, . But after adding the field to the admin panel, I don’t see a widget in the admin panel itself to add a marker to the map.
"""Моделс"""
from django.db import models
# Create your models here.
class Firm(models.Model):
address = models.TextField(max_length=900),
"""Админ пи"""
from django.contrib import admin
# Register your models here.
from django import forms
from django.contrib import admin
from easy_maps.widgets import AddressWithMapWidget
from .models import Firm
class FirmAdmin(admin.ModelAdmin):
class form(forms.ModelForm):
class Meta:
widgets = {
'address': AddressWithMapWidget({'class': 'vTextField'})
}
admin.site.register(Firm, FirmAdmin)
Answer the question
In order to leave comments, you need to log in
Maybe I forgot the static files from the widget?
Trypython manage.py collectstatic
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question