Questions tagged as 'python'

2
answers

error in python: bad indentation [closed]

I'm new to python and I can not find the error since I put more spaces but I can not compile thank you very much     
asked by 28.12.2018 / 19:43
2
answers

Error with the commandant runnerver of Django

Trying to run the local Django server I get the following error in the terminal when running using runserver. This is the message: System check identified no issues (0 silenced). February 28, 2016 - 15:50:27 Django version 1.7.9, using...
asked by 28.02.2016 / 21:18
2
answers

How to use ajax with django forms?

My models.py # -*- encoding: utf-8 -*- from django.db import models from general.models import BaseUnique, BaseTitle, Empresa, Arl from recurso_humano.models import Persona, Sucursal # ===================== HEALTH BASIC ======================...
asked by 25.02.2016 / 06:57
1
answer

GROUP BY in query

I have a table with the following columns: nombre , monto , fecha . I want in a query to show the information grouped by name and month in the following way: nombre1, suma(monto), marzo nombre1, suma(monto), abril nombre2,...
asked by 18.04.2016 / 20:38
1
answer

'NoneType' object has no attribute 'split'

I can not access to search for a user since I get the error of split . This is my code: views.py def buscar_usuario(request): from django.utils import simplejson busqueda = request.GET.get('busqueda') busquedas = busqueda....
asked by 16.11.2018 / 22:55
3
answers

Regular Expressions in Python

I was trying to extract the information from an html code, in particular what interests me is to focus on the content of this html tag: <h2> <a href="https://www.xataka.com/robotica-e-ia/deepfakes-tendremos-problema-verdad-videos-serv...
asked by 01.11.2018 / 19:44
1
answer

What is the difference between using list or not in python?

What is the difference in these 2 implementations a=[1,2,3,4,5] a=list([1,2,3,4,5])     
asked by 17.07.2016 / 06:47
1
answer

Modify text in QLineEdit when modifying the value of an instance variable / attribute

I'm trying to send the value of QLineEdit from one module to another in another module at the press of a button, but it does not work (just do not change the text in the second QLineEdit ). This is my code: Module1 from Py...
asked by 13.08.2018 / 06:34
1
answer

How to attach an image to an email, using the smtplib python library

What should I modify / add so that this piece of code can send attached images? def send_email(usuario,paswor,correo): try: server=smtplib.SMTP("smtp.gmail.com:587") server.ehlo() server.starttls() server.login(config.EMAIL_...
asked by 27.08.2018 / 22:23
2
answers

Managing a BD with a lot of data (2 million) [closed]

I have a BD with countries, products, year and import costs, and I want to create a page or application for Desktop, in which I can do searches from countries and years, I was thinking about mounting it in PHPMyAdmin but at the moment that the a...
asked by 05.08.2018 / 02:58