diff options
Diffstat (limited to 'expo')
-rw-r--r-- | expo/admin.py | 9 | ||||
-rw-r--r-- | expo/views_other.py | 6 |
2 files changed, 9 insertions, 6 deletions
diff --git a/expo/admin.py b/expo/admin.py index ce08334..2f7fd4a 100644 --- a/expo/admin.py +++ b/expo/admin.py @@ -8,12 +8,15 @@ class RoleInline(admin.TabularInline): class SurvexBlockAdmin(admin.ModelAdmin):
inlines = (RoleInline,)
-class SurveyInline(admin.TabularInline):
+class ScannedImageInline(admin.TabularInline):
model = ScannedImage
extra = 4
class SurveyAdmin(admin.ModelAdmin):
- inlines = (SurveyInline,)
+ inlines = (ScannedImageInline,)
+
+class LogbookEntryAdmin(admin.ModelAdmin):
+ search_fields = ('title',)
admin.site.register(Photo)
admin.site.register(Cave)
@@ -28,7 +31,7 @@ admin.site.register(Person) admin.site.register(PersonRole)
admin.site.register(PersonExpedition)
admin.site.register(Role)
-admin.site.register(LogbookEntry)
+admin.site.register(LogbookEntry, LogbookEntryAdmin)
admin.site.register(PersonTrip)
admin.site.register(QM)
admin.site.register(Survey, SurveyAdmin)
diff --git a/expo/views_other.py b/expo/views_other.py index 6ff1673..88a8559 100644 --- a/expo/views_other.py +++ b/expo/views_other.py @@ -4,7 +4,7 @@ import troggle.settings as settings from django import forms
from django.db.models import Q
import re
-#import randSent (it's not ready yet)
+import randSent
def stats(request):
statsDict={}
@@ -14,6 +14,6 @@ def stats(request): statsDict['logbookEntryCount'] = int(LogbookEntry.objects.count())
return render_to_response('statistics.html', statsDict)
-#def frontPage(request):
+def frontPage(request):
-# return render_to_response('index.html', {'randSent':randSent.randomLogbookSentence(),'settings':settings})
\ No newline at end of file + return render_to_response('index.html', {'randSent':randSent.randomLogbookSentence(),'settings':settings})
\ No newline at end of file |