Skip to content

Commit

Permalink
Merge pull request #344 from City-of-Turku/feature/eco-conter-imports…
Browse files Browse the repository at this point in the history
…tate-admin-modifications

csv_data_source only readonly field. add list_display fields
  • Loading branch information
juuso-j authored Apr 11, 2024
2 parents 4102c04 + fbfc97c commit 69282d5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion eco_counter/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,16 @@ def get_date(self, obj):


class ImportStateAdmin(admin.ModelAdmin):
list_display = (
"id",
"csv_data_source",
"current_year_number",
"current_month_number",
"current_day_number",
)

def get_readonly_fields(self, request, obj=None):
return [f.name for f in self.model._meta.fields]
return ["csv_data_source"]


class StationAdmin(admin.ModelAdmin):
Expand Down

0 comments on commit 69282d5

Please sign in to comment.