Ver código fonte

[docs] add headings

version-14
Rushabh Mehta 8 anos atrás
pai
commit
8f2b001bd0
51 arquivos alterados com 140 adições e 4 exclusões
  1. +2
    -0
      frappe/docs/user/en/bench/guides/diagnosing-the-scheduler.md
  2. +4
    -0
      frappe/docs/user/en/bench/guides/index.md
  3. +2
    -0
      frappe/docs/user/en/bench/guides/manual-setup.md
  4. +2
    -0
      frappe/docs/user/en/bench/guides/setup-multitenancy.md
  5. +2
    -0
      frappe/docs/user/en/bench/guides/setup-production.md
  6. +2
    -1
      frappe/docs/user/en/bench/index.md
  7. +2
    -0
      frappe/docs/user/en/bench/resources/background-services.md
  8. +2
    -0
      frappe/docs/user/en/bench/resources/bench-commands-cheatsheet.md
  9. +2
    -0
      frappe/docs/user/en/bench/resources/bench-procfile.md
  10. +4
    -0
      frappe/docs/user/en/bench/resources/index.md
  11. +2
    -0
      frappe/docs/user/en/guides/app-development/adding-custom-button-to-form.md
  12. +2
    -0
      frappe/docs/user/en/guides/app-development/adding-module-icons-on-desktop.md
  13. +2
    -0
      frappe/docs/user/en/guides/app-development/custom-module-icon.md
  14. +2
    -0
      frappe/docs/user/en/guides/app-development/dialogs-types.md
  15. +2
    -0
      frappe/docs/user/en/guides/app-development/executing-code-on-doctype-events.md
  16. +2
    -0
      frappe/docs/user/en/guides/app-development/how-enable-developer-mode-in-frappe.md
  17. +2
    -0
      frappe/docs/user/en/guides/app-development/how-to-create-custom-fields-during-app-installation.md
  18. +2
    -0
      frappe/docs/user/en/guides/app-development/how-to-improve-a-standard-control.md
  19. +2
    -0
      frappe/docs/user/en/guides/app-development/insert-a-document-via-api.md
  20. +2
    -0
      frappe/docs/user/en/guides/app-development/overriding-link-query-by-custom-script.md
  21. +2
    -0
      frappe/docs/user/en/guides/app-development/running-background-jobs.md
  22. +2
    -0
      frappe/docs/user/en/guides/app-development/single-type-doctype.md
  23. +2
    -0
      frappe/docs/user/en/guides/app-development/trigger-event-on-deletion-of-grid-row.md
  24. +2
    -0
      frappe/docs/user/en/guides/app-development/using-html-templates-in-javascript.md
  25. +2
    -0
      frappe/docs/user/en/guides/basics/frappe_ajax_call.md
  26. +2
    -0
      frappe/docs/user/en/guides/basics/translations.md
  27. +2
    -0
      frappe/docs/user/en/guides/data/import-large-csv-file.md
  28. +2
    -0
      frappe/docs/user/en/guides/deployment/email-notifications-for-failed-background-jobs.md
  29. +2
    -0
      frappe/docs/user/en/guides/deployment/how-to-enable-social-logins.md
  30. +2
    -0
      frappe/docs/user/en/guides/deployment/how-to-migrate-doctype-changes-to-production.md
  31. +2
    -0
      frappe/docs/user/en/guides/desk/formatter_for_link_fields.md
  32. +1
    -1
      frappe/docs/user/en/guides/portal-development/adding-pages.md
  33. +2
    -0
      frappe/docs/user/en/guides/reports-and-printing/getting-information-from-another-document-in-print-format.md
  34. +2
    -0
      frappe/docs/user/en/guides/reports-and-printing/how-to-make-query-report.md
  35. +2
    -0
      frappe/docs/user/en/guides/reports-and-printing/where-do-i-find-standard-print-formats.md
  36. +2
    -0
      frappe/docs/user/en/tutorial/form-client-scripting.md
  37. +2
    -0
      frappe/docs/user/es/bench/guides/diagnosing-the-scheduler.md
  38. +4
    -0
      frappe/docs/user/es/bench/guides/index.md
  39. +2
    -0
      frappe/docs/user/es/bench/guides/manual-setup.md
  40. +2
    -0
      frappe/docs/user/es/bench/guides/setup-multitenancy.md
  41. +2
    -0
      frappe/docs/user/es/bench/guides/setup-production.md
  42. +4
    -0
      frappe/docs/user/es/bench/index.md
  43. +2
    -0
      frappe/docs/user/es/bench/resources/background-services.md
  44. +2
    -0
      frappe/docs/user/es/bench/resources/bench-commands-cheatsheet.md
  45. +2
    -0
      frappe/docs/user/es/bench/resources/bench-procfile.md
  46. +4
    -0
      frappe/docs/user/es/bench/resources/index.md
  47. +2
    -0
      frappe/docs/user/es/tutorial/form-client-scripting.md
  48. +2
    -0
      frappe/docs/user/fr/tutorial/form-client-scripting.md
  49. +2
    -0
      frappe/docs/user/pt/tutorial/form-client-scripting.md
  50. +12
    -2
      frappe/website/purifycss.py
  51. +21
    -0
      frappe/website/utils.py

