jwjacobson / jazztunes

a jazz repertoire management app
https://jazztunes.org
GNU General Public License v3.0
3 stars 1 forks source link

remove redundant base.html and link it in the copied allauth copied templates #64

Closed bbelderbos closed 9 months ago

bbelderbos commented 9 months ago

As discussed you can remove this duplicated / untouched base.html: ./tune/templates/base.html

As your code is (rightfully) use: ./project/templates/base.html

Regarding properly linking base.html in the copied allauth templates, did you take this step?

image

See https://chat.openai.com/share/be42d338-2b90-4f01-9f72-60d2dea21e41

Lastly the .joins() in settings.py seem off, can you check?

        "DIRS": [
            os.path.join(BASE_DIR),
            "project/templates",
            os.path.join(BASE_DIR),
            "project/templates/allauth",
        ],

Should be something like this:

"DIRS": [
    os.path.join(BASE_DIR),  
    os.path.join(BASE_DIR, 'project', 'templates'),  
    os.path.join(BASE_DIR, 'project', 'templates', 'allauth'),  
],

More modern = pathlib btw:

from pathlib import Path

BASE_DIR = Path(__file__).resolve().parent.parent

"DIRS": [
    BASE_DIR,  
    BASE_DIR / 'project' / 'templates',  
    BASE_DIR / 'project' / 'templates' / 'allauth',  
jwjacobson commented 9 months ago

It terms of the linked ChatGPT things, this is where I get confused because the allauth templates are such a maze of different things extending different things. I had copied the allauth directory from the venv into project/templates, but then I also recopied allauth/account up one directory so it sits directly in the templates directory like in the example.

I guess I'm still unclear how deep into the directory structure my DIRS will reach (now matching your second example). I guess maybe I should try deleting some stuff and seeing if anything breaks?

bbelderbos commented 9 months ago

Good point, or add some text in the html files and see if it renders? Like I did on the call?