Questions tagged as 'python-2.7'

1
answer

Interacting all items in a list

I have the following situation: I have 4 numerical lists ranging from 1 to 30. Eg: AP_X = [1,2,3,4,5...30] AP_Y = [1,2,3,4,5...30] demanda_X = [1,2,3,4,5...30] demanda_Y = [1,2,3,4,5...30] I have another empty list called distancia...
asked by 07.03.2017 / 00:35
2
answers

Rename application in Django Admin

Good night guys, I'm trying to rename the application in django admin according to the documentation, but it did not work, I think I'm doing something wrong, the code is as follows: players control / apps.py from django.apps import AppCon...
asked by 10.02.2017 / 22:28
1
answer

How do I create 2 forms simultaneously Django

What I want is in a single templante bring these 2 forms simultaneously, in separate pages works, but the two together still could not do. Do I need to do an intermediate form? Am I doing wrong at some point? ... forms.py from django import...
asked by 19.12.2016 / 12:28
1
answer

How can I prevent the performance of the synthesizer from being interrupted?

I'm trying to make a program that, when I press a key, it reads which key was pressed. For example: Press the "a" key to return: "Normal Key A" I press the "b" key to return: "Normal Key B" (in audio) press key "7" returns: "Normal K...
asked by 02.12.2016 / 00:27
1
answer

Django 1.10 + Django Restless 0.0.10 and Request empty

I'm using django restless views to build some REST interfaces and in all posts the request.POST and request.params are blank. If I run: print request print request.POST I have the following return: <WSGIRequest: POST '/ambiente/alo/...
asked by 08.12.2016 / 22:18
1
answer

Import model class attributes from another app

Good afternoon guys, I'm good, a doubt! I'm using 2 Apps in django admin App1 = Registration App2 = Controllers control I imported the app1 model, the "Person" class into the "Scholarship" class, but it only takes the "Name" attribute a...
asked by 27.01.2017 / 05:57
1
answer

How to install new python modules in windows?

I changed to windows recently and I'm trying to troubleshoot the module I'm trying to install and the requests I installed via pip but it's not working I think it's something related to the environment varaiavel which is the most practical way t...
asked by 29.10.2016 / 00:15
1
answer

print QRcode directly printer Zebra by python

I am generating qrcodes by python, so I want to print directly to the label printer zebra, I can already print words contained in an entry, but when I try to print the qrcode of the error: code: def printQrCode(self): img = os.path...
asked by 27.09.2016 / 18:29
1
answer

Problem with urls and views inside the server

I was studying python and django, and I decided to make my wedding website in django. The project runs perfectly on my local pc, the problem is when I deploy to digital ocean and it gives this error here. The admin works right. The prob...
asked by 10.08.2016 / 14:15
0
answers

Continuous division - IndexError: list index out of range

for i in lista: lista.append(X) X = X * 0.5 for i in range(100): print 'N[%d] = %.4f' %(i, lista[i]) This error always happens: IndexError: list index out of range     
asked by 07.08.2016 / 21:16