Questions tagged as 'django'

1
answer

Results in iframe

I want to show the results of the variable "date" in an iframe called "final.html", when I execute the code in the iframe it goes into a loop that results in an error. views.py def notification_html(request): data = _notification(request...
asked by 09.04.2015 / 12:10
1
answer

uwsgi configuration for high traffic

I have a django application and I'm having trouble setting up my server for high traffic. It is very slow with few hits. see my configuration: [uwsgi] chdir = /home/meuser/public/meusite.com.br/public_html/ wsgi-file = meusite/wsgi.py processe...
asked by 10.10.2014 / 16:57
0
answers

ValueError: Can not assign "'1'": "User.campus" must be a "Campus" instance. Error in Super User registration in Django

I'm developing an application where the user needs to be on a campus. However, when the superuser is created on the terminal, an instance error occurs. Note: The database is correctly pre-populated to search for 'campus_id'. Django 2.0.4 a...
asked by 05.01.2019 / 01:20
0
answers

Django form linked to record

I have two tables in Django (Game and Gol) and I'm trying to create a form for them: class Jogo(models.Model): ativo = models.BooleanField(default = True) dataHoraInicio = models.DateTimeField(verbose_name = 'Data e Hora de Início')...
asked by 04.01.2019 / 20:27
1
answer

Requesting request get parameters from PagSeguro

I'm trying to integrate a Django app with PagSeguro, but I'm having trouble with the notifications part. This is the view that receives the notifications: def recebe_notificacao(request): if request.method == 'POST': notificat...
asked by 03.06.2014 / 11:59
2
answers

Attribute name for the secondary key in a template in Django

I have a problem with a database imported into Django 1.6.5. In this database the columns follow the pattern: id_city, name, id_state, and so on. But django did not handle it well and I left the class like this: class City(models.Model): i...
asked by 04.06.2014 / 02:27
1
answer

Deploy Python project in heroku with error

I am trying to deploy a Python project using Django in Heroku. The deploy all goes well, but when trying to heroku run python manage.py migrate the following error occurs. Traceback (most recent call last): File "manage.py", line 23, in...
asked by 14.12.2018 / 02:07
0
answers

Django 1.11 ManyToMany

Save some people, I'm having trouble servicing an old system. I have a form via Django Admin where I manage some information, in it I added a ManyToMany relationship but the form is getting like this: HereisthecodeI'musing:models.pyclassPale...
asked by 12.12.2018 / 00:37
0
answers

Pass parameter by subimit and update the form

Hello, I am installing a parking system where the checkin is done automatically, at the time of registration it picks up the current time and date, and when I click on update it has 3 buttons, save, delete and checkout, and I wanted it when I cli...
asked by 05.12.2018 / 22:17
1
answer

Django: PostgreSQL local and in Heroku?

I'd like to use PostgreSQL locally and in Heroku. How do I set my settings.py to know which setting to use? I have tried to put it as an environment variable, but I still can not. Today I have this: #Conectar localmente no sqlite def...
asked by 05.12.2018 / 21:14