Django, project structure
If the module is independent from Django, then it should be a standalone Python package, complete with a setup.py to install it. The Django models and webservices that use it can import like any other external dependencies.
If the module depends on you Django app, then it should be inside the app's directory. If it doesn't define new models, then it should not be in models.py.
Does this answer your question?
I'm currently working on a django project. I'm not completly new in django, but have some difficulties figuring out how would be the most 'djangonic' way to organize some files.
I have some classe that compute stuff, and can be used from the manage.py's cli, and by a webservice app. Those computation uses models from my core app and make call to the database.
The problem I face is that I can't figure where to put those source file.
I do not want to put them in a 'lib' folder. I think the modules in this folder will be django independent modules.
For the moment, the module is in the model of my app. But since it doesn't define any new structure, I don't think it is the cleanest way.
Any ideo to have a clean structure that respect the 'django way of life' ?
Thanks