summaryrefslogtreecommitdiffstats
path: root/expo/admin.py
diff options
context:
space:
mode:
authorsubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-13 05:27:43 +0100
committersubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-13 05:27:43 +0100
commitc6cce8d2fe470b42740258e737877d94d1b3fdb2 (patch)
tree4b148e1ad42906e0eca59873264da1b96adc6df9 /expo/admin.py
parent95a08ffbd9459d200d20863d1a59ffe475868600 (diff)
downloadtroggle-c6cce8d2fe470b42740258e737877d94d1b3fdb2.tar.gz
troggle-c6cce8d2fe470b42740258e737877d94d1b3fdb2.tar.bz2
troggle-c6cce8d2fe470b42740258e737877d94d1b3fdb2.zip
[svn] Add beginnings of virtual survey binder: new Survey and ScannedImage models, survey parser. Still has lots of problems, but I need some help with the file upload aspect so am committing now. Biggest problem is trying to call save() on the images from the API. It needs arguments that I don't understand. Also, the # in our survey paths was causing trouble. I worked around this with a correctURL method which urlencodes the actual URL, but admin still tries to use a URL with a # in it.
Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8152 by aaron @ 1/15/2009 6:22 AM
Diffstat (limited to 'expo/admin.py')
-rw-r--r--expo/admin.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/expo/admin.py b/expo/admin.py
index be517b8..ce08334 100644
--- a/expo/admin.py
+++ b/expo/admin.py
@@ -8,6 +8,13 @@ class RoleInline(admin.TabularInline):
class SurvexBlockAdmin(admin.ModelAdmin):
inlines = (RoleInline,)
+class SurveyInline(admin.TabularInline):
+ model = ScannedImage
+ extra = 4
+
+class SurveyAdmin(admin.ModelAdmin):
+ inlines = (SurveyInline,)
+
admin.site.register(Photo)
admin.site.register(Cave)
admin.site.register(Area)
@@ -24,4 +31,6 @@ admin.site.register(Role)
admin.site.register(LogbookEntry)
admin.site.register(PersonTrip)
admin.site.register(QM)
+admin.site.register(Survey, SurveyAdmin)
+admin.site.register(ScannedImage)