Module ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad TryFinally body Expr Yield finalbody Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Yield decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults vararg kwarg body With Call NameLoad Call AttributeLoad NameLoad attr Str NameLoad body Return Call NameLoad NameLoad NameLoad decorator_list Call NameLoad NameLoad Return NameLoad decorator_list
N/A __future__ absolute_import unicode_literals contextlib contextmanager functools wraps django.utils translation respect_language N/A N/A language N/A N/A N/A Context manager that changes the current translation language for
    all code inside the following block.

    Can e.g. be used inside tasks like this::

        from celery import task
        from djcelery.common import respect_language

        @task
        def my_task(language=None):
            with respect_language(language):
                pass
     N/A language N/A N/A prev N/A N/A translation get_language N/A N/A N/A translation activate language N/A N/A N/A N/A N/A N/A N/A N/A translation activate prev N/A N/A N/A N/A contextmanager respects_language N/A N/A fun N/A N/A N/A Decorator for tasks with respect to site's current language.
    You can use this decorator on your tasks together with default @task
    decorator (remember that the task decorator must be applied last).

    See also the with-statement alternative :func:`respect_language`.

    **Example**:

    .. code-block:: python

        @task
        @respects_language
        def my_task()
            # localize something.

    The task will then accept a ``language`` argument that will be
    used to set the language in the task, and the task can thus be
    called like:

    .. code-block:: python

        from django.utils import translation
        from myapp.tasks import my_task

        # Pass the current language on to the task
        my_task.delay(language=translation.get_language())

        # or set the language explicitly
        my_task.delay(language='no.no')

     _inner N/A N/A N/A args kwargs N/A N/A N/A respect_language N/A N/A kwargs pop language None N/A N/A N/A fun args kwargs N/A N/A wraps fun N/A _inner N/A