Skip to content

Commit

Permalink
Don't inject model admin default if it is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
javrasya committed Nov 17, 2019
1 parent 229b727 commit e283b48
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ to create the hooks.
* ``/admin/river/ontransithook/`` to hook up to a transition
* ``/admin/river/oncompletehook/`` to hook up to the completion of the workflow

* To create one for a specific workflow object you should use the admin interface for the workflow object itself. One amazing feature of ``django-river`` is now that it creates a default admin interface with the hookings for your workflow model class. If you have already defined one, ``django-river`` enriches your already defined admin with the hooking section. It is default enabled. To disable it just define ``RIVER_INJECT_MODEL_ADMIN`` to be ``False`` in the ``settings.py``.
* To create one for a specific workflow object you should use the admin interface for the workflow object itself. One amazing feature of ``django-river`` is now that
it creates a default admin interface with the hookings for your workflow model class. If you have already defined one, ``django-river`` enriches your already defined
admin with the hooking section. It is default disabled. To enable it just define ``RIVER_INJECT_MODEL_ADMIN`` to be ``True`` in the ``settings.py``.


**Note:** They can programmatically be created as well since they are model objects. If it is needed to be at workflow level, just don't provide the workflow object column. If it is needed
Expand Down
6 changes: 3 additions & 3 deletions docs/hooking/hooking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ to create the hooks.
* ``/admin/river/ontransithook/`` to hook up to a transition
* ``/admin/river/oncompletehook/`` to hook up to the completion of the workflow

* To create one for a specific workflow object you should use the admin interface for the workflow object itself. One amazing feature of ``django-river`` is now that it creates a default admin interface
with the hookings for your workflow model class. If you have already defined one, ``django-river`` enriches your already defined admin with the hooking section. It is default enabled. To disable it
just define ``RIVER_INJECT_MODEL_ADMIN`` to be ``False`` in the ``settings.py``.
* To create one for a specific workflow object you should use the admin interface for the workflow object itself. One amazing feature of ``django-river`` is now that
it creates a default admin interface with the hookings for your workflow model class. If you have already defined one, ``django-river`` enriches your already defined
admin with the hooking section. It is default disabled. To enable it just define ``RIVER_INJECT_MODEL_ADMIN`` to be ``True`` in the ``settings.py``.


**Note:** They can programmatically be created as well since they are model objects. If it is needed to be at workflow level, just don't provide the workflow object column. If it is needed
Expand Down
2 changes: 1 addition & 1 deletion river/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __getattr__(self, item):
'USER_CLASS': settings.AUTH_USER_MODEL,
'PERMISSION_CLASS': Permission,
'GROUP_CLASS': Group,
'INJECT_MODEL_ADMIN': True
'INJECT_MODEL_ADMIN': False
}
if item in allowed_configurations.keys():
default_value = allowed_configurations[item]
Expand Down

0 comments on commit e283b48

Please sign in to comment.