forked from expo/troggle
Fixing dates on expedition table
This commit is contained in:
@@ -58,7 +58,6 @@ def notablepersons(request):
|
||||
def expedition(request, expeditionname):
|
||||
'''Returns a rendered page for one expedition, specified by the year e.g. '2019'.
|
||||
If page caching is enabled, it caches the dictionaries used to render the template page.
|
||||
|
||||
'''
|
||||
if request.user.is_authenticated:
|
||||
if "reload" in request.GET:
|
||||
@@ -76,7 +75,7 @@ def expedition(request, expeditionname):
|
||||
logged_in = False
|
||||
|
||||
|
||||
ts = TROG['pagecache']['expedition']
|
||||
ts = TROG['pagecache']['expedition'] # not much use unless single user!
|
||||
if settings.CACHEDPAGES:
|
||||
nexpos = len( TROG['pagecache']['expedition'])
|
||||
#print(f'! - expo {expeditionname} CACHEDPAGES {nexpos} expo pages in cache.')
|
||||
@@ -107,17 +106,12 @@ def expedition(request, expeditionname):
|
||||
|
||||
ts[expeditionname] = {'expedition': this_expedition, 'expeditions':expeditions,
|
||||
'personexpeditiondays':personexpeditiondays, 'settings':settings,
|
||||
'dateditems': dateditems}
|
||||
'dateditems': dateditems, 'dates':dates}
|
||||
TROG['pagecache']['expedition'][expeditionname] = ts[expeditionname]
|
||||
nexpos = len( TROG['pagecache']['expedition'])
|
||||
#print(f'! - expo {expeditionname} pre-render N expos:{nexpos}')
|
||||
return render(request,'expedition.html', { **ts[expeditionname], 'logged_in' : logged_in } )
|
||||
|
||||
|
||||
# def get_absolute_url(self): # seems to have come seriously adrift. This should be in a class?!
|
||||
# return ('expedition', (expedition.year))
|
||||
|
||||
|
||||
class Expeditions_tsvListView(ListView):
|
||||
"""This uses the Django built-in shortcut mechanism
|
||||
It defaults to use a template with name <app-label>/<model-name>_list.html.
|
||||
|
||||
Reference in New Issue
Block a user