[Answered ]-Python django can't get any views to work

1👍

You need to add __init__.py to your pages directory, to make it a “package” in python parlance.

This is a bit of non-obvious behaviour from python. Now you know.

👤Marcin

1👍

Could not import testsite.pages.views. Error was: No module named pages.views

You need to make pages importable. Put an __init__.py in the pages directory.

👤Amber

0👍

I think you need to create blank file __init__.py in pagesdirectory.

👤Tomas

Leave a comment