📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

New App || Create a new App & Install app in to site

D-codE5:07

Transcription

[Music] Hello, and welcome back to the ERPNext course. In this lecture, we will see how to create a new application in the frappe framework, and later we will see how to integrate it with the ERPNext application. So let's start learning.

I'm opening my terminal, and my terminal is ready. Then let's move to the frappe-bench directory. Now I am in the frappe bench, and it is because the bench command will only run inside the frappe-bench directory. So if we run any command outside this frappe-bench directory, it won't work.

We can create a new application in frappe using this command: `bench new-app`, then the application name. So here I'm giving a name: `demo_app`, and press Enter. Next, we have to give some details of our application. The first one is app title; here we can give the title of our application. The default title is `demo_app`. I am not changing the title; I am just pressing Enter.

Next one is app description. I am adding a description: "It is a demo app." Then press Enter. Next, we need to add a publisher. I am adding "publisher is decoding". Let's add an email for this application. Next, we can add an app icon. I'm not adding any icon here; I'm just skipping this step. We can also give a color for our application, and the default color is grey. I'm not changing this. To app license, I'm using the default license, and the app creation is started here. Now the app creation is finished, and our `demo_app` is created successfully. We can see our application in the apps directory. So let's move to the apps directory, and here we can see our application, `demo_app`. Let's go back to the frappe-bench directory. Let's clear this.

We can check the installed application in this bench using this command: `bench --version`. We can see the list of applications installed in this frappe bench, and the first one is `demo_app`, then ERPNext, then frappe. Let's start the bench using this command: `bench start`, and the server is up. Let's open the link, click on login, and login as administrator. And now we can see the frappe workspace. Let's go to Help and click on the About sub-menu. Here we cannot see that application, `demo_app`, in installed apps. It is because we didn't install that application into our site. So next we will see how to install our application in our site. So let's close this, and I'm opening my terminal. I'm just stopping the server using Ctrl+C. Let's clear this. We can install our `demo_app` into our site using this command: `bench install-app`, then the app name, which is `demo_app`. And now we successfully installed our application into our site. Let me start the bench one more time. Let's open the web application and go to the profile icon, then click on Reload. This will clear the cache and refresh this page. Let's go to the Help menu and click on About, and now we can see the `demo_app` version 0.0.1 is installed in this site.

Let's wind up this lecture, and see you on the next one. Bye.