Is it possible to version control custom public workspaces (Frappe v14)

I’m building a custom app for which I’d like to have public workspace that will be accessible to all users.

I’m able to make this through Desk when logged in as Administrator but I’m wondering if its possible to do this through code / publish it to code for versioning.

I already have Development mode on for versioning other parts of the app i.e. custom Doctypes etc

frappe 14.40.0

Export Workspaces as fixtures. This action will create JSON files in your app folder.

This doc talks about custom field, but is the same thing for Workspaces.

https://frappeframework.com/docs/user/en/guides/app-development/how-to-create-custom-fields-during-app-installation

Hope this helps.

Thanks! For a hot sec I thought I’d be stuck maintaining the whole workspace.json but as it turns out I can actually filter my fixture to only export my own workspace like so:

#hooks.py
fixtures = [
    {"dt": "Workspace", "filters": [["title", "like", ["Demo"]]]},
]

bench --site mysite export-fixtures places it in myapp/fixtures

bench migrate pushes local changes (provided I also update the content section to match)

That was very helpful.

1 Like

Filtering can be done easily too with module field. Editing workspace can assign to a module (app)

fixtures = [
    {"dt": "Workspace", "filters": [["module", "=", "your_app"]]},
]

Glad to be helpful. :slight_smile:

1 Like

That’s actually much more convenient! :grin: