0👍
With guidance from stormlifter, I fixed the issue by making a init.py file in Mod
and installing the module with python setup.py install
. Here is a blog post that was useful as well:
http://djangotricks.blogspot.com/2008/09/note-on-python-paths.html
1👍
Your “Mod” folder appears to be missing a “init.py” which it will need if you want to import from it.
I also don’t recommend a capitalized folder in Python, kind of confusing.
I’d also recommend you add “mod” to your python path so you’re not having to do Mod.mod.module you can just do mod.module. I assume you have “mod” (lowercase) as an “INSTALLED_APP” in settings.py? Or is “module” the app? Either way you may want to check out Django’s documentation on how to organize a project, especially if this is your first time.
- [Answer]-GeoDjango distance query ForeignKey
- [Answer]-Feeding two ManyToManyFields of one QuerySet into HTML table columns
- [Answer]-'dict' object has no attribute 'save' POST doesn't work