user6781560
user6781560

Reputation:

pycharm recnoizes import yet still ValueError: Attempted relative import beyond toplevel package django project on make migrations

look at this photograph... (everytime I do it makes me laugh.... lol I had to what a terrible band..anyway)Nonsense

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

Answers (1)

Raj Ratn
Raj Ratn

Reputation: 119

Use from venue.views import something

Instead of from ..venus import views

Upvotes: 6

Related Questions