pytask/taskapp/context_processors.py
author Madhusudan.C.S <madhusudancs@gmail.com>
Tue, 01 Feb 2011 02:14:28 +0530
changeset 538 478c7fc9a223
parent 537 f285333bc66d
permissions -rwxr-xr-x
Create a package for taskapp views and break the views into task and textbook. Now all the view functions common to any two entities along with all tasks related views sit in task module. Even if the view is not directly related to the task entity, it sits in the task module since task is the base for every other entity in the application.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
502
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     1
"""Module containing the context processors for taskapp.
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     2
"""
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     3
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     4
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     5
__authors__ = [
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     6
    '"Madhusudan.C.S" <madhusudancs@fossee.in>',
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     7
    ]
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     8
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     9
537
f285333bc66d Move the configuration module to the helpers package and adjust the imports.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 502
diff changeset
    10
from pytask.helpers import configuration as config_settings
502
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    11
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    12
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    13
def configuration(request):
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    14
    """Context processor that puts all the necessary configuration
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    15
    related variables to every RequestContext'ed template.
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    16
    """
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    17
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    18
    return {
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    19
      'TASK_CLAIM_ENABLED': config_settings.TASK_CLAIM_ENABLED,
1e5df997eb01 Add a project specific configuration file, and create a template context processor to tell if tasks claim are enabled or not.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    20
      }