Newbie question: New source drivers pluggable?

Technical aspects, customization, code samples.
Post Reply
Posts: 5
Joined: Tue Jun 22, 2021 5:23 pm

Newbie question: New source drivers pluggable?

Post by erny03 »

Sorry, I'm a newbie, I'm still evaluating Mayan.... :

Are new source drivers pluggable? I'm considering to add Dynamic WebTwain (I did this integration already in another django app.) My question is more oriented to: is there a way to define sources in third party libraries so that I can configure Mayan (through settings) to use it as new source without modifying the "sources" app?

(I'm still reading the source code and the docs, but it seems to me that the sources apps of v4.0.7 does not consider this case:

Code: Select all

    def ready(self):


        DocumentType = apps.get_model(
            app_label='documents', model_name='DocumentType'

        IMAPEmail = self.get_model(model_name='IMAPEmail')
        POP3Email = self.get_model(model_name='POP3Email')
        Source = self.get_model(model_name='Source')
        SaneScanner = self.get_model(model_name='SaneScanner')
        StagingFolderSource = self.get_model(model_name='StagingFolderSource')
        WatchFolderSource = self.get_model(model_name='WatchFolderSource')
        WebFormSource = self.get_model(model_name='WebFormSource')

        error_log = ErrorLog(app_config=self)

If not, could this be on the roadmap for a future version? We would / could have some cases of getting documents of external apps / sources (using a search / preview page).

Thanks in advance.
User avatar
Posts: 662
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico

Re: Newbie question: New source drivers pluggable?

Post by rosarior »


The sources app does not allow external registration of new sources. This was something we were aiming to fix for version 4.0.

The branch for this task is almost ready but there were some last minute details that prevented it from being merged. We are re targeting this for version 4.1.

The working branches are these: ... series_4_0 and ... p_refactor

The refactor allows the sources app to work using source backends or drivers, and allows apps other the source app itself to also register new ones.

Here is the list of issues depending on or relating to this work: ... 3A+Sources

Best regards.
2021-06-23_12-15.png (81.58 KiB) Viewed 132 times
2021-06-23_12-16.png (114.06 KiB) Viewed 132 times
Posts: 5
Joined: Tue Jun 22, 2021 5:23 pm

Re: Newbie question: New source drivers pluggable?

Post by erny03 »

Thanks for your quick response. I'll take a look at it. ;)
Post Reply