21 lines
624 B
Python
21 lines
624 B
Python
from django.contrib import admin
|
|
from django.contrib.gis.db.models import PointField
|
|
|
|
from mapwidgets.widgets import GooglePointFieldWidget
|
|
|
|
from . import models
|
|
|
|
# Register your models here.
|
|
|
|
class CompanyAdmin(admin.ModelAdmin):
|
|
list_display = ('short_name', 'city', 'email', 'shop', 'platform', 'sync', 'is_validated', 'is_active')
|
|
list_filter = ('platform', 'sync', 'is_validated', 'is_active', 'city')
|
|
search_fields = ('short_name', 'company_name', 'email', 'url')
|
|
|
|
formfield_overrides = {
|
|
PointField: {"widget": GooglePointFieldWidget}
|
|
}
|
|
|
|
|
|
admin.site.register(models.Company, CompanyAdmin)
|