-
Oct 27th, 2011, 11:00 AM
#1
How to access application context from another python module?
Hello
I'm using ApplicationContextAware to access application context from another module, but 'app_context' is always evaluated to None. Here is my code:
class ApplicationContextProvider(ApplicationContextAware ):
global_app_ctx = None
def set_app_context(self, app_context):
global_app_ctx = app_context
Then I declare the object in the application context.
Accessing ApplicationContextProvider.global_app_ctx, gives 'None'.
What's wrong here?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules