Frappe Tutorial
In this guide, we will show you how to create an application from scratch using Frappe. Using the example of a Library Management System, we will cover:
- Installation
- Making a New App
- Making Models
- Creating Users and Records
- Creating Controllers
- Creating Web Views
- Setting Hooks and Tasks
Who is This For?
This guide is intended for software developers who are familiar with how the web applications are built and served. Frappe Framework is built on Python and uses MariaDB database and for creating web views, HTML/CSS/Javascript is used. So it would be great if you are familiar with all these technologies. At the minimum, if you have never used Python before, you should take a quick tutorial before your use this Guide.
Frappe uses the git version control system on GitHub. It is also important that you are familiar with basic git and have an account on GitHub to manage your applications.
Example
For this guide book, we will build a simple Library Management application. In this application we will have models:
- Article (Book or any other item that can be loaned)
- Library Member
- Library Transaction (Issue or Return of an article)
- Library Membership (A period in which a member is allowed to transact)
- Library Management Setting (Global settings like period of loan)
The user interface (UI) for the librarian will be the Frappe Desk, a built-in browser based UI environment where forms are automatically generated from the models and roles and permissions are also applied.
We will also create web views for library where users can browse articles from a website.
- Before You Start
- What is an Application
- Installing the Frappe Bench
- Make a New App
- Setting up the Site
- Starting the Bench
- Making Models
- Creating Roles
- DocType
- DocType Naming and Linking
- DocType Directory Structure
- Making Users and Records
- Form Client Scripting
- Controllers
- Reports
- Web Views
- Single DocTypes
- Scheduled Tasks
- Conclusion