Sets default value for district corporation field
This commit is contained in:
parent
02fb84700f
commit
ec4a3592ff
2 changed files with 37 additions and 3 deletions
|
|
@ -215,13 +215,21 @@ class ContactInline(admin.StackedInline):
|
|||
|
||||
|
||||
class CorporationAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'short_name', 'pcode', 'city', 'ext_id')
|
||||
list_display = ('name', 'short_name', 'pcode', 'city', 'district', 'ext_id')
|
||||
list_editable = ('short_name',) # Temporarily?
|
||||
list_filter = (('archived', ArchivedListFilter),)
|
||||
search_fields = ('name', 'street', 'pcode', 'city')
|
||||
ordering = ('name',)
|
||||
fields = (('name', 'short_name'), 'parent', ('sector', 'typ', 'ext_id'),
|
||||
'street', ('pcode', 'city'), ('tel', 'email'), 'web', 'archived')
|
||||
fields = (
|
||||
('name', 'short_name'),
|
||||
'parent',
|
||||
('sector', 'typ', 'ext_id'),
|
||||
'street',
|
||||
('pcode', 'city', 'district'),
|
||||
('tel', 'email'),
|
||||
'web',
|
||||
'archived',
|
||||
)
|
||||
inlines = [ContactInline]
|
||||
|
||||
def get_search_results(self, request, qs, term):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue