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

Not able to customize machina template and classes #244

Open
snehlata08 opened this issue Aug 17, 2021 · 3 comments
Open

Not able to customize machina template and classes #244

snehlata08 opened this issue Aug 17, 2021 · 3 comments

Comments

@snehlata08
Copy link

snehlata08 commented Aug 17, 2021

I am following this tutorial to customise machina.

import os
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [ os.path.join(PROJECT_PATH, 'myproject/templates'), MACHINA_MAIN_TEMPLATE_DIR, ],
        'OPTIONS': { 'context_processors': [ # [...] ], },
   },
]

I have changed the path to my machina project but still the template changes are not reflecting.
As well as I did the following to customise the machina code

$ mkdir -p apps/forum_conversation
$ touch apps/__init__.py
$ touch apps/forum_conversation/__init__.py

But my class changes were not visible. So can anyone tell me what am i doing wrong over here.

@AliIslamov
Copy link

I also can't understand this problem. Very poor documentation 😒

@ellmetha
Copy link
Owner

ellmetha commented Nov 6, 2023

I have changed the path to my machina project but still the template changes are not reflecting.

Regarding customizing templates, if you followed the dedicated guidelines, you should be able to define overrides of any django-machina template. For example, I just tested this with the example project, which defines a templates configuration similar to yours, and I was able to define a forum_conversation/topic_create.html file that was overriding the built-in template as expected. The path to the overridden templates (in your templates folder) must not include the machina folder for this to work properly.

As well as I did the following to customise the machina code

Have you followed the Overriding an application tutorial up to the end? I am asking because the commands you are mentioning refer to the first step of this tutorial only.

Very poor documentation 😒

@AliIslamov I welcome any feedback on this project, but I kindly request that it be provided in a respectful and positive manner. A significant amount of effort went into creating the documentation you've referred to as 'poor,' and while constructive criticism is valuable, let's maintain a collaborative and positive atmosphere here.

@AliIslamov
Copy link

@AliIslamov I welcome any feedback on this project, but I kindly request that it be provided in a respectful and positive manner. A significant amount of effort went into creating the documentation you've referred to as 'poor,' and while constructive criticism is valuable, let's maintain a collaborative and positive atmosphere here.

Yes, your are absolutely right. I'm sorry for my unconstructive overly emotional statement.

You already have done great app and I purchased your for it.

I just want to say, that it will be very helpful if you do more examples in docs.

Beginners like me really need this.

Best regards.

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

No branches or pull requests

3 participants