But I'm not sure how to do that.
Example of what I want to do:
<!DOCTYPE html>
<html>
<body>
<script>
let showMessage = false;
</script>
{% if showMessage %}...
Hello, I have a template that shows me the items I want to donate and a final step where I confirm or delete any of these items
views.py
def confirm_donation(request, id):
donation = get_donation(id, request.user)
if n...
I have 3 videos saved in the Postgres database where I set a star_date and the video only appears in the template when start_date <= date.today()
My problem is in template . I have 3 buttons, one for each video, my idea is...
I'm doing a Django course that uses a simplemooc platform as a study, but I stopped in a class when trying to access the details of the course that is in a separate url in a dynamic list, there is no change in the page, courses without any chang...
I am creating an application in django where I will have a form for creating a query schedule, my model looks like this:
class Agenda(models.Model):
"""Criação da agenda de consultas da Clinica"""
data_consulta = models.DateTimeField()
pacient...
In some places on my system, I render a page with render_to_string , because I want to render only a small content. In these cases I do not get my variables that I created in context_processors . Does anyone have a solution other tha...
Good evening! I have an evaluation form created in Django 2.0.4, in which 3 questions are inserted along with their answers, however, when listing the result on a page only the last question and answer is listed.
In my project I have a project with 2 apps.
The first app is learning_logs that has a template, base.html
The second app is users, I'm trying to use the learning_logs template in users as follows:
{% extends "learning_logs/base.html" %}
It...
The intention of this project is to make a Chat Room. I have 2 tables, Django's predefined User table and Message table, where messages sent by users are stored.
I want a user to send a message, via a form sent to the table by the sendMessage...
I want to display a form in the template already with the variables {{n}} of a list. How to do?
{% if forloop.counter == 3 %}
{% for n in campos %}
{% if forloop.counter == 3 %}
<div class="form-group{% if field.error...