Merge pull request #1572 from vjFaLk/tutorial-improvements

Documentation Improvements
This commit is contained in:
Anand Doshi 2016-02-16 13:04:02 +05:30
commit b6e22b2941
10 changed files with 13 additions and 11 deletions

2
frappe/config/tools.py Normal file
View file

@ -0,0 +1,2 @@
from __future__ import unicode_literals
from frappe import _

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -17,7 +17,7 @@ In the Fields Table, you can add the fields (properties) of the DocType (Article
Fields are much more than database columns, they can be:
1. Columns in the database
1. For Layout (section / column breaks)
1. Layout helpers (section / column breaks)
1. Child tables (Table type field)
1. HTML
1. Actions (button)

View file

@ -29,7 +29,7 @@ To start the script, in the `library_management/doctype/library_transaction` fol
});
1. **frappe.ui.form.on(*doctype*, *fieldname*, *handler*)** is used to bind a handler to the event when the property library_member is set.
1. In the handler, we trigger an AJAX call to `frappe.client.get`. In response we get the requested object as JSON. [Learn more about the API](/help/rest_api).
1. In the handler, we trigger an AJAX call to `frappe.client.get`. In response we get the requested object as JSON. [Learn more about the API](/frappe/user/guides/integration/rest_api).
1. Using **frappe.model.set_value(*doctype*, *name*, *fieldname*, *value*)** we set the value in the form.
**Note:** To check if your script works, remember to 'reload' the page before testing your script. Client script changes are not automatically picked up when you are in developer mode.

View file

@ -1,6 +1,6 @@
# Making Models
The next step is to create the models as we discussed in the introduction. In Frappe, models are called **DocType**. You can create new DocTypes from the Desk UI. **DocTypes** are made of fields called **DocField** and role based permissions are integrated into the models, these are called **DocPerms**.
The next step is to create the models as we discussed in the introduction. In Frappe, models are called **DocTypes**. You can create new DocTypes from the Desk UI. **DocTypes** are made of fields called **DocField** and role based permissions are integrated into the models, these are called **DocPerms**.
When a DocType is saved, a new table is created in the database. This table is named as `tab[doctype]`.
@ -11,7 +11,7 @@ When you create a **DocType** a new folder is created in the **Module** and a mo
To create models, you must set `developer_mode` as 1 in the `site_config.json` file located in /sites/library and execute command `bench clear-cache` or use the user menu in UI and click on "Reload" for the changes to take effect. You should now see the "Developer" app on your desk
{
"db_name": "library",
"db_name": "bcad64afbf",
"db_password": "v3qHDeVKvWVi7s97",
"developer_mode": 1
}

View file

@ -24,7 +24,7 @@ This can be set by entering the **Autoname** field. For controller, leave blank.
#### Link and Select Fields
Foreign keys are specified in Frappe as **Link** type fields. The target DocType must be mentioned in the Options table.
Foreign keys are specified in Frappe as **Link** type fields. The target DocType must be mentioned in the Options text area.
In our example, in the Library Transaction DocType, we have to link both the Library Member and the Article.

View file

@ -1,8 +1,8 @@
# Make a New App
After the bench is installed, there are two main folders, `apps` and `sites`. All the applications will be installed in apps.
Once the bench is installed, you will see two main folders, `apps` and `sites`. All the applications will be installed in apps.
To make a new application, go to your bench folder and run, `bench new-app {app_name}` and fill in details about the application. This will create a boilerplate application for your.
To make a new application, go to your bench folder and run, `bench new-app {app_name}` and fill in details about the application. This will create a boilerplate application for you.
$ bench new-app library_management
App Title (defaut: Lib Mgt): Liblary Management

View file

@ -1,6 +1,6 @@
# Reports
You can also click on the Reports Icon on the toolbar (right) to see tabulated records
You can also click on the Reports text on the sidebar (left) to see tabulated records
<img class="screenshot" alt="Report" src="{{docs_base_url}}/assets/img/report.png">

View file

@ -48,6 +48,6 @@ Now let us install our app `library_management` in our site `library`
Example:
$ bench install-app library_management
$ bench --site library install-app library_management
{next}

View file

@ -20,12 +20,12 @@ Now login with :
Login ID: **Administrator**
Password : **Use the password that was generated during installation**
Password : **Use the password that was created during installation**
When you login, you should see the "Desk" home page
<img class="screenshot" alt="Desk" src="{{docs_base_url}}/assets/img/desk.png">
As you can see, the Frappe basic system comes with a bunch of pre-loaded applications and screens like To Do, Calendar etc. These apps can integrated in your app workflow as we progress.
As you can see, the Frappe basic system comes with several pre-loaded applications like To Do, File Manager etc. These apps can integrated in your app workflow as we progress.
{next}