Source

django-easy-maps / easy_maps / admin.py

Full commit
Mikhail Korobov eeff5ca 
Gianluca Pacchie… 6021c7d 


Mikhail Korobov eeff5ca 

hjongsma 94110c7 
Mikhail Korobov eeff5ca 

Mikhail Korobov 17bfeec 
Gianluca Pacchie… 6021c7d 



from django.contrib import admin
from django import forms

from .widgets import AddressWithMapWidget

class AddressAdmin(admin.ModelAdmin):
    list_display = ['address', 'computed_address', 'latitude', 'longitude', 'geocode_error']
    list_filter = ['geocode_error']
    search_fields = ['address']

    class form(forms.ModelForm):
        class Meta:
            widgets = {
                'address': AddressWithMapWidget({'class': 'vTextField'})
            }