Posts by DoRenatoRock • 16 points
7 posts
-
0
votes1
answer27
viewsA: Python Django heritage with Unique attribute
Do it in a way that when adding a student(person) with the CPF X as manager, that student Cpf is deleted before inserting in manager. Or leave this number as a foreign key, to be called in other…
-
-4
votes1
answer36
viewsA: Wildkey is not displaying correctly on the screen, even with the __ str __ DJANGO 3.2 method
Try to put the def str outside the target class
-
0
votes1
answer36
viewsA: Display a boolean field result if it is True
Try {% if ieis.topo is True %} <p>Topo</p> {% endif %} Or {% if ieis.topo == True %} <p>Topo</p> {% endif %}…
-
0
votes1
answer34
viewsA: How to get a full URL using Django?
In Settings.py has a field called ALLOWED_HOSTS, it can be placed the site address in various forms. EX: ALLOWED_HOSTS = ['https://meusite.com' , 'meusite.com'] Then go to your view where you want…
-
0
votes1
answer19
viewsA: How to load dynamically staticfiles CSS and Javascripts in Django
Try it like this: html base. {% block scripts %} <script src="caminho_1/script.js"></script> ... <script src="caminho_N/script.js"></script> {% endblock %} Leaves at the base…
-
-1
votes1
answer40
viewsA: Check the existence of a string in a file from another file
From what I understand, you want to introduce everyone who gives 'match', but this second is only going through the file once. In this case, either you would store its contents in some corner, or…
-
1
votes1
answer51
viewsQ: Perform the action of a form without updating the page on Django
I am developing a project where I need to add members to a group, for this, I go through all registered members and present them in my html template. Each member has next to the "add" button only…