Using MAYAN_COMMON_DISABLED_APPS

Questions, comments, discussions. Over time certain topics might be moved to their own category.
Post Reply
itsthejb
Posts: 8
Joined: Thu Sep 26, 2019 11:21 am

Using MAYAN_COMMON_DISABLED_APPS

Post by itsthejb »

Hi all,

My first post! Thanks to everyone here.

I'm keen to use MAYAN_)COMMON_DISABLED_APPS to disable a couple of apps I'll never use, specifically workflows and checkouts. I'm running through Docker/Compose, and can't seem to find the right format for the environmental variable and/or the app class names. Last try was:

Code: Select all

- MAYAN_COMMON_DISABLED_APPS=mayan.apps.document_states.apps.DocumentStatesApp mayan.apps.checkouts.apps.CheckoutsApp
This was searching for `default_app_config` in the repo. Workflows _appears_ to be called `DocumentStatesApp` in the code. However, this doesn't work. The setting appears correctly in the common Settings panel, but has no effect. No idea if I have the correct class names, or the incorrect string format. And can't find any other info.

Hope someone can help!

Thanks in advances

User avatar
rosarior
Developer
Developer
Posts: 513
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Using MAYAN_COMMON_DISABLED_APPS

Post by rosarior »

Hi,

Add the apps as a list and in the format:

Code: Select all

mayan.apps.document_states
Before:
2019-09-30_05-19.png
2019-09-30_05-19.png (31.89 KiB) Viewed 825 times
After:
2019-09-30_05-17.png
2019-09-30_05-17.png (31.17 KiB) Viewed 825 times
Attachments
2019-09-30_05-19.png
2019-09-30_05-19.png (31.89 KiB) Viewed 826 times

itsthejb
Posts: 8
Joined: Thu Sep 26, 2019 11:21 am

Re: Using MAYAN_COMMON_DISABLED_APPS

Post by itsthejb »

Hi there,

Thanks for the input and solution here. Sorry I missed this one! I was indeed successful in disabling Workflows, but having no success with Checkouts. It seems that correct ID to use is mayan.apps.checkouts, but then I get the following error at startup:
RuntimeError: Model class mayan.apps.checkouts.models.DocumentCheckout doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
Can anyone help here? Thanks!

User avatar
rosarior
Developer
Developer
Posts: 513
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Using MAYAN_COMMON_DISABLED_APPS

Post by rosarior »

Hi,

it is not possible to disable the checkouts app. The sources app uses it to determine if it should allow or block new document version from being created. For version 4 we are discussing some ideas to decouple the apps and make them independent.

Post Reply