Installed demo data - how login as admin on demo mode

I’ve created demo data on my box but want to login as an admin on the demo installation of my own.

I can view the demo and its data but, I’d like to “turn off” demo mode and login as an admin on my own demo installation.

Any tips?

Hello good question

I don’t have the answer, but did find this that should help -

A query of the two install environments gave this for the demo home page case:

In [3]: frappe.db.get_default(“desktop:home_page”)
Out[3]: ‘workspace’

and this for the basic login home page:

In [2]: frappe.db.get_default(“desktop:home_page”)
Out[2]: ‘desktop’

Then a grep of the code gave this (edited) for the two cases -

For the demo workspace:

erpdev@2052004lts40G:~/frappe-bench$ find apps/ -name *.py | xargs grep workspace
apps/frappe/frappe/	bootinfo.allowed_workspaces = get_desk_sidebar_items(True)
apps/frappe/frappe/		page = frappe.desk.desk_page.get('workspace')
apps/frappe/frappe/desk/	def build_workspace(self):
apps/frappe/frappe/desk/	wspace.build_workspace()
apps/frappe/frappe/desk/ get_custom_workspace_for_user(page):
apps/frappe/frappe/desk/	page_doc = get_custom_workspace_for_user(page)
apps/frappe/frappe/desk/page/setup_wizard/	frappe.db.set_default('desktop:home_page', 'workspace')

And for the standard desktop:

frappe@ubuntu:~/frappe-bench$ find apps/ -name *.py | xargs grep desktop

apps/frappe/frappe/	home_page = frappe.db.get_default("desktop:home_page")
apps/frappe/frappe/config/		modules = frappe.get_attr(app + '.config.desktop.get_data')() or {}

apps/frappe/frappe/		device = or "desktop"
apps/frappe/frappe/	for device in ("desktop", "mobile"):
apps/frappe/frappe/		self.device = frappe.form_dict.get("device") or "desktop"
apps/frappe/frappe/		self.device = self.device and self.device[0][0] or 'desktop'
apps/frappe/frappe/ get_expiry_period(device="desktop"):

apps/erpnext/erpnext/setup/setup_wizard/	# Wait for desktop
apps/erpnext/erpnext/setup/setup_wizard/	driver.wait_for('#page-desktop', timeout=600)
apps/erpnext/erpnext/setup/	if frappe.db.get_default('desktop:home_page') == 'desktop':

The lists above are edited, other files and patches will give more clues and ideas to pursue.

In your case a custom script patch to restore the standard desktop login from the demo workspace page would need to be developed.

Good luck with your exploration and learning!

1 Like

How you managed to get the demo data.