Add new settings for default list ID, default assignee, default redirect on public ticket submission

This commit is contained in:
Scot Hacker 2014-11-07 23:28:39 -08:00
parent b388aece1b
commit 5689ed2b51
2 changed files with 17 additions and 4 deletions

View file

@ -1,3 +1,14 @@
from django.conf import settings
from django.contrib.auth.models import User
from todo.models import List
STAFF_ONLY = getattr(settings, 'TODO_STAFF_ONLY', False)
first_superuser = User.objects.filter(is_superuser=True)[0]
DEFAULT_ASSIGNEE = getattr(settings, 'TODO_DEFAULT_ASSIGNEE', first_superuser.username)
first_list = List.objects.first()
DEFAULT_LIST_ID = getattr(settings, 'TODO_DEFAULT_LIST_ID', first_list.id)
PUBLIC_SUBMIT_REDIRECT = getattr(settings, 'TODO_PUBLIC_SUBMIT_REDIRECT', '/')