From 374b0f7a036c92ebc04ba232796ea0aa0e150040 Mon Sep 17 00:00:00 2001 From: jevonearth Date: Sun, 6 Dec 2015 14:46:27 -0800 Subject: [PATCH 1/2] Clarify that Custom Fields can be created on non app DocTypes during installation. Re-write title to refer to custom fields specifically. --- ...ow-to-create-custom-fields-during-app-installation.md} | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) rename frappe/docs/user/guides/app_development/{how-to-add-customizations-to-app.md => how-to-create-custom-fields-during-app-installation.md} (53%) diff --git a/frappe/docs/user/guides/app_development/how-to-add-customizations-to-app.md b/frappe/docs/user/guides/app_development/how-to-create-custom-fields-during-app-installation.md similarity index 53% rename from frappe/docs/user/guides/app_development/how-to-add-customizations-to-app.md rename to frappe/docs/user/guides/app_development/how-to-create-custom-fields-during-app-installation.md index 0c98f2a180..5c690005a3 100644 --- a/frappe/docs/user/guides/app_development/how-to-add-customizations-to-app.md +++ b/frappe/docs/user/guides/app_development/how-to-create-custom-fields-during-app-installation.md @@ -1,4 +1,6 @@ -If you want to add **Custom Fields** to your app so that they are automatically created when you app is installed on a new site, you will have to add them as **Fixtures** in the `hooks.py` file of your app. +Your custom app can automatically add **Custom Fields** to DocTypes outside of your app when it is installed to a new site. + +To do this, make sure your running bench with `developer_mode` enabled. Add your new custom fields via the Frappe web application. In your `hooks.py` file, add `"Custom Fields"` @@ -8,11 +10,11 @@ Export fixtures before you commit your app with: $ bench --site mysite export-fixtures -This will create a new folder called `fixtures` in your app folder and a `.csv` or `.json` file will be created with the custom fields. +This will create a new folder called `fixtures` in your app folder and a `.csv` or `.json` file will be created with the definition of the custom fields you added. This file will be automatically imported when the app is installed in a new site or updated via `bench update`. Note: You can also add single DocTypes like "Website Settings" as fixtures - \ No newline at end of file + From 801f0c14587c98fd7f42d0e372e40685a1173418 Mon Sep 17 00:00:00 2001 From: jevonearth Date: Sun, 6 Dec 2015 14:59:54 -0800 Subject: [PATCH 2/2] Remove statement that developer_mode is needed. --- .../how-to-create-custom-fields-during-app-installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/docs/user/guides/app_development/how-to-create-custom-fields-during-app-installation.md b/frappe/docs/user/guides/app_development/how-to-create-custom-fields-during-app-installation.md index 5c690005a3..20b7fdce30 100644 --- a/frappe/docs/user/guides/app_development/how-to-create-custom-fields-during-app-installation.md +++ b/frappe/docs/user/guides/app_development/how-to-create-custom-fields-during-app-installation.md @@ -1,6 +1,6 @@ Your custom app can automatically add **Custom Fields** to DocTypes outside of your app when it is installed to a new site. -To do this, make sure your running bench with `developer_mode` enabled. Add your new custom fields via the Frappe web application. +To do this, add the new custom fields that your app requires, using the Frappe web application. In your `hooks.py` file, add `"Custom Fields"`