Skip to content

Commit

Permalink
fix some imports
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitc committed Feb 18, 2011
1 parent f7ca0d5 commit e2ac6c0
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 17 deletions.
3 changes: 2 additions & 1 deletion couchdbkit/client.py
Expand Up @@ -42,7 +42,8 @@

from restkit.util import url_quote

from .exceptions import *
from .exceptions import InvalidAttachment, NoResultFound, \
ResourceNotFound, ResourceConflict
from . import resource
from .utils import validate_dbname, json

Expand Down
2 changes: 1 addition & 1 deletion couchdbkit/ext/pylons/auth/model.py
Expand Up @@ -7,7 +7,7 @@
import os


from ...schema import Document, SchemaListProperty, StringProperty, \
from .... import Document, SchemaListProperty, StringProperty, \
StringListProperty

class Permission(Document):
Expand Down
4 changes: 2 additions & 2 deletions couchdbkit/schema/base.py
Expand Up @@ -17,8 +17,8 @@
from .properties import value_to_python, \
convert_property, MAP_TYPES_PROPERTIES, ALLOWED_PROPERTY_TYPES, \
LazyDict, LazyList, value_to_json
from ..exceptions import *
from ..exceptions import ResourceNotFound
from ..exceptions import DuplicatePropertyError, ResourceNotFound, \
ReservedWordError


__all__ = ['ReservedWordError', 'ALLOWED_PROPERTY_TYPES', 'DocumentSchema',
Expand Down
4 changes: 2 additions & 2 deletions couchdbkit/schema/properties_proxy.py
Expand Up @@ -10,10 +10,10 @@
import decimal
import time

from ..exceptions import *
from .properties import Property
from ..exceptions import BadValueError

from .base import DocumentSchema, ALLOWED_PROPERTY_TYPES
from .properties import Property

__all__ = ['SchemaProperty', 'SchemaListProperty', 'SchemaDictProperty']

Expand Down
2 changes: 1 addition & 1 deletion couchdbkit/wsgi/handler.py
Expand Up @@ -9,7 +9,7 @@
import traceback
from urllib import unquote

from restkit.utils import url_encode
from restkit.util import url_encode

from .. import __version__
from ..external import External
Expand Down
16 changes: 6 additions & 10 deletions couchdbkit/wsgi/proxy.py
Expand Up @@ -5,8 +5,7 @@

import urlparse

from restkit.contrib.wsgi_proxy import HostProxy, get_config, ALLOWED_METHODS
from restkit.pool.simple import SimplePool
from restkit.contrib.wsgi_proxy import HostProxy, ALLOWED_METHODS
from webob import Request

class CouchdbProxy(object):
Expand All @@ -19,14 +18,11 @@ class CouchdbProxy(object):
application = CouchdbProxy()
"""

def __init__(self, uri="http://127.0.0.1:5984", pool=None,
allowed_method=ALLOWED_METHODS, **local_config):
if not pool:
pool = SimplePool(keepalive=10)
config = get_config(local_config)
self.proxy = HostProxy(uri, pool=pool,
allowed_methods=allowed_method, **config)

def __init__(self, uri="http://127.0.0.1:5984",
allowed_method=ALLOWED_METHODS, **kwargs):
self.proxy = HostProxy(uri, allowed_methods=allowed_method,
**kwargs)

def do_proxy(self, req, environ, start_response):
"""\
return proxy response. Can be overrided to add authentification and
Expand Down

0 comments on commit e2ac6c0

Please sign in to comment.