Questions tagged as 'python'

1
answer

I want to pass this Mysql code to Django how can I do it? [closed]

Hello, someone who helps me, I want to pass this code to Django and Python as I can. SELECT 'clasificador', SUM('total') AS t_total FROM clasificacion GROUP BY 'clasificador' I would really appreciate your help.     
asked by 09.09.2016 / 19:10
1
answer

Join in sqlalchemy

I am trying to pass a query that I have made - and I already tried it in SQL - to SQLAlchemy in python using Flask. This is the query in SQL: select Reclamo.IdReclamo from Reclamo,ServicioAsignacion,ReclamoServicioAsignacionAfectado where S...
asked by 23.09.2016 / 17:00
1
answer

Obtain values in a given date range

Given a name and two dates entered per parameter, I would like to make a query where I take all the values of that name in that date range. I know the next way to compare in Django but this is strict and I would like to take the dates >...
asked by 26.05.2016 / 03:10
1
answer

AttributeError: module 'PyQt5.QtGui' has no attribute 'QApplication'

Code: from PyQt5 import QtGui import sys app = QtGui.QApplication(sys.argv) window = QtGui.GWidget() window.show() Could you tell me why this error comes out, please. AttributeError: module 'PyQt5.QtGui' has no attribute 'QApplication'...
asked by 28.05.2016 / 19:31
1
answer

Django 1.8 Paginator inside a def get

Pager within this function and I do not know how to do it and tried several ways but it does not work out here I leave the pager code, please help me class ListarTipoAlmacen(ListView): model = Tipo_almacen template_name = 'tipo_almacen/lista...
asked by 12.05.2016 / 17:59
1
answer

Performing migrations in Django - django.db.utils.IntegrityError: null values

I am adding the following attribute type choice to my model class User(AbstractUser): GENDER_MALE = 'M' GENDER_FEMALE = 'F' GENDER_OTHER = 'O' GENDER_CHOICES = ( (GENDER_MALE, u'male'), (GENDER_FEMALE, u'...
asked by 16.01.2016 / 23:35
1
answer

Passing xml to String

Greetings I am trying to pass an xml to string in python I have the following code: from lxml import etree xml_str = etree.tostring('media/Facturacion/Comprobantes Generados/2012201800117924424190011001001000000002123456785.xml', encoding='utf...
asked by 03.01.2019 / 02:04
1
answer

How to detect if one color is similar to another in opencv?

The most probable thing is that the wording of the question is not correct, but I can not think of how to write it. Adobe Premiere Pro has the green screen option and you can tell it to erase the color you selected and all the similar colors wit...
asked by 02.01.2019 / 00:01
1
answer

List of bitarray in python

Good to all of you guys, I'm "playing" a bit with the bitarrays in python and I have a problem and I do not know how to solve it, I commented: I have a bitarray called aux composed of 6 zeros and a 1 such that '0000001'. The idea is to l...
asked by 02.01.2019 / 13:36
1
answer

problem with indented in python

I come from the old school in c (ansi c) and I get used to the keys {}, the program runs well but I can not understand why the def worker method () has to be this indented, I mean that if I put print 'Starting% d processes ...'% WORKER_NUMBER at...
asked by 03.01.2019 / 20:20