Closed uhexos closed 3 years ago
The template content you posted here is duplicated. That must be giving already a lot of errors.
Once you fix that, if the issue is still about the base.html
template, you could either:
templates/django_comments_xtd/base.html
, ordjango_comments_xtd/hostel/room/reply.html
, django_comments_xtd/hostel/reply.html
or django_comments_xtd/reply.html
.runserver
command to reload template changes.Try running the demo projects and see how they have the templates organized. The comp demo site is available as a Docker image too. See the repo and instructions here.
With regards to your 2nd suggestions those Paths are inside the venv folder are you recommending I edit those directories ?
Creating a directory as templates/django_comments_xtd/reply.html has fixed the issue. However the documentation states that the folder should be called comments comments instead of django_comments_xtd don't know if this is correct. However changing the name fixed the issue I was facing thanks
No. In your Django project settings module you must have an entry called TEMPLATES
. That entry may have a DIRS
entry (not to be confused with APP_DIRS
, see the example here). Having APPS_DIR: True
makes Django use the templates installed within the app (which is in your virtualenv), but if you want to replace any of those templates you need to put them in your own template directory, the one in the DIRS
setting within TEMPLATES
.
Ended up just abandoning the package as every page required me to make a custom template then randomly my server started requesting all the bootstrap mixins instead of just using the min file.
@uhexos I am having the same issue and planning to abandoning the package, do you have any good alternatives to share ? I am using TailwindCSS, not bootstrap, which makes situation even worse.
umm I have the same problem.
Hi, the code in the branch rel-3.0.0 is 99,9% ready. It does not use Bootstrap nor any other framework. This new version 3.0 does not use the render_xtdcomments_tree
but rather a render_xtdcomment_list
, so it is not backward compatible. There are two example sites in the demos/
that you can use to test it. The new version does not come with the reactJs plugin, but rather a few vanilla JavaScript modules to send comments, replies and comment reactions. If you want to give it a try and want to make questions, I will be glad to answer them in the Discussions.
After brand new install, adding comments works just fine but attempting to reply to a comment gives
TemplateDoesNotExist at /comments/reply/1/ base.html.
I have no template in my directory structure called base.html and adding one to my project which extends my current template just throws even more TemplateDoesNotExist errors.Sample Entry Template File.
Also added a comments folder to my templates directory and made a new reply.html file with contents as below copied form the packages own reply.html but i still get the same errors as above. How am I supposed to set this package up to use my own equivalent of a base.html since I dont have such a file and currently have no need for one. All my attempts so far have failed and I cant seem to find it in the docs.
SAMPLE REPLY.HTML TEMPLATE
165 talked about a similar issue but the answer given made no real sense to me