feat: set app name and logo on install and disable signup

- set app_name and app_logo_url on install
- disabled signup
This commit is contained in:
Anand Chitipothu
2021-05-04 23:17:41 +05:30
parent b58a685e7a
commit 82faaed15d
2 changed files with 21 additions and 1 deletions

16
community/install.py Normal file
View File

@@ -0,0 +1,16 @@
"""Hooks that are executed during and after install.
"""
import os
import frappe
def after_install():
set_app_name()
disable_signup()
def set_app_name():
app_name = os.getenv("FRAPPE_APP_NAME")
if app_name:
frappe.db.set_value('System Settings', None, 'app_name', app_name)
def disable_signup():
frappe.db.set_value("Website Settings", None, "disable_signup", 1)