Skip to content

Commit

Permalink
Upgrade django-hijack (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblum committed Apr 14, 2016
1 parent 37845f3 commit d8b3fa7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
11 changes: 11 additions & 0 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ with proper certifications. To load them, run::

python manage.py loadworkflowsampledata <WORKFLOW_SLUG>/<WORKFLOW_VERSION>


If you would like to load all of the workflows, then run::

python manage.py loadallworkflows

The example workflows we currently release with Orchestra are:

* A :ref:`simple demo workflow <demo-section>` with one human and one machine
Expand All @@ -152,6 +157,12 @@ of your own at any time once Orchestra is running. If you haven't created an
admin account for your Django project, you can load a sample one (username:
``admin``, password: ``admin``) with ``python manage.py loaddata demo_admin``.

We provide the option to use the third-party package `django-hijack
<https://github.com/arteria/django-hijack>`_ to act on behalf of users. To
enable this setting, ensure that the following setting is set
``HIJACK_ALLOW_GET_REQUESTS = True``, in addition to including the urls
referenced above.

Now Orchestra should be ready to go! If you're confused about any of the above,
check out our barebones `example project <https://github.com/unlimitedlabs/orchestra/tree/stable/example_project>`_.

Expand Down
16 changes: 10 additions & 6 deletions example_project/example_project/orchestra_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ def setup_orchestra(settings_module_name):
'orchestra',
'beanstalk_dispatch',
'registration',
'hijack',
'compat'
)

settings.STATICFILES_FINDERS += (
Expand Down Expand Up @@ -83,10 +81,6 @@ def setup_orchestra(settings_module_name):
settings.REGISTRATION_AUTO_LOGIN = True # Automatically log the user in.
settings.INCLUDE_REGISTER_URL = False

# Prevent hijack buttons from displaying in admin (otherwise, hijack can't
# be disabled by excluding the relevant URLs)
settings.SHOW_HIJACKUSER_IN_ADMIN = False

# API Authentication
#####################

Expand All @@ -113,6 +107,16 @@ def setup_orchestra(settings_module_name):
),
}

# Hijack settings
settings.INSTALLED_APPS += (
'hijack',
'compat',
'hijack_admin',
)

# Optionally toggle this to enable user hijack functionality.
settings.HIJACK_ALLOW_GET_REQUESTS = True

# Machine Step Scheduling
##########################

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ slacker==0.9.9
pandas==0.18.0
python-dateutil==2.5.2
django-hijack==2.1.0
django-hijack-admin==2.1.0
django-money==0.7.6

# Documentation requirements
Expand Down

0 comments on commit d8b3fa7

Please sign in to comment.