Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Update module name in docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
carljm committed Apr 2, 2012
1 parent a9b4040 commit 0ffa08d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 27 deletions.
24 changes: 12 additions & 12 deletions docs/deployment.rst
Expand Up @@ -3,20 +3,20 @@ Deployment

Django's built-in ``runserver`` is not suitable for a production deployment;
use a WSGI-compatible webserver such as `Apache`_ with `mod_wsgi`_, or
`gunicorn`_. A WSGI application callable is provided in ``cc/deploy/wsgi.py``
`gunicorn`_. A WSGI application callable is provided in ``moztrap/deploy/wsgi.py``
in the ``application`` object.

You'll also need to serve the `static assets`_; `Apache`_ or `nginx`_ can do
this.

You'll need a functioning SMTP server for sending user registration
confirmation emails; configure the ``EMAIL_*`` settings and
``DEFAULT_FROM_EMAIL`` in your ``cc/settings/local.py`` to the appropriate
``DEFAULT_FROM_EMAIL`` in your ``moztrap/settings/local.py`` to the appropriate
values for your server.

In addition to the notes here, you should read through all comments in
``cc/settings/local.sample.py`` and make appropriate adjustments to your
``cc/settings/local.py`` before deploying this app into production.
``moztrap/settings/local.sample.py`` and make appropriate adjustments to your
``moztrap/settings/local.py`` before deploying this app into production.

.. _Apache: http://httpd.apache.org
.. _mod_wsgi: http://modwsgi.org
Expand All @@ -30,16 +30,16 @@ Logins

By default all access to the site requires authentication. If the
``ALLOW_ANONYMOUS_ACCESS`` setting is set to ``True`` in
``cc/settings/local.py``, anonymous users will be able to read-only browse the
``moztrap/settings/local.py``, anonymous users will be able to read-only browse the
management and test-results pages (but will not be able to submit test results
or modify anything).

By default MozTrap uses `BrowserID`_ for all logins, but it also
supports conventional username/password logins. To switch to username/password
logins, just set ``USE_BROWSERID`` to ``False`` in ``cc/settings/local.py``.
logins, just set ``USE_BROWSERID`` to ``False`` in ``moztrap/settings/local.py``.

If using BrowserID (the default), you need to make sure that your ``SITE_URL``
is set correctly in ``cc/settings/local.py``, or BrowserID logins will not
is set correctly in ``moztrap/settings/local.py``, or BrowserID logins will not
work.

.. _BrowserID: http://browserid.org
Expand All @@ -58,7 +58,7 @@ does not include the compiled dependencies listed in
system package managers. The ``site.addsitedir`` function should be used to
add the ``requirements/vendor/lib/python`` directory to sys.path, to ensure
that ``.pth`` files are processed. A WSGI entry-point script is provided in
``cc/deploy/vendor_wsgi.py`` that makes the necessary ``sys.path`` adjustments,
``moztrap/deploy/vendor_wsgi.py`` that makes the necessary ``sys.path`` adjustments,
as well as a version of ``manage.py`` in ``vendor-manage.py``.

If you are using the vendor library and you want to run the MozTrap
Expand All @@ -81,7 +81,7 @@ In a production deployment this app should be served exclusively over HTTPS,
since almost all use of the site is authenticated, and serving authenticated
pages over HTTP invites session hijacking attacks. The
``SESSION_COOKIE_SECURE`` setting should be set to ``True`` in
``cc/settings/local.py`` when the app is being served over HTTPS.
``moztrap/settings/local.py`` when the app is being served over HTTPS.

Run ``python manage.py checksecure`` on your production deployment to check
that your security settings are correct.
Expand All @@ -96,11 +96,11 @@ uses `django-compressor`_ to compress and minify them. Follow these steps to
deploy the static assets into production:

1. Ensure that ``COMPRESS_ENABLED`` and ``COMPRESS_OFFLINE`` are both
uncommented and set to ``True`` in ``cc/settings/local.py``.
uncommented and set to ``True`` in ``moztrap/settings/local.py``.

2. Run ``python manage.py collectstatic`` to collect all static assets into the
``collected-assets`` directory (or whatever ``STATIC_ROOT`` is set to in
``cc/settings/local.py``).
``moztrap/settings/local.py``).

3. Run ``python manage.py compress`` to minify and concatenate static assets.

