diff --git a/coinmanager/coinc/cache.py b/coinmanager/coinc/cache.py index 62142dd..5385ac7 100644 --- a/coinmanager/coinc/cache.py +++ b/coinmanager/coinc/cache.py @@ -28,7 +28,7 @@ def get_last_modified_coin(request): return cache.get('last_modified_coin', set_last_modified_coin()) -def set_last_modified_index(name_iso): +def set_last_modified_coin(name_iso): ''' set and return the datetime of the last coin added ''' try: last_modified = Coin.objects.latest('date_modified').date_modified diff --git a/coinmanager/coinc/urls.py b/coinmanager/coinc/urls.py index b8f5829..d78b4db 100644 --- a/coinmanager/coinc/urls.py +++ b/coinmanager/coinc/urls.py @@ -32,6 +32,6 @@ urlpatterns = [ re_path(r'^add/coin/(?P[a-z]{2})/(?P(?:1999|20[0-8][0-9]|209[0-8]))/(?P(?:1|2|5|10|20|50|100|200|201|202|203))$', views.add_coin, name='add_coin'), path('edit/coin///', - views.edit_coin, name='edit_coin') + views.edit_coin, name='edit_coin'), path('accounts/', include('django.contrib.auth.urls')), ] diff --git a/coinmanager/coinc/views.py b/coinmanager/coinc/views.py index 05b4d2c..a6ecd26 100644 --- a/coinmanager/coinc/views.py +++ b/coinmanager/coinc/views.py @@ -370,7 +370,7 @@ def add_coin(request, country, year, value): in_collector = ec, exists = exists) - set_last_modified_index(country.name_iso) + set_last_modified_coin(country.name_iso) set_last_modified_country(country.name_iso) return response()