forked from expo/troggle
Much QM re-engineering
This commit is contained in:
@@ -47,11 +47,11 @@ class SurvexBlockAdmin(TroggleModelAdmin):
|
||||
inlines = (RoleInline,)
|
||||
|
||||
|
||||
class QMsFoundInline(admin.TabularInline):
|
||||
model = QM
|
||||
fk_name = "found_by"
|
||||
fields = ("number", "grade", "location_description", "comment") # need to add foreignkey to cave part
|
||||
extra = 1
|
||||
# class QMsFoundInline(admin.TabularInline):
|
||||
# model = QM
|
||||
# fk_name = "found_by"
|
||||
# fields = ("number", "grade", "location_description", "comment") # need to add foreignkey to cave part
|
||||
# extra = 1
|
||||
|
||||
|
||||
class PersonLogEntryInline(admin.TabularInline):
|
||||
@@ -64,7 +64,7 @@ class LogbookEntryAdmin(TroggleModelAdmin):
|
||||
prepopulated_fields = {"slug": ("title",)}
|
||||
search_fields = ("title", "expedition__year")
|
||||
date_heirarchy = "date"
|
||||
inlines = (PersonLogEntryInline, QMsFoundInline)
|
||||
# inlines = (PersonLogEntryInline, QMsFoundInline)
|
||||
|
||||
class Media:
|
||||
css = {"all": ("css/troggleadmin.css",)} # this does not exist
|
||||
@@ -91,12 +91,12 @@ class PersonAdmin(TroggleModelAdmin):
|
||||
|
||||
|
||||
class QMAdmin(TroggleModelAdmin):
|
||||
search_fields = ("found_by__cave__kataster_number", "number", "found_by__date")
|
||||
list_display = ("__str__", "grade", "found_by", "ticked_off_by")
|
||||
search_fields = ("number", "expoyear")
|
||||
list_display = ("__str__", "grade")
|
||||
list_display_links = ("__str__",)
|
||||
list_editable = ("found_by", "ticked_off_by", "grade")
|
||||
list_per_page = 20
|
||||
raw_id_fields = ("found_by", "ticked_off_by")
|
||||
# list_editable = ("comment", "page_ref", "grade")
|
||||
# list_per_page = 20
|
||||
# raw_id_fields = ("found_by", "ticked_off_by")
|
||||
|
||||
|
||||
class PersonExpeditionAdmin(TroggleModelAdmin):
|
||||
|
||||
Reference in New Issue
Block a user