forked from expo/troggle
8916b460e1
Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8255 by aaron @ 2/23/2009 4:16 AM
57 lines
1.7 KiB
Python
57 lines
1.7 KiB
Python
from troggle.expo.models import *
|
|
from django.contrib import admin
|
|
#from troggle.reversion.admin import VersionAdmin #django-reversion version control
|
|
|
|
class RoleInline(admin.TabularInline):
|
|
model = PersonRole
|
|
extra = 4
|
|
|
|
class SurvexBlockAdmin(admin.ModelAdmin):
|
|
inlines = (RoleInline,)
|
|
|
|
class ScannedImageInline(admin.TabularInline):
|
|
model = ScannedImage
|
|
extra = 4
|
|
|
|
class SurveyAdmin(admin.ModelAdmin):
|
|
inlines = (ScannedImageInline,)
|
|
|
|
#class LogbookEntryAdmin(VersionAdmin):
|
|
class LogbookEntryAdmin(admin.ModelAdmin):
|
|
search_fields = ('title','expedition__year')
|
|
|
|
class PersonExpeditionInline(admin.TabularInline):
|
|
model = PersonExpedition
|
|
extra = 1
|
|
|
|
class PersonAdmin(admin.ModelAdmin):
|
|
search_fields = ('first_name','last_name')
|
|
inlines = (PersonExpeditionInline,)
|
|
|
|
class PersonExpeditionAdmin(admin.ModelAdmin):
|
|
search_fields = ('person__first_name','expedition__year')
|
|
|
|
class CaveAdmin(admin.ModelAdmin):
|
|
search_fields = ('official_name','kataster_number','unofficial_number')
|
|
extra = 4
|
|
|
|
admin.site.register(Photo)
|
|
admin.site.register(Cave, CaveAdmin)
|
|
admin.site.register(Area)
|
|
admin.site.register(OtherCaveName)
|
|
admin.site.register(CaveAndEntrance)
|
|
admin.site.register(SurveyStation)
|
|
admin.site.register(Entrance)
|
|
admin.site.register(SurvexBlock, SurvexBlockAdmin)
|
|
admin.site.register(Expedition)
|
|
admin.site.register(Person,PersonAdmin)
|
|
admin.site.register(PersonRole)
|
|
admin.site.register(PersonExpedition,PersonExpeditionAdmin)
|
|
admin.site.register(Role)
|
|
admin.site.register(LogbookEntry, LogbookEntryAdmin)
|
|
admin.site.register(PersonTrip)
|
|
admin.site.register(QM)
|
|
admin.site.register(Survey, SurveyAdmin)
|
|
admin.site.register(ScannedImage)
|
|
|