Questions tagged as 'django'

1
answer

Publish project in Python 3.5 with heroku

Hi, I have a project made with Python 3.5 and Django 1.10 and I would like to publish it in HEROKU but I see that it only supports Python 2.7, does anyone know if heroku supports Python 3.5?     
asked by 18.09.2016 / 03:56
2
answers

Show fields of related models in the django template

I have these two models, Invoice representing an invoice e Item that represents the items on the invoice. from django.db import models # Create your models here. class Invoice(models.Model): vendor = models.CharField(max_len...
asked by 24.12.2015 / 21:17
1
answer

Obtain the object of a foreign key in Django

I have these models: class Direccion(models.Model): pais = models.CharField(max_length=30) estado = models.CharField(max_length=30) municipio = models.CharField(max_length=30) ciudad = models.CharField(max_length=40, null=True,...
asked by 17.01.2016 / 03:14
4
answers

Display data with ListView with Django 1.8

I am using Django 1.8 with Python 3.4, I need to show the data of a table with ListView but it does not show me anything or show me any error. Here is the code: models.py class Tipo_almacen(models.Model): descripcion = mod...
asked by 21.01.2016 / 02:33
1
answer

Send and receive parameter via url - Django

I have this tournament detail template, I need to send as parameter the id of the tournament because when creating a team it has a direct relationship to the tournament that participates. As I send and receive in the template equipo_create the i...
asked by 18.04.2017 / 23:30
2
answers

Django urls.py error

Good morning, I am trying to put the 'MEDIA_ROOT' in 'urls.py' but when I run the 'runserver' I get the following error:    File   "C: \ Users \ Manux \ Desktop \ pd110 \ lib \ site-packages \ django \ conf \ urls \ static.py",   line 24, in...
asked by 31.03.2017 / 16:33
3
answers

How to run Django in python 3.5

I'm working with Django in python 2.7, for that I use virtualenv, pip, the mysql connector, etc. I have predefined python 3.5 in bash, but even so when I run ./manage.py shell it runs with python 2.7. How do I change it to python 3.5? Thank you...
asked by 22.10.2016 / 22:55
1
answer

Correct use of the django admin app [closed]

What is the correct use that should be given to the administration page (django.contrib.admin) in a production application . I explain my question. The administration site allows you to manage the models created in a fairly simple and abstra...
asked by 15.10.2016 / 02:12
3
answers

Change a string value to an integer

With the following code I want to make a validation where validate if a data that I am going to enter is greater than another that I already have, if so, an error message should appear. This is what appears to me as you see the value celda...
asked by 18.10.2016 / 21:05
1
answer

alternative to LOGIN_REDIRECT_URL in django 1.9

I know that even in Django 1.9 it works LOGIN_REDIRECT_URL , what happens I want an alternative to LOGIN_REDIRECT_URL since support for this will be removed in Django 1.10     
asked by 15.04.2016 / 02:06