Reputation:
look at this photograph... (everytime I do it makes me laugh.... lol I had to what a terrible band..anyway)
I am trying to import the views.py file from my venue directory into the urls.py file in the suitsandtables directory which is on the same level as my venue directory.
Each one of these directories has a __init__.py
file which is empty. Pycharm is all happy yet I still get the ValueError: Attempted relative import beyond toplevel package
error. Which is starting to drive me insane.
Can we fix this nonsense? Gracious
Upvotes: 5
Views: 4930
Reputation: 119
Use from venue.views import something
Instead of from ..venus import views
Upvotes: 6