Created
May 28, 2014 02:06
-
-
Save jeremyjbowers/5493a4b35dc7e549128f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
from housing.models import HouseInformation, InspectionReport | |
class HouseInformationAdmin(admin.ModelAdmin): | |
fieldsets = ( | |
(None, { | |
'fields': ('house_name', 'house_type') | |
}), | |
('Location', { | |
'fields': ('address', 'longitude', 'latitude') | |
}), | |
) | |
inlines = [ | |
InspectionReportInline | |
] | |
class InspectionReportInline(admin.TabularInline): | |
model = InspectionReport | |
class InspectionReportAdmin(admin.ModelAdmin): | |
inlines = [ | |
InspectionReportInline | |
] | |
admin.site.register(HouseInformation, HouseInformationAdmin) | |
admin.site.register(InspectionReport) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment