Questions tagged as 'python'

1
answer

How to load a large volume of data with Django Querysets?

I have a loading process in a Django project which from an excel file stores information in a Business model. My loading process works, the problem is that the execution time is too high due to the data volume of the excel input. Model.py...
asked by 14.05.2018 / 15:29
0
answers

Create block objects by assigning values to field many2many odoo8

I'm creating a functionality to create instances in bulk from a wizard, assigning values to some many2many fields, but when I try it I get an error: "Expected singleton: modelo3(167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,...
asked by 24.08.2017 / 09:23
1
answer

Problem with proxy request

I am developing a bot telegram, for the company that I work, the problem is that I can not have an input or output, because the connection is conditioned by proxy, but from browsers if I have access to the internet. Now try to configure the i...
asked by 24.09.2017 / 16:22
1
answer

Send Message / file with micro python

I raise the plot to see if you can help me. Is the next: I'm linking two devices that work with micro-python language and have chips to use Wi-Fi as scheduled. Well basically the idea is to develop a program that on the server chip (hereafter ch...
asked by 17.04.2018 / 15:23
0
answers

How to modify kwargs in Django?

I am making the confirmation page of a purchase and I want to pass a hash of the order identifier, previously generated by the system, to a url and with a decorator to check if the user that is accessing is the owner of that order by a decorator...
asked by 19.04.2018 / 09:02
0
answers

Run a Jasper Reports report from a Python script

I am developing a Python application and I want to use Jasper Reports as a report generator. My purpose is only to launch a report that is in a repository of Jasper Reports . The JasperServer server is working and I have designed reports...
asked by 23.10.2016 / 17:28
1
answer

Display radio button in django?

Hi, I have this problem ... I can not manage to display the radio button in the template ... in which I'm wrong? models.py class Genero(models.Model): MASCULINO ='mas' FEMENINO ='fem' Type_CHOICES = ( (MASCULINO,'masculi...
asked by 05.02.2017 / 01:14
2
answers

End while loop with break, but still in infinite loop

I'm starting in Python and programming in general and now that I had a few notes in hand, I started writing a simple program that consists of a menu with different options. The first consists simply of a loop that allows you to enter ages in...
asked by 26.08.2016 / 12:55
2
answers

ordering __cmp__, order according to two parameters

Holaa the code is as follows, def es_numero(valor): return isinstance(valor, (int, float, long, complex) ) def es_cadena_no_vacia (valor): return isinstance (valor, (str)) class Hotel(object): def __init__ (self, nombre = '*...
asked by 13.08.2016 / 02:52
1
answer

TypeError: only length-1 arrays can be converted to Python scalars (2)

Hello again I am with the same error but in a different place. Veran I have the following code import matplotlib.pyplot as plt import numpy as np from py_expression_eval import * def f(exp, var, x0): p = Parser() p.ops2['^'] = n...
asked by 03.03.2017 / 00:49