Add CLOSED setting
This commit is contained in:
1 parent
6fc0270950
commit
82f10b16bc
2 files changed
+10
-1
No files matched your search
@@ -12,6 +12,7 @@ https://docs.djangoproject.com/en/1.6/ref/settings/
|
||||
import os, secrets, sys
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
||||
|
||||
CLOSED = False
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
|
||||
@@ -100,3 +101,11 @@ TEMPLATE_DIRS = (
|
||||
STATICFILES_DIRS = (
|
||||
PROJECT_PATH + '/static',
|
||||
)
|
||||
|
||||
def closed(request):
|
||||
return {'CLOSED': CLOSED}
|
||||
|
||||
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'securityquiz.settings.closed'
|
||||
)
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
</select>
|
||||
|
||||
<a href="/logout" class="btn">Uitloggen</a>
|
||||
<button class="btn-primary" type="submit" id="save-button">Opslaan</button>
|
||||
{% if CLOSED %}<br>Uitzendingen kunnen niet meer worden ingezonden{% else %}<button class="btn-primary btn-disabled" type="submit" id="save-button" disabled>Opslaan</button>{% endif %}
|
||||
<div class="alert alert-info" id="js-message" style="display: none;"></div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user