Frappe

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(以“Frappe 是一个全堆栈的 Python & JavaScript web 应用框架,采用MIT许可协议。 ERPNext 基于 Frappe 构建。 ==链接== *[https://frapp...”为内容创建页面)
 
(项目)
 
(未显示1个用户的23个中间版本)
第1行: 第1行:
 +
Frappe
 +
 +
[[文件:frappe-logo-type.png|right|Frappe]]
 +
 +
[[文件:frappe-framework-logo.png|right|Frappe Framework]]
 +
 +
==简介==
 
Frappe 是一个全堆栈的 [[Python]] & [[JavaScript]] web 应用框架,采用MIT许可协议。
 
Frappe 是一个全堆栈的 [[Python]] & [[JavaScript]] web 应用框架,采用MIT许可协议。
  
 
[[ERPNext]] 基于 Frappe 构建。
 
[[ERPNext]] 基于 Frappe 构建。
 +
 +
==功能==
 +
 +
==指南==
 +
通过Frappe框架构建应用的步骤:
 +
*构建一个新应用(App)
 +
*构建模块(Models)
 +
*创建用户和记录(Users and Records)
 +
*创建控制器(Controllers)
 +
*创建Web视图(Views)
 +
*设置钩子和任务(Hooks and Tasks)
 +
 +
==DocType==
 +
[https://github.com/frappe/frappe/tree/develop/frappe/core/doctype/doctype DocType]  是一个Frappe应用的基础构建模块,包含MVC(模型-视图-控制器)三要素,表现为:
 +
*数据库中的Table
 +
*应用中的Form
 +
*Controller (class) 执行商业逻辑
 +
 +
在Frappe, [http://frappe.github.io/frappe/current/models/ 模型(models)被称为DocTypes]。
 +
 +
DocTypes = DocField(字段)/[https://frappe.github.io/frappe/current/models/core/docfield tabDocField] + DocPerms(角色权限)/[https://frappe.github.io/frappe/current/models/core/docperm tabDocPerm]
 +
 +
当DocType创建并保存,新的表就在数据库中被创建,命名为tab[doctype]。
 +
 +
DocType更新时,JSON模型文件也随着bench migrate命令的执行被更新并同步到数据库。
 +
 +
==Module==
 +
app, [https://github.com/frappe/frappe/blob/develop/frappe/modules.txt module] 模块化设计 [https://frappe.io/docs/user/en/tutorial/models Frappe Framework: Models (DocTypes)]
 +
*Core
 +
*Website
 +
*Workflow
 +
*Email
 +
*Custom
 +
*Geo
 +
*Desk
 +
*Print
 +
*Integrations
 +
*Integration Broker
 +
 +
==PostgreSQL==
 +
Hack Frappe 提供对 [[PostgreSQL]] 的支持。
 +
 +
.py源文件中有很多类似frappe.db.sql这样的语句,见图 DB SQL
 +
 +
==项目==
 +
*[https://github.com/frappe/frappe Frappe @ GitHub]
 +
*[https://github.com/frappe/bench Bench] CLI to manage Multi-tenant deployments for Frappe apps 
 +
*[https://github.com/frappe/books books] Free Desktop Accounting Software for small-businesses and freelancers.
 +
*[https://github.com/Shopify/shopify_python_api Shopify Python API]
 +
 +
==图集==
 +
<gallery>
 +
image:frappe-architecture.png|架构
 +
image:erpnext-doctype.png|DocType
 +
image:erpnext-doctype-user.png|User
 +
image:frappe-db-sql.png|DB SQL
 +
</gallery>
  
 
==链接==
 
==链接==
 
*[https://frappe.io/ Frappe官网]
 
*[https://frappe.io/ Frappe官网]
*[https://github.com/frappe/frappe Frappe @ GitHub]
 
 
*[https://docs.frappe.io/current/models Frappe Framework Models]
 
*[https://docs.frappe.io/current/models Frappe Framework Models]
 
*[https://docs.frappe.io/current/api Frappe Framework API]
 
*[https://docs.frappe.io/current/api Frappe Framework API]
第12行: 第75行:
 
[[category:ERP]]
 
[[category:ERP]]
 
[[category:python]]
 
[[category:python]]
 +
[[category:huihoo]]

2022年3月14日 (一) 10:17的最后版本

Frappe

Frappe
Frappe Framework

目录

[编辑] 简介

Frappe 是一个全堆栈的 Python & JavaScript web 应用框架,采用MIT许可协议。

ERPNext 基于 Frappe 构建。

[编辑] 功能

[编辑] 指南

通过Frappe框架构建应用的步骤:

  • 构建一个新应用(App)
  • 构建模块(Models)
  • 创建用户和记录(Users and Records)
  • 创建控制器(Controllers)
  • 创建Web视图(Views)
  • 设置钩子和任务(Hooks and Tasks)

[编辑] DocType

DocType 是一个Frappe应用的基础构建模块,包含MVC(模型-视图-控制器)三要素,表现为:

  • 数据库中的Table
  • 应用中的Form
  • Controller (class) 执行商业逻辑

在Frappe, 模型(models)被称为DocTypes

DocTypes = DocField(字段)/tabDocField + DocPerms(角色权限)/tabDocPerm

当DocType创建并保存,新的表就在数据库中被创建,命名为tab[doctype]。

DocType更新时,JSON模型文件也随着bench migrate命令的执行被更新并同步到数据库。

[编辑] Module

app, module 模块化设计 Frappe Framework: Models (DocTypes)

  • Core
  • Website
  • Workflow
  • Email
  • Custom
  • Geo
  • Desk
  • Print
  • Integrations
  • Integration Broker

[编辑] PostgreSQL

Hack Frappe 提供对 PostgreSQL 的支持。

.py源文件中有很多类似frappe.db.sql这样的语句,见图 DB SQL

[编辑] 项目

[编辑] 图集

[编辑] 链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