Questions tagged as 'django'

1
answer

NOT NULL constraint failed: worker_worker.rol_id

I have the following error NOT NULL constraint failed: worker_worker.rol_id  when saving the data using a modelForm Model class Trabajador(models.Model): nombres = models.CharField(max_length=50) apellido_paterno = models.CharField(...
asked by 24.04.2018 / 04:00
1
answer

How to create dynamic inputs with Django?

I am making a form to add many products to the same collection and I want the collection form to create the collection with an unlimited list of products. My form is this: class TendenciaForm(forms.ModelForm): class Meta: model...
asked by 16.04.2018 / 13:31
1
answer

Django forms interactive

I am using Python3.5 Django 1.11 as a backend for an apache server in red hat. Currently it has been put into production and works without problems. We are now seeing the need for future use of FORMS in the pages but with the priority of bein...
asked by 08.03.2018 / 15:20
1
answer

How to login with mail in Django?

I am trying to make a login in Django and I have seen that by default I can only log in with the username and password but due to the demands of my client it wants to be able to login with the email apart from the username. I have created a f...
asked by 28.03.2018 / 17:05
1
answer

How can I make queries with ajax webservice? [closed]

How about everyone? I'm working on a project, where the backend should be done with Django and the frontend with HTML, but for these two to communicate I have to use ajax webservice and that's something I do not know :( If you could give me a ha...
asked by 16.03.2018 / 03:43
2
answers

Local variable 'client' referenced before assignment

I want to protect the view of a template, since I have several types of extended users with model User of Django, I find it difficult to work. I have already tried it in many ways but without success, this is one and it gives me error....
asked by 16.03.2018 / 02:41
1
answer

Date__range inclusive in Django

I'm trying to do the following filter in a Django query: ben_filtro = Auditoria.objects.filter(fecha__range=[fechaInicial,fechaFinal]) I get the results but excluding some that are in the final date. Fields are of type DateTimeField ....
asked by 23.02.2018 / 01:03
1
answer

'FileField' object has no attribute 'is_hidden' when creating form to upload documents

I get this error in the template that renders my view, in which I am testing the FileField field in the model. {% extends 'base.html' %} {% block Tilte %} Registrar Solictud a la Convocatoria {% endblock Tilte %} {% block navbar %} {% end...
asked by 01.03.2018 / 17:36
1
answer

How to use Django with an existing database in MySQL?

I have an application in Django 2.0 and as a database engine I use MySQL. I have a problem because the database was previously created and already has records, my idea is to use this same database for the application I'm creating. Use the com...
asked by 09.04.2018 / 19:00
2
answers

postgresql error with django

error: manage.py makemigrations Traceback (most recent call last): File "C:\Users\pcort\Documents\Programacion\programacionWeb\postgresql_django\venv\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection self....
asked by 11.01.2018 / 22:36