Expand All @@ -126,7 +126,7 @@ driver option "init_command" to "SET storage_engine=InnoDB". This causes
the SET command to be run on each database connection, which is an
unnecessary slowdown once all tables have been created. Thus, on a
production server, you should comment this option from your
``cc/settings/local.py`` file's ``DATABASES`` setting after you've run
``moztrap/settings/local.py`` file's ``DATABASES`` setting after you've run
``python manage.py syncdb --migrate`` to create all tables (uncomment it
before running ``python manage.py syncdb`` or ``python manage.py migrate``
after an update to the MozTrap codebase, or before trying to run the
Expand Down
10 changes: 6 additions & 4 deletions docs/development.rst
Expand Up @@ -114,10 +114,12 @@ will not overwrite that superuser.
Regenerating the sample data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The sample data fixture is generated using `django-fixture-generator`_ via the
code in ``cc/model/core/fixture_gen.py``,
``cc/model/environments/fixture_gen.py``, ``cc/model/tags/fixture_gen.py``,
``cc/model/library/fixture_gen.py`` and ``cc/model/execution/fixture_gen.py``.
The sample data fixture is generated using `django-fixture-generator`_ via
the code in ``moztrap/model/core/fixture_gen.py``,
``moztrap/model/environments/fixture_gen.py``,
``moztrap/model/tags/fixture_gen.py``,
``moztrap/model/library/fixture_gen.py`` and
``moztrap/model/execution/fixture_gen.py``.

If you've modified one of the above files, you can regenerate the fixture by
running ``bin/regenerate-sample-data``.
Expand Down
4 changes: 2 additions & 2 deletions docs/installation.rst
Expand Up @@ -100,8 +100,8 @@ MySQL database. In that case, you'll need to append ``-u someuser`` to the end
of that command, where ``someuser`` is a MySQL user who does have permission to
create databases (in many cases ``-u root`` will work). If you have to use
``-u`` to create the database, then before going on to step 5 you'll also need
to create a ``cc/settings/local.py`` file (copy the sample provided at
``cc/settings/local.sample.py``), and uncomment the ``DATABASES`` setting,
to create a ``moztrap/settings/local.py`` file (copy the sample provided at
``moztrap/settings/local.sample.py``), and uncomment the ``DATABASES`` setting,
changing the ``USER`` key to the same username you passed to ``-u``.


Expand Down
17 changes: 9 additions & 8 deletions docs/standards.rst
Expand Up @@ -125,14 +125,15 @@ the next by a single blank line:

Within each group, order imports alphabetically.

For imports from within MozTrap, use explicit relative imports for
imports from the same package or the parent package (i.e. where the explicit
relative import path begins with one or two dots). For more distant imports,
it's usually more readable to give the full absolute path. Thus, for code in
``cc.view.manage.runs.views``, you could do ``from .forms import AddRunForm``
and ``from ..cases.forms import AddCaseForm``, but it's probably better to do
``from cc.view.lists import decorators`` rather than ``from ....lists import
decorators``; more than two dots become difficult to distinguish visually.
For imports from within MozTrap, use explicit relative imports for imports
from the same package or the parent package (i.e. where the explicit
relative import path begins with one or two dots). For more distant
imports, it's usually more readable to give the full absolute path. Thus,
for code in ``moztrap.view.manage.runs.views``, you could do ``from .forms
import AddRunForm`` and ``from ..cases.forms import AddCaseForm``, but it's
probably better to do ``from moztrap.view.lists import decorators`` rather
than ``from ....lists import decorators``; more than two dots become
difficult to distinguish visually.

Never use implicit relative imports; if an import does not begin with a dot, it
should be a top-level module. In other words, if ``models.py`` is a sibling
Expand Down
2 changes: 1 addition & 1 deletion docs/upgrading.rst
Expand Up @@ -45,7 +45,7 @@ upgrade, whether it's necessary or not.

It is possible that a database migration will include the creation of a new
database table. If you've commented out the ``SET storage_engine=InnoDB``
``init_command`` in your ``cc/settings/local.py`` for performance reasons
``init_command`` in your ``moztrap/settings/local.py`` for performance reasons
(see :ref:`database-performance-tweak`), you should uncomment it before
running any migrations, to ensure that all new tables are created as
``InnoDB`` tables.
Expand Down

0 comments on commit 0ffa08d

Please sign in to comment.