Studio User Guide
Overview
Framework-M Studio is a visual development environment for creating and managing DocTypes.
Starting Studio
# Start Studio server
uv run m studio
# Or with a specific port
uv run m studio --port 8000
Then open http://localhost:8000/studio in your browser.
Creating a DocType
- Navigate to DocTypes - Click "DocTypes" in the sidebar
- Click "Create" - Opens the DocType editor
- Enter Name - Use PascalCase (e.g.,
SalesOrder) - Add Fields - Click "Add Field" and configure each field
- Save - Click "Save" to generate the Python file
Adding Fields
Each field has:
- Name - Python identifier (snake_case)
- Type - Select from: Text, Integer, Float, Boolean, Date, etc.
- Required - Whether the field is mandatory
- Default - Optional default value
- Validators - Min/max length, pattern, min/max value
Configuring Permissions
Permissions are defined in the DocType's Meta class:
- Enable in the Properties panel
- Set
is_submittable = Truefor workflow-enabled docs
Using Git Mode
Viewing Status:
- Click the Git icon in the sidebar
- See current branch, modified files, and commit history
Committing Changes:
- Make changes to DocTypes
- Open Git panel
- Enter commit message
- Click "Commit"
Pushing to Remote:
- Commit your changes first
- Click "Push" to upload to GitHub
Sandbox Mode
Test DocTypes without saving:
- Open a DocType
- Switch to "Sandbox" tab
- Use auto-generated mock data
- Test CRUD operations
- Verify validation rules
Controller Hooks
Available lifecycle hooks:
validate- Before save validationbefore_save- Pre-persistence logicafter_save- Post-save side effectsbefore_delete- Pre-delete cleanup
Edit in the "Controller" tab.