Custom app desktop display

I have created custom app and custom module but it is not displaying on desktop when it is pulled from github repository. (it is available only in develop server)
I have created custom DocType into custom app, checked for permissions, edited desktop.py but no luck.

I am running :

ERPNext: v12.1.8 (version-12)
Frappe Framework: v12.0.17 (version-12)

Could anyone suggest solution?

when you do bench build… all your customization will replace into default… it will overwrite from the repo… so if you want to have your own… create a custom.css then hooks them

check my own created icon Customize Desk Icon Design v12

1 Like

Thanks mr. Johnrech_Cabatana,
You were asking in your commet “you will create public folder to your app then hooks the assets”. I don’t understand what you mean?

Could you please explain little more.
I refereed above link and downloaded css file.
Where should I copy this file into? How can I hook it.
I appreciate your help.

1 Like

there a hooks.py in your app file… then there is a sample of how to hook it…

I know about hooking python functions as below :
doc_events = {
“Loan”: {
“validate”: “indipco.hooks_call.loan.duplicate_loan”
},
“Material Request”: {
“validate”: “indipco.hooks_call.material_request.sales_user_validation”
}
}

But how about hooking css?

should I hook css file in same heading as above(doc_events)?

include js, css files in header of desk.html

app_include_css = “/assets/11_app/css/ephdesk.css”
look like this

2 Likes

I understand.
lastly please tell me the directory of /assets folder.
is it inside custom app folder or at some other location like sites/app.
Please share url for your custom app in github for reference

create folder inside your app
like this.
public/css/

Ok, I got it.
I appropriate your help.
Thank you very much.

it works?

let me to check and update.

in your hooks.py , it should look like this…
app_include_css="/assets/11_app/css/custom.css

I have created public/css folder as shown below
/home/frappe/frappe-bench/apps/indipco/indipco/public/css/custom.css
edited hooks.py entry as below
app_include_css = “/assets/indipco/css/custom.css”

ran bench update, but no luck.
am I missing anything?

do not use bench update… just bench migrate

not successful

A couple of days I created a new app and I put it on the desktop as well but the doctypes didn’t show up and the app looked empty.

My solution:

bench restart
bench --site sitename clear-cache
sudo service supervisor restart

Ultimately only after the supervisor restart the app worked properly.

cache cleared?

Yes cleared the cache,
ran following commands
bench restart
bench --site sitename clear-cache
sudo service supervisor restart

but not working.

Did it work?

I am looking for the path to store the custom.css

I read in another post that bench build is the correct command to use.

1 Like