Exemple #1
0
from moksha.lib.helpers import deprecation

deprecation("The `moksha.wsgi.widgets.api.layout` module has been deprecated " "and will be vanishing soon.")
Exemple #2
0
# Authors: John (J5) Palmieri <*****@*****.**>
#          Luke Macken <*****@*****.**>
"""
Cross-site Request Forgery Protection.

http://en.wikipedia.org/wiki/Cross-site_request_forgery

:deprecated: This module has moved to fedora.wsgi.csrf
"""

try:
    from fedora.wsgi.csrf import CSRFProtectionMiddleware, CSRFMetadataProvider
except ImportError:
    from moksha.lib.helpers import deprecation
    deprecation(
        "moksha.middleware.csrf is deprecated and has moved to fedora.wsgi.csrf"
    )

import logging

from tg import config
from webob import Request, Response
from paste.request import construct_url
from paste.httpexceptions import HTTPFound
from paste.request import parse_formvars, parse_dict_querystring
from paste.response import replace_header
from urlparse import urlparse, urlunparse
from urllib import urlencode
from repoze.who.interfaces import IMetadataProvider
from zope.interface import implements
Exemple #3
0
from moksha.widgets.iframe import IFrameWidget
from moksha.lib.helpers import deprecation

deprecation("The `moksha.api.widgets.iframe` module has been deprecated.  "
            "Please use `moksha.widgets.iframe` instead")
Exemple #4
0
from moksha.wsgi.widgets.iframe import IFrameWidget
from moksha.lib.helpers import deprecation
deprecation("The `moksha.wsgi.widgets.api.iframe` module has been deprecated.  "
            "Please use `moksha.wsgi.widgets.iframe` instead")
Exemple #5
0
from moksha.widgets.deprecated.layout import *
from moksha.lib.helpers import deprecation
deprecation("The `moksha.api.widgets.layout` module has been deprecated "
            "and will be vanishing soon.")
Exemple #6
0
# Authors: John (J5) Palmieri <*****@*****.**>
#          Luke Macken <*****@*****.**>

"""
Cross-site Request Forgery Protection.

http://en.wikipedia.org/wiki/Cross-site_request_forgery

:deprecated: This module has moved to fedora.wsgi.csrf
"""

try:
    from fedora.wsgi.csrf import CSRFProtectionMiddleware, CSRFMetadataProvider
except ImportError:
    from moksha.lib.helpers import deprecation
    deprecation("moksha.middleware.csrf is deprecated and has moved to fedora.wsgi.csrf")

import logging

from tg import config
from webob import Request, Response
from paste.request import construct_url
from paste.httpexceptions import HTTPFound
from paste.request import parse_formvars, parse_dict_querystring
from paste.response import replace_header
from urlparse import urlparse, urlunparse
from urllib import urlencode
from repoze.who.interfaces import IMetadataProvider
from zope.interface import implements

try: