Addresses issue 20: when creating a new user, the signal that creates a UserSettings entry now creates some default settings. These are driven by settings.py so can be overridden per-install.

This commit is contained in:
Ross Poulton
2011-02-02 08:15:49 +00:00
parent 107ec742b1
commit b3c53f1bc8
2 changed files with 18 additions and 2 deletions

View File

@ -12,3 +12,18 @@ try:
import tagging
except ImportError:
HAS_TAG_SUPPORT = False
try:
DEFAULT_USER_SETTINGS = settings.HELPDESK_DEFAULT_SETTINGS
except:
DEFAULT_USER_SETTINGS = None
if type(DEFAULT_USER_SETTINGS) != type(dict()):
DEFAULT_USER_SETTINGS = {
'use_email_as_submitter': True,
'email_on_ticket_assign': True,
'email_on_ticket_change': True,
'login_view_ticketlist': True,
'email_on_ticket_apichange': True,
'tickets_per_page': 25
}