Questions tagged as 'python'

0
answers

Uploading images in Django

How to upload more than 1 image in django Admin? This is my mode: from django.db import models class Imovel(models.Model): titulo = models.CharField('Titulo', max_length=200, blank=False) slug = models.SlugField('Slug') cep =...
asked by 06.10.2017 / 03:19
0
answers

How to extract data from Facebook with Pyhon? [closed]

I want to better understand the behavior of people who like my page; who they are and what they like. Is it possible for me to get this personal data from users (name, city, age, tanned) with python on facebook? Or does Facebook deny me access t...
asked by 06.10.2017 / 14:53
1
answer

How to open pdf that is located in a folder in the project in html?

I'm trying to open a pdf file that is located in a folder inside the project, but it's not working. I followed some suggestions and tried this: <a href="../../media/Novo_Documento_2017-09-13_18.19.55_20170913182145649.pdf" target="_bla...
asked by 27.10.2017 / 15:10
0
answers

Download html post-login screen in python

Hello, I'm wondering if there is any way to get a url from a site, password and login strings and simulate a clause to go to the next page (already logged in) and download the source code from it. Note: I just want to use the urllib library and a...
asked by 04.10.2017 / 03:21
0
answers

Pandas DataFrame to_html or iterate over the data in the template?

I actually wanted to iterate over the data in the template? But how do I play my pivot data in context and treat them in the template? df = pd.DataFrame(data) pv = df.pivot(index='cands', columns='titles', values='grades') context['quizzes'...
asked by 04.10.2017 / 03:09
1
answer

Id from email entered

I have a form with only the email label for the user to fill out. If the email already exists I want to redirect it to the edit page. How do I get the user id through the email he typed? I did a test as shown below with id 14 and is going to the...
asked by 03.10.2017 / 17:16
1
answer

Fill array with ZERO in null spaces, (python / django)

The problem is in the parts marked in red , I can not assign zeros to it. According to model: ThecodesnippetthatI'mgeneratingthistable: * Note: The selection of this period may vary according to the selection: (eg 2016 until 2017/201...
asked by 12.10.2017 / 20:23
4
answers

How to create a directory in Python?

How can I use Python to create a particular directory? For example: app/ main.py How could you do to create a directory named temp within app through Python main.py ?     
asked by 09.12.2016 / 14:11
1
answer

Login in Django

I have a login page, I need to check who is logging in, Example: if you are in charge of group A, go to the page with all the users in group A, if you are in charge of group B, to page of users in group B and so on models.py class Grupo(mod...
asked by 20.09.2017 / 16:05
0
answers

Variable not defined

My code gives me error in a definition of a variable but I think it is declared the variable bits_rx , this variable has the purpose of the result of the conversion: while(1): while not radio.available(0): time.sleep(1 /100) receiv...
asked by 29.09.2017 / 00:56