Skip to content

Commit

Permalink
Added comments for both functions in app_settings that import things …
Browse files Browse the repository at this point in the history
…from portal
  • Loading branch information
Ria Jha committed Jun 18, 2018
1 parent 8a1547b commit a5e4136
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions players/app_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,25 @@


def get_aimmo_preview_user_decorator():
"""
This function is used to import a decorator from portal, which
checks whether the logged in user is a preview user.
:return: A function decorator
"""
if PREVIEW_USER_AIMMO_DECORATOR:
func = import_string(PREVIEW_USER_AIMMO_DECORATOR)
return func
return default_preview_user


def get_users_for_new_game(request):
"""
Imports and calls a function defined in portal, that decides
which users should be added to the newly created game.
:param request:
:return: List of User objects
"""
if USERS_FOR_NEW_AIMMO_GAME:
func = import_string(USERS_FOR_NEW_AIMMO_GAME)
return func(request)
Expand Down

0 comments on commit a5e4136

Please sign in to comment.