Getting started with Frappe
Frappe Framework.
In Frappe Every thing is designed using Frappe app, means When you Install Frappe ERP you get pre-installed app of Frappe.
This app contains all basic functionalities.
like creating new doctype(table) , doing validation etc.
Before Getting into Frappe. Let us understand few thing about frappe .
Here , we create the app then create module inside app finally we add doctype in the modules.
Frappe File Structure.
├── MANIFEST.in
├── README.md
├── library_management
│ ├── __init__.py
│ ├── config
│ │ ├── __init__.py
│ │ └── desktop.py
│ ├── hooks.py
│ ├── library_management
│ │ └── __init__.py
│ ├── modules.txt
│ ├── patches.txt
│ └── templates
│ ├── __init__.py
│ ├── generators
│ │ └── __init__.py
│ ├── pages
│ │ └── __init__.py
│ └── statics
├── license.txt
├── requirements.txt
└── setup.py
config
folder contains application configuration infodesktop.py
is where desktop icons can be added to the Deskhooks.py
is where integrations with the environment and other applications is mentioned.library_management
(inner) is a module that is bootstrapped. In Frappé, a module is where model and controller files reside.modules.txt
contains list of modules in the app. When you create a new module, it is required that you update it in this file.patches.txt
is where migration patches are written. They are python module references using the dot notation.templates
is the folder where web view templates are maintained. Templates for Login and other standard pages are bootstrapped in frappe.generators
are where templates for models are maintained, where each model instance has a separte web route, for example a Blog Post where each post has its unique web url. In Frappé, the templating engine used is Jinja2pages
is where single route templates are maintained. For example for a "/blog" type of page.
Hierarchy wise .
Once the bench is installed, you will see two main folders,
apps
and sites
. All the applications will be installed in apps.To Create App .
bench new-app {app_name}
e.g bench new-app library_management
$ bench new-app library_management App Title (defaut: Lib Mgt): Library Management App Description: App for managing Articles, Members, Memberships and Transactions for Libraries App Publisher: Frappé App Email: info@frappe.io App Icon (default 'octicon octicon-file-directory'): octicon octicon-book App Color (default 'grey'): #589494 App License (default 'MIT'): GNU General Public License
No comments:
Post a Comment