Posts by Marcello Benigno • 391 points
6 posts
-
1
votes1
answer166
viewsA: Hide CRUD buttons in Django templates for users who are not logged in to the system
I did, following the hint that was passed. I took advantage of the logic in the templates, from includes, as follows: {% include 'partials/actions.html' with pk=basin.pk detail='basins:detail'…
-
5
votes1
answer546
viewsA: Filter locations in an area of X km
The error in question is acceptable in view of the working scale and the reference system used. An alternative to increase the accuracy of the radius, if its study area fits in a spindle, would be…
-
2
votes1
answer166
viewsQ: Hide CRUD buttons in Django templates for users who are not logged in to the system
I would like to hide my system buttons that allow: add, edit and delete data from my templates for users who are not logged in to the system. He can be seen here:…
-
1
votes2
answers302
viewsA: Media in lists with dictionaries
Much like your previous question: from collections import defaultdict resultado = defaultdict(list) media_idades = defaultdict(list) animais = [ {'Idade': '8', 'Especie': 'Gato', 'Nome do Animal':…
pythonanswered Marcello Benigno 391 -
1
votes1
answer137
viewsA: Vertex closer to another - Postgis
You can use the function: St_closestpoint() SELECT ST_AsText(ST_ClosestPoint(linha_qualquer, ponto_escolhido)) AS vertice_mais_proximo FROM ( SELECT l.geom AS linha_qualquer, p.geom AS…
sqlanswered Marcello Benigno 391 -
3
votes1
answer175
viewsA: Dictionary with lists as value
It’s not very clear, but I think that’s what you want: from collections import defaultdict resultado = defaultdict(list) animais = [ {'Idade': '8', 'Especie': 'Gato', 'Nome do Animal': 'Felix'},…
pythonanswered Marcello Benigno 391