This section will provide some useful hints and tips for developing Argus.
Applying settings and switching between them¶
As elaborated in Site-specific settings, there are two ways to define settings in Argus:
with environment variables
For development, a simple and good practice is to define environment variables in a
This file serves as a “wrapper” to call
manage.py with a defined set of environment
variables, and simplifies the development process.
You may find it useful to have several
cmd.sh files for different purposes, for
instance to invoke different databases.
The files can be named
The limitation of environment variables is that they can only contain numbers, Boolean
1) and strings.
localsettings.py file to define settings that require more complex values,
such as conditional expressions, Python dicts and tuples.
Settings in the
settings.py file will override environment variables.
Note that the extra settings-file and
argus have to be in the python path.
We therefore recommend keeping your
settings.py files in the same directory as
Settings can be tested in
localsettings.py and moved to the other settings
Tip: If you copy the entire logging-setup from “argus.site.settings.dev”
localsettings.py remember to set
Otherwise, logentries will appear twice.
Do not check your
settings.py files into version control,
since they contain passwords and sensitive data.
To test/debug notifications as a whole, use the email subsystem (Media: Email in a
1025, and run a dummy
$ python -m smtpd -n -c DebuggingServer localhost:1025
Sent notifications will then be dumped to the console on the dummy server.