Questions tagged [django-templates]
Questions about the template engine of Django, which is intended to separate the presentation of a document from its data.
django-templates
19,689
questions
0
votes
1
answer
11
views
Entries not showing on page
Cant seem to figure out why my entries from my database are not appearing on my page but my topics name on the entry page is
I'm trying to show show entries from my database on a page, the link to the ...
0
votes
1
answer
32
views
TemplateDoesNotExist at / (Django)
Trying to my create a home page, with django. I keep running into a TemplateDoesNotExist at error.
Im pretty sure it has something to do with my paths set up. I havent worked with django enough to ...
-3
votes
0
answers
49
views
Twig Tags are not allowed in django-html
I am Learning django , i have learnt python , html , and basic css.
I was trying to sort things out, like peoples who are above 18 they can vote and peoples below 18 they cannot vote, this is a part ...
0
votes
2
answers
37
views
How to resolve this NoReverseMatch error?
I am currently try make a task manager such that there are folders which have tasks in them, I have been stuck on this problem for hours now and am not sure at all what is the issue
this is urls.py
...
0
votes
0
answers
19
views
Problem customizing search_get_results() method in Django Admin page to get Custom Search
I have an app in Django and I would like to use this template:
{% load i18n static %}
{% if cl.search_fields %}
<div className="form-group">
<div class="search-notes col-md-...
-1
votes
0
answers
4
views
template interitance not working one page out 5 pages all pages are working except one
{% extends 'userpanel/user_home.html' %} {% load static %} {% block title %}VIEW BLOG {% endblock %} {% block content %} {% endblock %}
the base page works for all child page except one it showing ...
-1
votes
0
answers
23
views
My django form keeps giving me the error message even though i still get the data i'm trying to send in the database, what could be wrong? th
I'm trying to add a staff with django everything seems to be working fine i even see the entry in the database but once i click the submit button instead message.success i get message.error i cant ...
0
votes
1
answer
36
views
htmx insert multiple table rows
I'm using Django, if that makes any difference. Anyway, I have this tbody element in my template:
<tbody
id="log-stream-table-body"
hx-get="{...
-4
votes
0
answers
45
views
Logout Process in Django and " Url Logout next" Parameter Error
I am creating a blog page using Django where users can log in and out, write, and share blog posts. After logging in, users should be able to add blog posts, and if they are not logged in, they should ...
1
vote
1
answer
20
views
Django templates and css: is there a workaround for getting my preload link tags to match my css relative paths to font sources?
Background
I just started using Digital Oceans Spaces for storing my static files for my Django web app (connected using django-storages library). Previously, I used link elements in the head of my ...
0
votes
1
answer
36
views
Learning Django without DTL [closed]
I just finished my second React course and become more confident with it by creating a several web application.
Now my plan is to go fullstack, I decided to start learning Django because am kinda good ...
1
vote
2
answers
61
views
Django View: `DoesNotExist` error when trying to edit a product
I'm trying to create an edit product feature in my Django application, but I'm running into a DoesNotExist error when I try to access the edit product page.
Here's my view function:
@login_required
...
4
votes
2
answers
49
views
How to get the current domain name in Django template? [duplicate]
How to get the current domain name in Django template?
Similar to {{domain}} for auth_views. I tried {{ domain }}, {{ site }}, {{ site_name }} according to below documentation. It didnt work.
<p ...
-1
votes
0
answers
17
views
Bootstrap modal does not trigger inside a django for loop
I want to attach a modal to all images. But for some reason the modal is not triggered and the entire page becomes un-clickable.
I have made sure that all modals triggers and modal have a unique ID ...
0
votes
1
answer
30
views
Django CreateView get_context_context_data not passing additional object to template
I'm creating a forum app in django. A user can reply to a Thread by pressing a button. This takes them to a new page containing a form with a textbox to post their reply. The PK of the thread being ...