Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Documentation not clear about chaning the default site home page #2051

Open
1 task done
damascene opened this issue Nov 17, 2022 · 1 comment
Open
1 task done

Comments

@damascene
Copy link
Contributor

damascene commented Nov 17, 2022

Is there an existing issue for this?

  • I have searched the existing Issues

Current Behavior

When you create a new site you pretty much gives you a ready to fill website but it seems the default generic home page is not so easy to change it requires working with configuration files and running some commands.

Issue is that documentation is not sufficient to change the default home page.

Expected Behavior

Home page should be easy to change and instructions should be clear.

Steps To Reproduce

  1. Install the app

Environment

- Latest version
- All OSs

Anything else?

The main resource for changing the home page is linked in the generic page it self under:
Changing this homepage

However it points out to a section titled "Why isn't the homepage a Page object I can edit via the admin?" which doesn't really contain much information about changing the page but gives hints to get started.

However, the suggested methods has the following issues:

First Method (Template)

It requires to run collect templates python manage.py collecttemplates I figured it by checking a discussion about an issue.

After that you will get a template dir with index.html in it which you can modify I wasn't able to find it in the official guide.

Second Method (Editor page)

It make the page editable in the editor: it requires to disable the default template line:

    #path("", TemplateView.as_view(template_name="index.html"), name="home"),

Enable this line:

    path("", mezzanine.pages.views.page, {"slug": "/"}, name="home"),

and import mezzinine or import views from mezzanine.pages:

from mezzanine.pages import views

and modify path to the following:

    path("", views.page, {"slug": "/"}, name="home"),

This was not in the official guide.

I find instructions after searching for sometime inside one of the closed issues and modified it to my needs.

urls.py file in project dir contains some hints but also missing some vital information.

@henri-hulski
Copy link
Collaborator

Hi @damascene!
Thank you for bringing this up.
We don't have the resources to fix the docs atm, but I would except a PR to fix it.
So it would be great if you could create a PR to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants