[solved] ERPNext 7 create new website page

HI all

I am using ERPNext 7.
I need a new webpage so i have created a test.html and test.py in
apps > mycustom app > mycustom app > www

(test.html is the copy of about.html and test.py is the copy of about.py)
Also i add a menu in Website Settings > TOP BAR > 4. Test

Now I refreshed site and saw the menu ‘Test’ right on the top bar.
But when i click it, it shows error…

What steps i need to do now?

Traceback (most recent call last):
  File "/home/amalendu/frappe-bench/apps/frappe/frappe/website/render.py", line 32, in render
    data = render_page_by_language(path)
  File "/home/amalendu/frappe-bench/apps/frappe/frappe/website/render.py", line 101, in render_page_by_language
    return render_page(path)
  File "/home/amalendu/frappe-bench/apps/frappe/frappe/website/render.py", line 117, in render_page
    return build(path)
  File "/home/amalendu/frappe-bench/apps/frappe/frappe/website/render.py", line 124, in build
    return build_page(path)
  File "/home/amalendu/frappe-bench/apps/frappe/frappe/website/render.py", line 137, in build_page
    context = get_context(path)
  File "/home/amalendu/frappe-bench/apps/frappe/frappe/website/context.py", line 19, in get_context
    context = build_context(context)
  File "/home/amalendu/frappe-bench/apps/frappe/frappe/website/context.py", line 65, in build_context
    module = frappe.get_module(context.controller)
  File "/home/amalendu/frappe-bench/apps/frappe/frappe/__init__.py", line 643, in get_module
    return importlib.import_module(modulename)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named www.test

Does about webpage works fine?

Yes, @KanchanChauhan
Contact, Blog pages work fine…
Products page shows

Page missing or moved
We are very sorry for this, but the page you are looking for is missing (this could be because of a typo in the address) or moved.

When i put my test.html and test.py files inside the frappe > frappe > WWW folder
it works fine…

What to do to show my custom pages inside my app?

Well it has to be in www folder, that is from where webpages are generated.

@KanchanChauhan

so all custom webpages must be put in frappe’s www folder?

or my Custom app’s www folder?

Please help me anybody…

in ERPNExt V6 , it was poosible to put custom webpage to put in our own custom apps!!!

In your custom app www folder.

https://www.youtube.com/watch?v=AZRL9_3BWlo

@Amalendu,

Put custom web pages in customapp’s www directory,

check if www directory contains the empty __init__.py file, if not then create the file and check again.

1 Like

Thank you so much @makarand_b, it was the issue…
The init.py file was not there.
I have copied it from frappe www folder…

Now it works fine- shows the test.html page in website

Thanks…

1 Like