I do not see this line in the code but I assume you have it toplevel in a module. That is not allowed. The module is executed only once when first imported. If you import it outside the wsgi application the request has not been parsed yet. Even if it were request would always be the first request, not the current request because, as I said, this line would be executed once and only once.
current can only be accessed inside functions in the module, not at top level. On Dec 13, 9:30 pm, Constantine Vasil <thst...@gmail.com> wrote: > Actually the error I get is here: > > request = current.request > > AttributeError: 'local' object has no attribute 'request' > > So there is 'current' but there is not a 'request'