Esempio n. 1
0
def _request_args():
    from django.conf import settings

    from funfactory.helpers import static
    from tower import ugettext_lazy as _lazy

    args = {
        'privacyPolicy': 'http://www.mozilla.org/en-US/privacy-policy.html',
        'siteName': _lazy('Firefox Flicks'),
        'termsOfService': reverse_lazy('flicks.base.rules'),
    }

    if settings.SITE_URL.startswith('https'):
        args['siteLogo'] = static('img/flicks-logo-180.png')

    return args
Esempio n. 2
0
def _request_args():
    from django.conf import settings

    from funfactory.helpers import static
    from tower import ugettext_lazy as _lazy

    args = {
        "privacyPolicy": "http://www.mozilla.org/en-US/privacy-policy.html",
        "siteName": _lazy("Firefox Flicks"),
        "termsOfService": reverse_lazy("flicks.base.rules"),
    }

    if settings.SITE_URL.startswith("https"):
        args["siteLogo"] = static("img/flicks-logo-180.png")

    return args
Esempio n. 3
0
def _request_args():
    from django.conf import settings

    from funfactory.helpers import static
    from tower import ugettext_lazy as _lazy

    args = {
        'privacyPolicy': 'http://www.mozilla.org/en-US/privacy-policy.html',
        'siteName': _lazy('Firefox Flicks'),
        'termsOfService': reverse_lazy('flicks.base.rules'),
    }

    if settings.SITE_URL.startswith('https'):
        args['siteLogo'] = static('img/flicks-logo-180.png')

    return args
Esempio n. 4
0
]

MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES) + [
    'commonware.response.middleware.StrictTransportMiddleware',
    'csp.middleware.CSPMiddleware',
    'django_statsd.middleware.GraphiteRequestTimingMiddleware',
    'django_statsd.middleware.GraphiteMiddleware',
    'waffle.middleware.WaffleMiddleware',
]

TEMPLATE_CONTEXT_PROCESSORS = list(TEMPLATE_CONTEXT_PROCESSORS) + [
    'django_browserid.context_processors.browserid',
]

# Authentication settings
LOGIN_URL = reverse_lazy('flicks.base.home')
LOGIN_REDIRECT_URL = reverse_lazy('flicks.base.home')
LOGIN_REDIRECT_URL_FAILURE = reverse_lazy('flicks.base.home')
LOGOUT_REDIRECT_URL = reverse_lazy('flicks.base.home')


# Lazy-load request args since they depend on certain settings.
def _request_args():
    from django.conf import settings

    from funfactory.helpers import static
    from tower import ugettext_lazy as _lazy

    args = {
        'privacyPolicy': 'http://www.mozilla.org/en-US/privacy-policy.html',
        'siteName': _lazy('Firefox Flicks'),
Esempio n. 5
0
    "south",
    "waffle",
]

MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES) + [
    "commonware.response.middleware.StrictTransportMiddleware",
    "csp.middleware.CSPMiddleware",
    "django_statsd.middleware.GraphiteRequestTimingMiddleware",
    "django_statsd.middleware.GraphiteMiddleware",
    "waffle.middleware.WaffleMiddleware",
]

TEMPLATE_CONTEXT_PROCESSORS = list(TEMPLATE_CONTEXT_PROCESSORS) + ["django_browserid.context_processors.browserid"]

# Authentication settings
LOGIN_URL = reverse_lazy("flicks.base.home")
LOGIN_REDIRECT_URL = reverse_lazy("flicks.base.home")
LOGIN_REDIRECT_URL_FAILURE = reverse_lazy("flicks.base.home")
LOGOUT_REDIRECT_URL = reverse_lazy("flicks.base.home")


# Lazy-load request args since they depend on certain settings.
def _request_args():
    from django.conf import settings

    from funfactory.helpers import static
    from tower import ugettext_lazy as _lazy

    args = {
        "privacyPolicy": "http://www.mozilla.org/en-US/privacy-policy.html",
        "siteName": _lazy("Firefox Flicks"),
Esempio n. 6
0
MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES) + [
    'commonware.response.middleware.StrictTransportMiddleware',
    'csp.middleware.CSPMiddleware',
    'django_statsd.middleware.GraphiteRequestTimingMiddleware',
    'django_statsd.middleware.GraphiteMiddleware',
    'waffle.middleware.WaffleMiddleware',
]

TEMPLATE_CONTEXT_PROCESSORS = list(TEMPLATE_CONTEXT_PROCESSORS) + [
   'django_browserid.context_processors.browserid',
   'flicks.base.context_processors.browserid_request_args',
]

# Authentication settings
LOGIN_URL = reverse_lazy('flicks.users.persona')
LOGIN_REDIRECT_URL = reverse_lazy('flicks.base.home')
LOGIN_REDIRECT_URL_FAILURE = reverse_lazy('flicks.base.home')
LOGOUT_REDIRECT_URL = reverse_lazy('flicks.base.home')

# Because Jinja2 is the default template loader, add any non-Jinja templated
# apps here:
JINGO_EXCLUDE_APPS = [
    'admin',
    'browserid',
    'registration',
]

# Tells the extract script what files to look for L10n in and what function
# handles the extraction. The Tower library expects this.
DOMAIN_METHODS = {