summaryrefslogtreecommitdiffstats
path: root/core/admin.py
diff options
context:
space:
mode:
authorSam Wenham <sam@wenhams.co.uk>2020-02-24 15:04:07 +0000
committerSam Wenham <sam@wenhams.co.uk>2020-02-24 15:04:07 +0000
commit43dfe946b6385037141b94b775112037fe5f032f (patch)
tree72c352e67166f0702ab93d7063c902ff1bd2c621 /core/admin.py
parent656ddcfe93061f2f82160ff8cc45b98d27e28bd3 (diff)
downloadtroggle-django-1.10.tar.gz
troggle-django-1.10.tar.bz2
troggle-django-1.10.zip
Just removing dud whitespacedjango-1.10
Diffstat (limited to 'core/admin.py')
-rw-r--r--core/admin.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/admin.py b/core/admin.py
index 0b7cf13..c5a1484 100644
--- a/core/admin.py
+++ b/core/admin.py
@@ -9,12 +9,12 @@ from troggle.core.views_other import downloadLogbook
class TroggleModelAdmin(admin.ModelAdmin):
-
+
def save_model(self, request, obj, form, change):
"""overriding admin save to fill the new_since parsing_field"""
obj.new_since_parsing=True
obj.save()
-
+
class Media:
js = ('jquery/jquery.min.js','js/QM_helper.js')
@@ -44,7 +44,7 @@ class OtherCaveInline(admin.TabularInline):
class SurveyAdmin(TroggleModelAdmin):
inlines = (ScannedImageInline,)
- search_fields = ('expedition__year','wallet_number')
+ search_fields = ('expedition__year','wallet_number')
class QMsFoundInline(admin.TabularInline):
@@ -52,7 +52,7 @@ class QMsFoundInline(admin.TabularInline):
fk_name='found_by'
fields=('number','grade','location_description','comment')#need to add foreignkey to cave part
extra=1
-
+
class PhotoInline(admin.TabularInline):
model = DPhoto
@@ -68,7 +68,7 @@ class PersonTripInline(admin.TabularInline):
#class LogbookEntryAdmin(VersionAdmin):
class LogbookEntryAdmin(TroggleModelAdmin):
- prepopulated_fields = {'slug':("title",)}
+ prepopulated_fields = {'slug':("title",)}
search_fields = ('title','expedition__year')
date_heirarchy = ('date')
inlines = (PersonTripInline, PhotoInline, QMsFoundInline)
@@ -77,11 +77,11 @@ class LogbookEntryAdmin(TroggleModelAdmin):
"all": ("css/troggleadmin.css",)
}
actions=('export_logbook_entries_as_html','export_logbook_entries_as_txt')
-
+
def export_logbook_entries_as_html(self, modeladmin, request, queryset):
response=downloadLogbook(request=request, queryset=queryset, extension='html')
return response
-
+
def export_logbook_entries_as_txt(self, modeladmin, request, queryset):
response=downloadLogbook(request=request, queryset=queryset, extension='txt')
return response