Questions tagged as 'django'

0
answers

Problems with Push Notification and Django (vapid_private_key)

I was able to reproduce an example with the pywebpush repository to make Push notification. After breaking my head to understand, I managed to do it. However, when I tried to integrate with my django project, it did not roll. I believe it's so...
asked by 30.11.2017 / 16:06
0
answers

Django Channels Routing not working

I wanted people to access my URL as usual before (to install channels) localhost/home/minha-slug and to detect socket messages within that route. I want to create Groups not to be sending messages to all of the site, but who is on the pag...
asked by 27.11.2017 / 21:38
0
answers

How to create streaming service with python and django [closed]

I intend to create a streaming video service, the project is in python and django. How do I make this service available? I use python 2.7 and django 1.10. I only found old stuff! Thank you for your attention!     
asked by 10.11.2017 / 21:35
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
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

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
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

Using extra field in Django Annotate

I'm trying to add a column named today in a Model with .extra() , to work on an annotate . I'm not finding. He is not finding the field. duration = ExpressionWrapper(F('today') - F('pub_date'), output_field=fields.DurationField()...
asked by 14.09.2017 / 17:24