I ran into an issue regarding app specific settings.
I've got two Django projects, P1, and P2, each of them running in their own virtual env. P2 uses some models from the apps of P1, so I used add2virtualenv
(thanks to virtualenvwrapper) to tackle with depedencies.
The issue is that some of these P1 apps are relying on custom settings (simply located in p1/project/settings.py
, nothing fancy so far) which obviously strongly bother P2's execution.
For instance, when I run P2's tests:
$ ./p2/manage.py test
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
[...]
AttributeError: 'Settings' object has no attribute 'SOME_P1_APP_CUSTOM_SETTING'
How am I supposed to deal with that ? Is it broken by design, or does Django provide something elegant to handle the distribution of app specific settings ?
I'd like to avoid copy/pasting these settings in every project that requires them.