"urls doesn't look like a module path" for settings.ROOT_URLCONF
See original GitHub issueHeyoo, thanks so much for releasing this!
I seem to be having a problem based on this setting:
ROOT_URLCONF = 'urls'
File "/Users/eric/.virtualenvs/image_first/lib/python3.5/site-packages/rest_framework_docs/views.py", line 17, in get_context_data
docs = ApiDocumentation()
File "/Users/eric/.virtualenvs/image_first/lib/python3.5/site-packages/rest_framework_docs/api_docs.py", line 12, in __init__
root_urlconf = import_string(settings.ROOT_URLCONF)
File "/Users/eric/.virtualenvs/image_first/lib/python3.5/site-packages/django/utils/module_loading.py", line 18, in import_string
six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])
File "/Users/eric/.virtualenvs/image_first/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/Users/eric/.virtualenvs/image_first/lib/python3.5/site-packages/django/utils/module_loading.py", line 15, in import_string
module_path, class_name = dotted_path.rsplit('.', 1)
ImportError: urls doesn't look like a module path
Changing to this works:
ROOT_URLCONF = 'src.urls'
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
ImportError: no module named urls but ROOT_URLCONF is ...
The solution was to remove the quotes from 'admin.site.urls.' The quotes are still ... If it doesn't, it shouldn't be in an import...
Read more >Chapter 3: Views and URLconfs - The Django Book
A URLconf is like a table of contents for your Django-powered Web site. Basically, it's a mapping between URLs and the view functions...
Read more >URL dispatcher - Django documentation
This module is pure Python code and is a mapping between URL path expressions to Python ... its value will be used in...
Read more >Confusion with ROOT_URLCONF - Google Groups
In short, it has to be on your PYTHONPATH or in the local directory. ... the subdirectory contains a file named __init__.py). The...
Read more >Python – Django: m doesn't look like a module path - iTecNote
I can vistit the /admin url. but went I login admin or call my login api. I got this error message. error: ImportError...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ckcollab @ambivalentno Version 0.0.9 is now on PyPI 👏
Thanks for all the work on this boys 👯