NilCoalescing / djangochannelsrestframework

A Rest-framework for websockets using Django channels-v4
https://djangochannelsrestframework.readthedocs.io/en/latest/
MIT License
613 stars 86 forks source link

`chat/layout.html` referenced in tutorial is missing #174

Open johnthagen opened 1 year ago

johnthagen commented 1 year ago

I have been trying to complete the Tutorial, but ran into an issue in Part 2.

The templates reference:

{% extends "chat/layout.html" %}

But I see no reference to where chat/layout.html is created? Was this file missing? Was this referencing something made in an older version of the Channels Tutorial? I even went back to the Channels v3 Tutorial and couldn't find a reference to it.

The DCRF Tutorial says that this should be the project structure:

mysite/
    manage.py
    mysite/
        __init__.py
        asgi.py
        settings.py
        urls.py
        wsgi.py
    chat/
        __init__.py
        consumers.py
        models.py
        serializers.py
        routing.py
        templates/
            chat/
                index.html
                room.html
        tests.py
        urls.py
        views.py
johnthagen commented 1 year ago

Running to current tutorial and navigating to http://localhost:8000/chat/ causes error:

TemplateDoesNotExist at /chat/
chat/layout.html
hishnash commented 1 year ago

Good find, I think this was intended to point back to the older changes tutorial but yep seems to not be there.

johnthagen commented 1 year ago

@hishnash What I found odd was I went back and used ReadTheDocs to look at older versions of the channels docs (even back to 2.0) but couldn't find a reference to it.

I do think having a complete tutorial would be a great help to new users of this library.

johnthagen commented 1 year ago

@hishnash I'd be happy to beta test/edit a finished/updated tutorial if you find time to fill in the gaps of missing files.

rossmeredith commented 1 year ago

Is this going to be fixed?

cyx2000 commented 6 months ago

imageThere's a bug here, no f, not a f-string

johnthagen commented 6 months ago

@cyx2000 Nice find. I opened a PR to fix this