The following instructions can be ignored when deploying to a staging or production environment, but may be helpful to a developer working on the project or running automated tests.
By default, this project is configured to mark session cookies as secure. To
enable login over HTTP (e.g., when developing with Django's runserver), you
will need to override this in your localsettings.py
. See the example
and comments in localsettings.py.dist
.
Certain unit tests pass test user credentials to Fedora, in order to test and simulate accessing Fedora as the logged in user. For tests to work properly, the unit test user should be defined (with appropriate permissions) as a fedora account. See :mod:`openemory.publication.tests` for account details.
The use of oracle tablespaces in the table name of
:class:`~openemory.accounts.models.EsdPerson` prevents the application from
working with a sqlite3 database. MySQL handles the unusual value as a table
name. If you must use sqlite3, simple change that class's db_table
or
use the default value.
The test, staging, and development versions of the application access the read-only Emory Shared Data oracle database. Due to security restrictions on the database, it is only available from select machines. If your development environment is not one of those machines (and it probably isn't), then set up a MySQL database, and load a fixture with a small but carefully-selected sample of real or realistic data:
$ ./manage.py loaddata --database=esd esdpeople
Because this is a static database, multiple developers may work a single copy of this fixture. In this case, it is highly recommended to configure a unique TEST_NAME for your esd database to avoid database collisions when running unit tests.
When developing locally, DEV_ENV
should be set to True in
localsettings.py
. This will cause PIDs to be generated using the
default method instead of using the PIDMan server if the PIDMAN
variables are not configured in localsettings.py
.
:mod:`openemory` uses :mod:`south` to manage and db models, but due to
the multi-db setup with ESD, South migrations and tests must be
disabled when running unit tests (see settings for
SKIP_SOUTH_TESTS
and SOUTH_TESTS_MIGRATE
in settings.py
).
In particular, this means that any initial data or data fixtures normally managed by :mod:`south` will not be automatically loaded when running unit tests; such fixtures should be explicitly included as test fixtures where they are required.
Django email configurations should not be needed in staging or production, but to test sending emails on a development machine, you may need to add settings for EMAIL_HOST and SERVER_EMAIL.
Note
As of 05/16/2013 due to a change on the SMTP server, it may not longer be possible to send emails from developer machines.
- jQuery "dirty form" plugin (GPL/MIT) http://plugins.jquery.com/project/dirtyform https://github.com/acvwilson/dirty_form
- Inline formset handling for ModelForm from django snippets added as openemory.inlinemodelformsets. BSD license.
- Creative Commons license icons downloaded from http://creativecommons.org/about/downloads. Per Creative Commons policies, these icons may only be used to point to the appropriate license; see http://creativecommons.org/policies for more information.
- django-dynamic-formset jQuery plugin New BSD license.
- livequery (needed for dynamic dirtyform), MIT license
- XML icon (for xml admin links),
- CC attribution/non-commercial/no-derivative