Questions tagged as 'django'

1
answer

Error in deploy with NameError: name 'static' is not defined

When uploading files to the server in pythonanywere I get the following error line. Any ideas on how to solve it? File "/home/factura/wp/wp/wp/urls.py", line 36, in <module> urlpatterns += static(settings.MEDIA_URL, document_root=se...
asked by 07.12.2018 / 23:32
1
answer

how to get 'id' from a foreign key

Good what I want to do is fill a table that has a foreingkey and not take the value that saves id in the base data class Reportes(models.Model): id_fichero=models.ForeignKey(Cargar_Fichero) # file=models.FileField(null=True)...
asked by 27.04.2016 / 00:19
1
answer

Help with Number Formatting in Django 1.9

Hello I have the following problem, I am trying to format numbers with the help of the library jquery-number , the problem is that when I want to assign its properties to the input, I do not achieve it since at the moment of placing said field...
asked by 21.04.2016 / 20:18
2
answers

how to show a Reportlab report in the browser?

I am new with reportlab, the problem I have is that despite being able to create reports with reportlab, I have only been able to save them in the root folder of my project, but when I upload it to a test server I get this error: Error and Tr...
asked by 10.03.2016 / 15:03
1
answer

Publish Django in Apache [closed]

Someone could perhaps explain to me how I can put into production a Django project with Apache, I'm a little lost. Official Documentation Production I have read Django's documentation but the truth is not clear about this, I would appreciate a...
asked by 12.11.2018 / 20:47
2
answers

Django, Do not send data to the bd with ajax

By pressing the submit button of the form. go to the error function of the script.js file, when looking at console " POST / HTTP / 1.1" 200 28518 , the database is postgres. is not saving the data, I have reviewed several pages online bu...
asked by 06.11.2018 / 14:51
2
answers

Show details in details

I have created a form in Django but when I want to show the details of a record it does not bring me the update date, I would like to see why it does not bring me that information. models.py : from django.db import models class Empleados...
asked by 22.08.2018 / 19:50
3
answers

Consultation of two Models in Django

I have these two models: class Pacientes(models.Model): nombres = models.CharField(max_length=50) apellidos = models.CharField(max_length=50) numero_identificacion = models.CharField(max_length=10) fecha_nacimiento = models.DateField(blank=Fal...
asked by 05.07.2018 / 22:03
1
answer

Use UpdateView for two Django operations

I want to use a view to do two operations. From a list of articles I want to add or subtract the current quantity of the article. I duplicated my view and changed the name to reflect the operation I want to do, I created 2 URLs with different...
asked by 15.06.2018 / 21:19
1
answer

The url in Django is superimposed

I have an app with a product loading form for books (Product, Date of publication, file) After loading it generates its own url ( link ) But when selecting to see all the images, I get the following error: verimagenes.html {% extend...
asked by 27.04.2018 / 05:54