1
0
Fork 0

Fix sorting by datetime on admin TLE

environments/production/deployments/231
Pierros Papadeas 2018-12-02 18:48:39 +02:00
parent 2c3fea959f
commit 4df7712b3c
No known key found for this signature in database
GPG Key ID: 8DB97129D9982991
1 changed files with 1 additions and 4 deletions

View File

@ -55,12 +55,9 @@ class SatelliteAdmin(admin.ModelAdmin):
@admin.register(Tle)
class TleAdmin(admin.ModelAdmin):
list_display = ('satellite_name', 'tle0', 'tle1', 'updated_date')
list_display = ('satellite_name', 'tle0', 'tle1', 'updated')
list_filter = ('satellite__name',)
def updated_date(self, obj):
return obj.updated.strftime('%d.%m.%Y, %H:%M')
def satellite_name(self, obj):
return obj.satellite.name