diff --git a/porchlightapi/admin.py b/porchlightapi/admin.py index 18c21d4..9f415bd 100644 --- a/porchlightapi/admin.py +++ b/porchlightapi/admin.py @@ -15,8 +15,11 @@ class RepositoryAdmin(admin.ModelAdmin): class ValueDataPointAdmin(admin.ModelAdmin): # All the fields are readonly list_display = ('created', + 'repository', 'undeployed_datetime', + 'undeployed_identifier', 'deployed_datetime', + 'deployed_identifier', 'value') readonly_fields = ('repository', 'created', @@ -27,6 +30,7 @@ class ValueDataPointAdmin(admin.ModelAdmin): 'deployed_datetime', 'deployed_value', 'value',) + list_filter = ('repository',) # We don't allow admin to add or change data points. Only view. def has_add_permission(self, request): diff --git a/porchlightapi/models.py b/porchlightapi/models.py index e9e549c..69c0a4a 100644 --- a/porchlightapi/models.py +++ b/porchlightapi/models.py @@ -51,6 +51,9 @@ class Meta: max_length=200, help_text='This is a Python callable, defined in settings.py, that calculates the total unshipped value for this repository.') + def __unicode__(self): + return self.name + def deployed_value(self): """ Get and run the deployed_value_source.