Questions tagged as 'python'

1
answer

how to limit the sending of emails in django

Good morning: On the website that I am developing, send an email to the owner of the product every time another user puts it in favorite and I have found that if you start clicking many times it will not stop sending emails to that person wit...
asked by 27.12.2017 / 17:16
1
answer

Does not update the column with the "update" clause

   I am trying to apply this update from record to table, it does not generate an error, but it does not execute the update either, when doing the table query it does not make the changes.   I appreciate help. while True: opcionMenu = in...
asked by 23.12.2017 / 18:19
1
answer

Python3 - NameError: name 'select_range' is not defined

I try to create a package that contains the main.py module and two folders (Menus and Calculations). The main_3.py module contains: # -*- coding: utf-8 -*- # main_3.py # Importación de módulos import Menus.menu_seleccion_valor import Menu...
asked by 24.12.2017 / 21:11
1
answer

Python dynamic tables

I receive a report with this data every day: ALL the values of the headers can change although the Dates field is always going to stay the same for each client, to which I refer: What I need is that in my file called Data.xlsx...
asked by 21.12.2017 / 13:40
1
answer

Filter results Serializer Django

Good, I have a problem because I want to filter the data of an FK in a serializer. class ProductoArmarioSerializer(serializers.ModelSerializer): imagenes = FotoSerializer(many=True) tallas = StockSerializer(many=True) class Meta:...
asked by 28.12.2017 / 09:27
1
answer

pycurl error. TypeError: invalid arguments to setopt

I made this code with the pycurl library import io import pycurl from StringIO import StringIO c = pycurl.Curl() c.setopt(pycurl.URL, "http://www.twitter.com/") c.setopt(pycurl.HTTPHEADER, ["Accept:"]) c.setopt(pycurl.COOKIEFILE, "cookieD...
asked by 28.12.2017 / 13:18
1
answer

To extract information from a table?

I need to extract the information from a table with selenium, python. Cuepo html: <table class="table table-bordered"> <tbody> <tr> <td>Valor de...
asked by 29.12.2017 / 00:21
1
answer

How to get values of a model in flask?

I'm trying to get the values of a model in flask, I want to access the values of my model, not a " render_template " record = MyModel.query.filter_by(id=222) But with this I get an SQL query back. The idea is to access as i...
asked by 12.12.2017 / 01:02
2
answers

Sort CSV Python values

I have the following code that creates a CSV with data obtained from another CSV. In this image I die my results: Now, what I'm looking for is that the new csv instead of recording with all the data, first I ordered the data from highest t...
asked by 11.12.2017 / 14:07
3
answers

How to identify decimal and integer in Python

Good morning / afternoon / evening, I come here with the question of how to identify decimal and integer in python. Because I enter numbers with the float in case the user enters the decimal number. Then I want it to show an integer number in ca...
asked by 22.01.2018 / 17:25