+ 2
- 0
frappe/docs/user/en/bench/guides/diagnosing-the-scheduler.md Ver arquivo

@@ -1,3 +1,5 @@
# Diagnosing The Scheduler

<!-- markdown -->

If you're experiencing delays in scheduled jobs or they don't seem to run, you can run the several commands to diagnose the issue.


+ 4
- 0
frappe/docs/user/en/bench/guides/index.md Ver arquivo

@@ -1 +1,5 @@
# Guides



{index}

+ 2
- 0
frappe/docs/user/en/bench/guides/manual-setup.md Ver arquivo

@@ -1,3 +1,5 @@
# Manual Setup

Manual Setup
--------------



+ 2
- 0
frappe/docs/user/en/bench/guides/setup-multitenancy.md Ver arquivo

@@ -1,3 +1,5 @@
# Setup Multitenancy

Assuming that you've already got your first site running and you've performed
the [production deployment steps](setup-production.html), this section explains how to host your second
site (and more). Your first site is automatically set as default site. You can


+ 2
- 0
frappe/docs/user/en/bench/guides/setup-production.md Ver arquivo

@@ -1,3 +1,5 @@
# Setup Production

You can setup the bench for production use by configuring two programs, Supervisor and nginx. If you want to revert your Production Setup to Development Setup refer to [these commands](https://github.com/frappe/bench/wiki/Stopping-Production-and-starting-Development)

####Easy Production Setup


+ 2
- 1
frappe/docs/user/en/bench/index.md Ver arquivo

@@ -1 +1,2 @@
{index}
# Bench


+ 2
- 0
frappe/docs/user/en/bench/resources/background-services.md Ver arquivo

@@ -1,3 +1,5 @@
# Background Services

External services
-----------------



+ 2
- 0
frappe/docs/user/en/bench/resources/bench-commands-cheatsheet.md Ver arquivo

@@ -1,3 +1,5 @@
# Bench Commands Cheatsheet

### General Usage
* `bench --version` - Show bench version
* `bench src` - Show bench repo directory


+ 2
- 0
frappe/docs/user/en/bench/resources/bench-procfile.md Ver arquivo

@@ -1,3 +1,5 @@
# Bench Procfile

`bench start` uses [honcho](http://honcho.readthedocs.org) to manage multiple processes in **developer mode**.

### Processes


+ 4
- 0
frappe/docs/user/en/bench/resources/index.md Ver arquivo

@@ -1 +1,5 @@
# Resources



{index}

+ 2
- 0
frappe/docs/user/en/guides/app-development/adding-custom-button-to-form.md Ver arquivo

@@ -1,3 +1,5 @@
# Adding Custom Button To Form

To create a custom button on your form, you need to edit the javascript file associated to your doctype. For example, If you want to add a custom button to User form then you must edit `user.js`.

In this file, you need to write a new method `add_custom_button` which should add a button to your form.


+ 2
- 0
frappe/docs/user/en/guides/app-development/adding-module-icons-on-desktop.md Ver arquivo

@@ -1,3 +1,5 @@
# Adding Module Icons On Desktop

To create a module icon for a Page, List or Module, you will have to edit the `config/desktop.py` file in your app.

In this file you will have to write the `get_data` method that will return a dict object with the module icon parameters


+ 2
- 0
frappe/docs/user/en/guides/app-development/custom-module-icon.md Ver arquivo

@@ -1,3 +1,5 @@
# Custom Module Icon

If you want to create a custom icon for your module, you will have to create an SVG file for your module and set the path to this file in the `desktop/config.py` of your app.<br>

This icon is loaded via AJAX first time, then it will be rendered.


+ 2
- 0
frappe/docs/user/en/guides/app-development/dialogs-types.md Ver arquivo

@@ -1,3 +1,5 @@
# Dialogs Types

Frappe provide a group of standard dialogs that are very usefull while coding.

## Alert Dialog


+ 2
- 0
frappe/docs/user/en/guides/app-development/executing-code-on-doctype-events.md Ver arquivo

@@ -1,3 +1,5 @@
# Executing Code On Doctype Events

To execute code when a DocType is inserted, validated (before saving), updated, submitted, cancelled, deleted, you must write in the DocType's controller module.

#### 1. Controller Module


+ 2
- 0
frappe/docs/user/en/guides/app-development/how-enable-developer-mode-in-frappe.md Ver arquivo

@@ -1,3 +1,5 @@
# How Enable Developer Mode In Frappe

When you are in application design mode and you want the changes in your DocTypes, Reports etc to affect the app repository, you must be in **Developer Mode**.

To enable developer mode, update the `site_config.json` file of your site in the sites folder for example:


+ 2
- 0
frappe/docs/user/en/guides/app-development/how-to-create-custom-fields-during-app-installation.md Ver arquivo

@@ -1,3 +1,5 @@
# How To Create Custom Fields During App Installation

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, add the new custom fields that your app requires, using the Frappe web application.


+ 2
- 0
frappe/docs/user/en/guides/app-development/how-to-improve-a-standard-control.md Ver arquivo

@@ -1,3 +1,5 @@
# How To Improve A Standard Control

Frappé has a couple of elegant and useful widgets, but some times we need to edit them to add small improvements. This small article will describe how to add new resources to the standard widgets.

Let me explain first our goal:


+ 2
- 0
frappe/docs/user/en/guides/app-development/insert-a-document-via-api.md Ver arquivo

@@ -1,3 +1,5 @@
# Insert A Document Via Api

You can insert documents via a script using the `frappe.get_doc` method

### Examples:


+ 2
- 0
frappe/docs/user/en/guides/app-development/overriding-link-query-by-custom-script.md Ver arquivo

@@ -1,3 +1,5 @@
# Overriding Link Query By Custom Script

You can override the standard link query by using `set_query`

### 1. Adding Fitlers


+ 2
- 0
frappe/docs/user/en/guides/app-development/running-background-jobs.md Ver arquivo

@@ -1,3 +1,5 @@
# Running Background Jobs

Sometimes you may not want a user request to be executed immediately but added to a queue that will be executed by a background worker. The advantage of doing this is that your web workers remain free to execute other requests and longer jobs do not eat up all of your resources.

From version 7, Frappe uses Python RQ to run background jobs.


+ 2
- 0
frappe/docs/user/en/guides/app-development/single-type-doctype.md Ver arquivo

@@ -1,3 +1,5 @@
# Single Type Doctype

DocTypes have a table associated with them. For example DocType **Customer** will have a table `tabCustomer` associated with it.

**Single** type DocTypes have no table associated and there is only one Document for it. This is similar to the Singleton pattern in Java. Single DocTypes are ideal for saving Settings (that are globally applicable) and for wizard / helper type forms that have no documents, but when the DocType is used for the Form UI.


+ 2
- 0
frappe/docs/user/en/guides/app-development/trigger-event-on-deletion-of-grid-row.md Ver arquivo

@@ -1,3 +1,5 @@
# Trigger Event On Deletion Of Grid Row

To trigger an event when a row from a Child Table has been deleted (when user clicks on `delete` button), you need to add a handler the `fieldname_remove` event to Child Table, where fieldname is the fieldname of the Child Table in Parent Table declaration.

For example:


+ 2
- 0
frappe/docs/user/en/guides/app-development/using-html-templates-in-javascript.md Ver arquivo

@@ -1,3 +1,5 @@
# Using Html Templates In Javascript

Often while building javascript interfaces, there is a need to render DOM as an HTML template. Frappe Framework uses John Resig's Microtemplate script to render HTML templates in the Desk application.

> Note 1: In Frappe we use the Jinja-like `{% raw %}{%{% endraw %}` tags to embed code rather than the standard `<%`


+ 2
- 0
frappe/docs/user/en/guides/basics/frappe_ajax_call.md Ver arquivo

@@ -1,3 +1,5 @@
# Frappe Ajax Call

In Frappe Framework, you can manage ajax calls via frappe.call. The frappe.call works in asynchronous manner ie. send requests and handle response via callback mechanism.

## frappe.call Structure


+ 2
- 0
frappe/docs/user/en/guides/basics/translations.md Ver arquivo

@@ -1,3 +1,5 @@
# Translations

<!-- jinja -->
<!-- static -->



+ 2
- 0
frappe/docs/user/en/guides/data/import-large-csv-file.md Ver arquivo

@@ -1,3 +1,5 @@
# Import Large Csv File

To import very large CSV files, you can use the bench utility `import-csv`.

The benefit is that this is not subject to timeouts if you use the web interface.


+ 2
- 0
frappe/docs/user/en/guides/deployment/email-notifications-for-failed-background-jobs.md Ver arquivo

@@ -1,3 +1,5 @@
# Email Notifications For Failed Background Jobs

<!-- markdown -->

<p>Frappe handles failure of jobs in the following way,</p><p>1) If a job fails, (raises exception), it's logged in Scheduler Log and&nbsp; <code>logs/worker.error.log</code>.<br>2) Keeps a lock file and would not run anymore if lock file is there.<br>3) Raises LockTimeoutError in case the lock file is more than 10 minutes old.</p>


+ 2
- 0
frappe/docs/user/en/guides/deployment/how-to-enable-social-logins.md Ver arquivo

@@ -1,3 +1,5 @@
# How To Enable Social Logins

Use Facebook, Google or GitHub authentication to login to Frappe, and your users will be spared from remembering another password.

The system uses the **Email Address** supplied by these services to **match with an existing user** in Frappe. If no such user is found, **a new user is created** of the default type **Website User**, if Signup is not disabled in Website Settings. Any System Manager can later change the user type from **Website User** to **System User**, so that the user can access the Desktop.


+ 2
- 0
frappe/docs/user/en/guides/deployment/how-to-migrate-doctype-changes-to-production.md Ver arquivo

@@ -1,3 +1,5 @@
# How To Migrate Doctype Changes To Production

#### 1. DocType / Schema Changes

If you are in `developer_mode`, the `.json` files for each **DocType** are automatically updated.


+ 2
- 0
frappe/docs/user/en/guides/desk/formatter_for_link_fields.md Ver arquivo

@@ -1,3 +1,5 @@
# Formatter For Link Fields

In case where a code and a name is maintained for an entity, (for example for Employee there may be an Employee Code and Employee Name) and we want to show both the ID and name in a link field, we can make a formatter.

#### Example:


+ 1
- 1
frappe/docs/user/en/guides/portal-development/adding-pages.md Ver arquivo

@@ -13,7 +13,7 @@ Either file must be present for the system to make this a valid folder to build
### Markdown

# This is a title
This is some page content
a [link](/link/to/page)



+ 2
- 0
frappe/docs/user/en/guides/reports-and-printing/getting-information-from-another-document-in-print-format.md Ver arquivo

@@ -1,3 +1,5 @@
# Getting Information From Another Document In Print Format

In a print format, you can get data from another document. For example in if you have a fields called `sales_order` in Sales Invoice, then you can get the sales order details using `frappe.get_doc`:

{% raw %}


+ 2
- 0
frappe/docs/user/en/guides/reports-and-printing/how-to-make-query-report.md Ver arquivo

@@ -1,3 +1,5 @@
# How To Make Query Report

You can create tabulated reports using complex SQL queries by creating a new Report. These reports can be created by a System Manager and are stored in the Database

&gt; Note: You will need System Manager Permissions for this.


+ 2
- 0
frappe/docs/user/en/guides/reports-and-printing/where-do-i-find-standard-print-formats.md Ver arquivo

@@ -1,3 +1,5 @@
# Where Do I Find Standard Print Formats

Standard Print formats are <b>auto generated</b> from the layout of the DocType. You can customize the standard format by
<br>
<br>


+ 2
- 0
frappe/docs/user/en/tutorial/form-client-scripting.md Ver arquivo

@@ -1,3 +1,5 @@
# Form Client Scripting

## Scripting Forms

Now we have created a basic system that works out of the box without us having to write any code. Let us now write some scripts to make the application richer and add validations so that the user does not enter wrong data.


+ 2
- 0
frappe/docs/user/es/bench/guides/diagnosing-the-scheduler.md Ver arquivo

@@ -1,3 +1,5 @@
# Diagnosing The Scheduler

<!-- markdown -->

En caso que estes experimentando inconvenientes con las tareas programadas, puedes ejecutar varios comandos para diagnosticar el problema.


+ 4
- 0
frappe/docs/user/es/bench/guides/index.md Ver arquivo

@@ -1 +1,5 @@
# Guides



{index}

+ 2
- 0
frappe/docs/user/es/bench/guides/manual-setup.md Ver arquivo

@@ -1,3 +1,5 @@
# Manual Setup

Instalación Manual
--------------



+ 2
- 0
frappe/docs/user/es/bench/guides/setup-multitenancy.md Ver arquivo

@@ -1,3 +1,5 @@
# Setup Multitenancy

Asumiento que tiene su primer site corriendo y ha realizado los
[pasos para producción](setup-production.html), esta sección explica como montar su segundo site (y más).
Su primer site se configuró como el site por defecto de forma automática. Puedes cambiarlo ejecutando el comando,


+ 2
- 0
frappe/docs/user/es/bench/guides/setup-production.md Ver arquivo

@@ -1,3 +1,5 @@
# Setup Production

Puedes configurar el bench para producción configurando dos parametros, Supervisor y nginx. Si quieres volver a ponerlo en desarrollo debes ver [estos comandos](https://github.com/frappe/bench/wiki/Stopping-Production-and-starting-Development)

####Configuración para producción facíl


+ 4
- 0
frappe/docs/user/es/bench/index.md Ver arquivo

@@ -1 +1,5 @@
# Bench



{index}

+ 2
- 0
frappe/docs/user/es/bench/resources/background-services.md Ver arquivo

@@ -1,3 +1,5 @@
# Background Services

Servicios Externos
-----------------



+ 2
- 0
frappe/docs/user/es/bench/resources/bench-commands-cheatsheet.md Ver arquivo

@@ -1,3 +1,5 @@
# Bench Commands Cheatsheet

### Uso General
* `bench --version` - Muestra la versión del bench
* `bench src` - Muestra el directorio repo del bench


+ 2
- 0
frappe/docs/user/es/bench/resources/bench-procfile.md Ver arquivo

@@ -1,3 +1,5 @@
# Bench Procfile

`bench start` usa [honcho](http://honcho.readthedocs.org) para manejar múltiples procesos en **developer mode**.

### Procesos


+ 4
- 0
frappe/docs/user/es/bench/resources/index.md Ver arquivo

@@ -1 +1,5 @@
# Resources



{index}

+ 2
- 0
frappe/docs/user/es/tutorial/form-client-scripting.md Ver arquivo

@@ -1,3 +1,5 @@
# Form Client Scripting

## Añadir Scripts a nuestros formularios

Ya que tenemos creado el sistema básico que funciona sin problemas sin escribir una linea de código. Vamos a escribir algunos scripts


+ 2
- 0
frappe/docs/user/fr/tutorial/form-client-scripting.md Ver arquivo

@@ -1,3 +1,5 @@
# Form Client Scripting

## Codes des formulaires

Jusqu'a maintenant, nous avons développé un système basique qui fonctionne parfaitement sans avoir eu besoin d'écrire une


+ 2
- 0
frappe/docs/user/pt/tutorial/form-client-scripting.md Ver arquivo

@@ -1,3 +1,5 @@
# Form Client Scripting

## Escrevendo script de formulários

Até agora nós criamos um sistema básico que funciona fora da caixa, sem ter que escrever nenhum código. Vamos agora escrever alguns scripts para tornar a aplicação mais rica e adicionar validações de formulários para o usuário não inserir dados incorretos.


+ 12
- 2
frappe/website/purifycss.py Ver arquivo

@@ -1,8 +1,18 @@
'''
Check for unused CSS Classes

sUpdate source and target apps below and run from CLI

bench --site [sitename] execute frappe.website.purifycss.purify.css

'''

import frappe, re, os

source = frappe.get_app_path('frappe_theme', 'public', 'less', 'frappe_theme.less')
target_apps = ['erpnext_com', 'frappe_io', 'translator', 'chart_of_accounts_builder', 'frappe_theme']

def purifycss():
source = frappe.get_app_path('frappe_theme', 'public', 'less', 'frappe_theme.less')
target_apps = ['erpnext_com', 'frappe_io', 'translator', 'chart_of_accounts_builder', 'frappe_theme']
with open(source, 'r') as f:
src = f.read()



+ 21
- 0
frappe/website/utils.py Ver arquivo

@@ -285,3 +285,24 @@ def extract_title(source, path):
title = os.path.basename(path.rsplit('.', )[0].rstrip('/')).replace('_', ' ').replace('-', ' ').title()

return title

def add_missing_headers():
'''Walk and add missing headers in docs (to be called from bench execute)'''
path = frappe.get_app_path('erpnext', 'docs')
for basepath, folders, files in os.walk(path):
for fname in files:
if fname.endswith('.md'):
with open(os.path.join(basepath, fname), 'r') as f:
content = frappe.as_unicode(f.read())

if not content.startswith('# ') and not '<h1>' in content:
with open(os.path.join(basepath, fname), 'w') as f:
if fname=='index.md':
fname = os.path.basename(basepath)
else:
fname = fname[:-3]
h = fname.replace('_', ' ').replace('-', ' ').title()
print h
content = '# {0}\n\n'.format(h) + content
f.write(content.encode('utf-8'))


Carregando…
Cancelar
Salvar