django-machina icon indicating copy to clipboard operation
django-machina copied to clipboard

Not able to customize machina template and classes

Open snehlata08 opened this issue 3 years ago • 3 comments

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.

snehlata08 avatar Aug 17 '21 05:08 snehlata08

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

AliIslamov avatar Nov 05 '23 19:11 AliIslamov

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.

ellmetha avatar Nov 06 '23 01:11 ellmetha

@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.

AliIslamov avatar Nov 06 '23 09:11 AliIslamov