Questions tagged as 'django'

1
answer

How can I get the value of a database field by means of a model in Django?

Good afternoon friends of stackoverflow. I have the following question as to how I can obtain the value of a field by means of a query in a model of a database please. Here is the code. Views.py class UserFormView(View): form_class =...
asked by 28.12.2017 / 05:08
1
answer

Problem when running a project in Django

At the time of the server startup, the link in the url shows that the "templateDoesNotExist" does not exist, but it exists in a folder called directory1 WEB:    TemplateDoesNotExist at / admin / login /       admin / login.html       Req...
asked by 20.12.2017 / 13:47
1
answer

Save value in one field depending on the value of another field in Rest Framework

Good morning I am trying to change what I have done in forms to serializers and I find that with forms, depending on a date that is entered, it calculates another date for another field. I have seen that the SerializedMethodField does what...
asked by 18.12.2017 / 08:39
0
answers

error (1054, "Unknown column 'useriorol.id' in 'field list'") django 1.10

Good afternoon, as you can see I present the following problem: error (1054, "Unknown column 'useriorol.id' in 'field list'") django 1.10 at the time of entering the administrator I select the useriorol option and I see this error. the admin....
asked by 18.12.2017 / 21:59
1
answer

error in accepting unicode in django-python 2.7.1o

Good morning for everyone. The error that comes up is the following: At the moment I am trying to connect the database with django using mysql and the version of python 2.7.10 when using python manage.py and makemigrations in the end is as fo...
asked by 11.12.2017 / 15:05
0
answers

Django does not save objects after save () when I compare in the test but if it works by shell

More than a problem is a doubt of not knowing what is happening, the logic is not very complex and the code at least by shell works well but when I want to write test to prove it gives me error and I would like to know why. .. the logic is as fo...
asked by 09.12.2017 / 22:44
0
answers

Django filtering last JSONField object

I'm trying to make a filter of a JSONField that has the following data: [ { "date": "2017-12-02T11:39:07.447677", "staff": "payment_in_process" }, { "date": "2017-12-02T11:39:12.700590", "state": "ASSIGNING", "staff":...
asked by 15.12.2017 / 16:08
1
answer

Get file path from the request.POST in Django

I want to obtain the path of a file that I upload using a form but when printing the field returns a type None . My models.py is this class Insumo(models.Model): nombre = models.CharField(max_length=50) file = models.FileField...
asked by 13.12.2017 / 14:42
2
answers

Problem to work with Django

I'm trying to work with Django and I could not. I can not access Django from the cmd. Do we have to configure something in the path to work with Django? - C: \ Django-1.10.8 \ django \ bin-- I have the correct path with Python, and add Django...
asked by 05.12.2017 / 20:24
1
answer

from django.apps import apps No module named 'django.apps'

Hi, I am new using django, I am using python 3.5 and django 1.9 but after installing it and trying to create my first project it gives me errors that I do not understand, it is as if django was not installed but if it is? It puts me: Traceback...
asked by 03.12.2017 / 20:41