-
-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not pass async() non-core functions #178
Comments
You need to point to tasks.py with it's full path, which would include the project or root, If you had imported myapp.tasks in views.py, you could have pointed to it directly without the quotes. |
I quickly tried adding the import I really hope I'm not just doing something dumb, but I really think this should be working. |
As I suspected, it was me being dumb. Import redundancies in my views.py. |
I have views.py and tasks.py in my project folder.
I have the following in views.py:
and tasks.py is:
When I hit the url I have wired to call my TestAsync view, I get the following error:
'module' object has no attribute 'hi'
I am able, however, to get the email examples from the django-q docs working, among other examples that use functions from django core/python built-ins. I've tried passing the function to async() with and without quotes, tried putting the 'hi' function right in the view, and every importing scheme I can think of...I still get the same error.
I have a feeling that this might be an error caused my my lack of understanding on what constitutes an acceptable function to pass to async() - however on the off chance it's a bug I wanted to drop a note here.
If it's my fault, perhaps it will help others to have a lower-level explanation of what async() expects from it's functions?
The text was updated successfully, but these errors were encountered: