Merged a branch I was working on to add support for unlimited dashboards. 
This branch also has support for removing widgets from a dashboard.

Commit: 
https://gitlab.com/mayan-edms/mayan-edms/commit/6ec235afc00daf5258ff1c2049f8091247a453c6

The dashboard widgets are now in a module called dashboard_widgets.py in 
each app. The dashboards are in a module called dashboards.py.
By default on the common app has a dashboard called `dashboard_main`.

For example to remove the "Total documents" dashboard widget use in any app 
apps.py file:

from common.dashboads import dashboard_main 
from documents.dashboard_widgets import widget_total_documents

dashboard_main.remove_widget(widget=widget_total_documents)

This has been merged and will be available in the next release.


On Wednesday, August 9, 2017 at 2:48:52 PM UTC-4, LeVon Smoker wrote:
>
> I got this to work by removing the queryset parameter.
>
> Now I'm wondering how to *remove* specific widgets...
>
> LeVon S.
>
> On Wednesday, August 9, 2017 at 1:39:36 PM UTC-4, LeVon Smoker wrote:
>>
>> I have a custom app (hrcsb_overrides) where I have am keeping my 
>> customizations to Mayan. I added the below code to try to add a widget to 
>> the home page as a shortcut to Cabinets (also to experiment).
>>         Cabinet = self.get_model('Cabinet')
>>
>>         DashboardWidget(
>>             icon='fa fa-folder',
>>             queryset=Cabinet.objects.all(),
>>             label=_('Cabinets'),
>>             link=reverse_lazy('cabinets:cabinet_list')
>>         )
>>
>> The call to get_model generates an error
>> LookupError: App 'hrcsb_overrides' doesn't have a 'Cabinet' model.
>>
>>
>> which I understand but I can't figure my way around this. Maybe I'm in 
>> the wrong place...
>>
>> Thanks,
>> LeVon Smoker
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to