added link item to company admin display list
This commit is contained in:
@@ -8,7 +8,7 @@ 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_display = ('short_name', 'city', 'email', 'shop', 'platform', 'sync', 'is_validated', 'is_active', 'link')
|
||||
list_filter = ('platform', 'sync', 'is_validated', 'is_active', 'city')
|
||||
search_fields = ('short_name', 'company_name', 'email', 'web_link')
|
||||
|
||||
@@ -16,5 +16,8 @@ class CompanyAdmin(admin.ModelAdmin):
|
||||
PointField: {"widget": GooglePointFieldWidget}
|
||||
}
|
||||
|
||||
def link(self, company):
|
||||
return company.shop_link is not None
|
||||
|
||||
|
||||
admin.site.register(models.Company, CompanyAdmin)
|
||||
|
||||
Reference in New Issue
Block a user