Questions tagged as 'django'

1
answer

Why do I get this error with reverze_lazy?

I have the following code of my function to create a form def correspondencia_view(request): if request.method == 'POST': form = CorrespondenciaForm(request.POST) if form.is_valid(): # si es todo correcto el archiv...
asked by 11.05.2018 / 17:06
3
answers

Modifying or updating a post does not return an HTTPResponse object

Starting in Django I ran into a problem that I can not solve. The application is a blog. of the DjangoGirl tutorial. The invaluable help is appreciated. When I want to add a post from a form or I want to update a post I get the followin...
asked by 21.04.2018 / 21:39
4
answers

Do not upload the image in a django form

I have a form to upload locations, if I remove the image field of the models.py it is uploaded if not no! Would they know where they could have the error? My models. py: class Ubicacion(models.Model): nombre = models.CharField(max_length=...
asked by 13.04.2018 / 11:35
2
answers

get () returned more than one Location - it returned 2!

I have routes associated with locations, I want that when I type ' link ' I return all the locations with the path of id 11 but if you have two or more I get the error: "MultipleObjectsReturned at / rest / Location / 11 / get () returned more...
asked by 10.04.2018 / 10:26
2
answers

Using Django with an existing Sql Sever database

I'm trying to test Django with a database in Sql Server that already exists. I have searched for documentation, and everything points to using the Inspectdb ( python mysite/manage.py inspectdb > mysite/myapp/models.py ) comman...
asked by 01.03.2018 / 19:45
1
answer

As I extend the User model of django

I want to create something like a study blog, but I want to create a user that has more attributes than the default django auth_user, I read that this class can be extended and I saw an example more or less like this: from django.db import mod...
asked by 26.01.2018 / 05:53
0
answers

sock failed (2: No such file or directory) - django + gunicorn + virtualenv + centos7

I am trying to deploy a Django application on CentOS7 using gunicorn and ngnix to handle the requests. I followed an internet guide (Digital ocean) for CentOS7 (see URL below), I followed the guide as close as possible and when it is supposed...
asked by 07.01.2018 / 09:27
0
answers

how to get cities from a specific country?

Good morning. I am doing a project for Colombia and I need the cities of that country and I would like to know if anyone knows any extensions for Django 1.11 and python 3.5 to obtain the cities of a specific country. My problem is that it may...
asked by 01.02.2018 / 11:57
1
answer

Multi database and Multi sites Django

I try to make an API Rest Application in Django and I try to make several domains (example1.com, example2.com, example3.com) at the time of making requests are directed with the database of each one. Each domain has its database in postgresql...
asked by 05.01.2018 / 19:01
1
answer

django set client encoding with multiple database

Good I am developing a API by django rest framework and for this I have configured two databases. I need to make a query to the second database configured (postgresql) and get it to return the data but it gives me the spec...
asked by 21.12.2017 / 17:46