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
AttributeError - module 'urls' has no attribute 'urls' #32
Comments
Hi @poswald! I remember having this issue while I was writing some tests for the package. So I was thinking that a check like the one below would make sense?
I can confirm that it works when Thank you! |
Yes it does. I think adding a check like that is fine for now. I do suggest looking into supporting runtime-specified configurations though as I think people use them to do things like having different url schemes for different types of users. |
Yeap let's go with that check for now 👍 |
It works, you just need to push the changelog. :-) Thanks. |
My understanding is that there are two common settings of
ROOT_URLCONF
people use. One is the defaultROOT_URLCONF = ''
value, and the second isROOT_URLCONF = 'urls'
. This project seems to fail if you use the latter (or at least it did for me). Changing that line toself.get_all_view_names(root_urlconf.urlpatterns)
worked but it would be best to fix in the project.The root urlconf can also be overridden at runtime via middleware so I think this urls module loading should perhaps be moved into the
get_endpoints
method or the value of that setting should be passed into theApiDocumentation
object on init.Nice project BTW. :-)
The text was updated successfully, but these errors were encountered: