How do I get the filepath for a class in Python?
try:
import sys, osos.path.abspath(sys.modules[LocationArtifact.__module__].__file__)
This is the wrong approach for Django and really forcing things.
The typical Django app pattern is:
- /project
- /appname
- models.py
- views.py
- /templates
- index.html
- etc.
- /appname