ellmetha / django-machina

A Django forum engine for building powerful community driven websites.
https://django-machina.readthedocs.org
BSD 3-Clause "New" or "Revised" License
589 stars 126 forks source link

Not able to customize machina template and classes #244

Open snehlata08 opened 3 years ago

snehlata08 commented 3 years ago

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 commented 10 months ago

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

ellmetha commented 10 months ago

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 commented 10 months ago

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