from django.contrib import admin


from .models import Calendar,MonthCache


# Register your models here.
@admin.register(Calendar)
class CalendarAdmin(admin.ModelAdmin):
    list_display = ('name','remote_id','css_class')

@admin.register(MonthCache)
class MonthCacheAdmin(admin.ModelAdmin):
    list_display = ('calendar','month','data_cached_on')


from django.contrib import admin


from .models import Calendar,MonthCache


# Register your models here.
@admin.register(Calendar)
class CalendarAdmin(admin.ModelAdmin):
    list_display = ('name','remote_id','css_class')

@admin.register(MonthCache)
class MonthCacheAdmin(admin.ModelAdmin):
    list_display = ('calendar','month','data_cached_on','is_cache_stale')


Add staleness to MonthCache Admin display
Add staleness to MonthCache Admin display

  from django.contrib import admin
  
  
  from .models import Calendar,MonthCache
  
  
  # Register your models here.
  @admin.register(Calendar)
  class CalendarAdmin(admin.ModelAdmin):
      list_display = ('name','remote_id','css_class')
  
  @admin.register(MonthCache)
  class MonthCacheAdmin(admin.ModelAdmin):
-     list_display = ('calendar','month','data_cached_on')
+     list_display = ('calendar','month','data_cached_on','is_cache_stale')
  
  
Add staleness to MonthCache Admin display
## Code Before:
from django.contrib import admin


from .models import Calendar,MonthCache


# Register your models here.
@admin.register(Calendar)
class CalendarAdmin(admin.ModelAdmin):
    list_display = ('name','remote_id','css_class')

@admin.register(MonthCache)
class MonthCacheAdmin(admin.ModelAdmin):
    list_display = ('calendar','month','data_cached_on')


## Instruction:
Add staleness to MonthCache Admin display
## Code After:
from django.contrib import admin


from .models import Calendar,MonthCache


# Register your models here.
@admin.register(Calendar)
class CalendarAdmin(admin.ModelAdmin):
    list_display = ('name','remote_id','css_class')

@admin.register(MonthCache)
class MonthCacheAdmin(admin.ModelAdmin):
    list_display = ('calendar','month','data_cached_on','is_cache_stale')

