Questions tagged as 'python'

1
answer

How to edit something saved in the database in Python

I need to search for a student by name or cpf that is saved in the database and retrieve that same student in a form so that you can edit it and then be saving again. I'm using Django as a framework. I've already done an html by creating the sea...
asked by 29.03.2018 / 18:49
1
answer

Python: Serialization of namedtuple classes in json

import json from collection import namedtuple class Employee: def __init__(self, name, age): self.name = name self.age = age def tojson(self): return json.dumps(self.__dict__) Hello everyone, I've developed t...
asked by 08.04.2018 / 22:55
0
answers

Error in calling a Python application (+ OpenCv) in Visual Studio 17 (C #)

I'm trying to make a "control panel" that each button will call a Python application (+ OpenCV) but when I run it through the PyCharm IDE, or straight from the folder, it runs perfectly, but when I make the call through Visual 17 , it appears th...
asked by 09.04.2018 / 05:01
0
answers

Forms in Django, help?

Is there a way to work with forms in a practical way in Django? The issue is that I'm creating a website on my own and since I knew Python, so I decided to use Django. "Everything" was fine until I tried to create a form signup for that s...
asked by 27.03.2018 / 19:47
0
answers

Show sum of graph objects - Django / Python / Sqlite

How to display a graph with the sum of objects with Django / Python / SQlite? In this case we have'internal_boxes '(y-axis) for' teams '(x-axis) that are rendering'internal_boxes' for each 'team' insert in the PCdastro model. Example genera...
asked by 05.04.2018 / 00:49
2
answers

How to use comma in Python instead of dot

The Brazilian system, unlike the American system, uses the comma to separate decimals, but as Python was done in a country that uses the decimal point, programs, when we use the print , use points. How do I use comma instead? As for example:...
asked by 20.07.2017 / 16:47
1
answer

HTML Base64 image in emails

I have a python API that sends emails. The problem is that I mount an HTML and put a <img> tag and I put a base64 variable that is src . But 90% of e-mail services do not support base64. Is there any other way out? Home Follow the C...
asked by 28.03.2018 / 16:04
1
answer

TXT File Manipulation Using Python

Let's say I have a arquivo.txt that is separating the information only by the comma, for example, X,Y,Z,W 1,2,3,4 How do I modify this file and save it so that a table is left without the presence of these commas (see the fo...
asked by 07.04.2018 / 23:32
1
answer

Function running without Python button click

Good evening, My callbackInsereCritical function runs directly without the click of the button, what can it be? def callbackInsereCritico(nome): conn = psycopg2.connect(host='localhost', database='diet+',...
asked by 26.03.2018 / 00:29
1
answer

Project Command Pattern has no purpose in Python?

The Command Project Pattern provides a way to undock two objects, one that invokes an action from the one that knows how to execute it, but my question is: In python and other languages which functions are first class objects what is the utility...
asked by 25.03.2018 / 07:13