diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-04-21 19:08:42 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-04-21 19:08:42 +0100 |
commit | bcdb3572fa260052d76b54961dea9a9381381311 (patch) | |
tree | bc4c8b84354fb881d1bd25c1fe797e6c2345fd5f /core/views/other.py | |
parent | 18938c9fca5af4ed8e8fe97f101bd5a9870f2b5a (diff) | |
download | troggle-bcdb3572fa260052d76b54961dea9a9381381311.tar.gz troggle-bcdb3572fa260052d76b54961dea9a9381381311.tar.bz2 troggle-bcdb3572fa260052d76b54961dea9a9381381311.zip |
Add new per-module ToDo texts
Diffstat (limited to 'core/views/other.py')
-rw-r--r-- | core/views/other.py | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/core/views/other.py b/core/views/other.py index b179f82..cadb609 100644 --- a/core/views/other.py +++ b/core/views/other.py @@ -14,12 +14,29 @@ from troggle.core.models.caves import LogbookEntry, QM, Cave, PersonTrip from .login import login_required_if_public from troggle.core.forms import UploadFileForm -"""Utility functions and code to serve the control panel and individual user's +'''Utility functions and code to serve the control panel and individual user's progress and task list (deprecated as we do not have individual user login). Also has code to download a logbook in a choice of formats (why?!) and to download all QMs (not working) -""" +''' + +todo = '''Delete the newfile & TripForm code once we have a proper file-upload system working. +meanwhile keep it as an example to consider. +''' + +def todos(request, module): + '''produces todo text from module + ''' + from troggle.core.TESTS.tests import todo as tests + from troggle.core.views.logbooks import todo as viewlogbooks + from troggle.core.forms import todo as forms + print(f'TODO - {tests}') + tododict = {'views/other': todo, + 'tests': tests, + 'views/logbooks': viewlogbooks, + 'core/forms': forms} + return render(request,'core/todos.html', {'tododict': tododict}) def troggle404(request): # cannot get this to work. Handler404 in urls.py not right syntax '''Custom 404 page to be used even when Debug=True @@ -44,7 +61,7 @@ def frontpage(request): return render(request,'frontpage.html', locals()) -def controlPanel(request): +def controlpanel(request): jobs_completed=[] if request.method=='POST': if request.user.is_superuser: # expoadmin is both .is_staff and ._is_superuser @@ -67,7 +84,7 @@ def controlPanel(request): return render(request,'controlPanel.html', {'caves':Cave.objects.all(),'expeditions':Expedition.objects.all(),'jobs_completed':jobs_completed}) -def downloadLogbook(request,year=None,extension=None,queryset=None): +def downloadlogbook(request,year=None,extension=None,queryset=None): if year: current_expedition=Expedition.objects.get(year=year) @@ -135,7 +152,7 @@ def ajax_QM_number(request): return HttpResponse(res) @login_required_if_public -def newFile(request, pslug = None): +def newfile(request, pslug = None): ''' not known quite what this was for or where it fits in - original 2006 troggle idea never finished? ''' if pslug: |