admin changes

This commit is contained in:
Sanj 2011-08-30 15:35:45 +05:30
parent 332191af9a
commit 435e9e9c21
2 changed files with 8 additions and 1 deletions

View File

@ -40,6 +40,10 @@ class FeatureTypeFilter(SimpleListFilter):
return queryset.filter(feature_type=val) return queryset.filter(feature_type=val)
''' '''
class AuthorityRecordAdmin(admin.ModelAdmin):
search_fields = ['preferred_name']
class FeatureNamesInline(admin.StackedInline): class FeatureNamesInline(admin.StackedInline):
model = Name model = Name
extra = 0 extra = 0
@ -83,4 +87,4 @@ admin.site.register(Feature, FeatureAdmin)
admin.site.register(TimeFrame) admin.site.register(TimeFrame)
admin.site.register(FeatureType, FeatureTypeAdmin) admin.site.register(FeatureType, FeatureTypeAdmin)
admin.site.register(Relationship) admin.site.register(Relationship)
admin.site.register(AuthorityRecord) admin.site.register(AuthorityRecord, AuthorityRecordAdmin)

View File

@ -160,6 +160,9 @@ class TimeFrame(models.Model):
start_granularity = models.CharField(max_length=64, choices=GRANULARITY_CHOICES) start_granularity = models.CharField(max_length=64, choices=GRANULARITY_CHOICES)
end_granularity = models.CharField(max_length=64, choices=GRANULARITY_CHOICES) end_granularity = models.CharField(max_length=64, choices=GRANULARITY_CHOICES)
class Meta:
ordering = ['description']
def __unicode__(self): def __unicode__(self):
return self.description return self.description