Questions tagged as 'django'

1
answer

Red Hat 6 - Httpd24 - Django - mod_wsgi

I find a server with Red Hat 6 OS, this one by default comes with an httpd service that we do not want to use. Therefore I install httpd 2.4.18 as a second apache service. More or less in this link you can identify how it was done. Now we w...
asked by 26.02.2018 / 18:43
2
answers

How to use handle_uploaded_file in Django

Hello, I'm using handle_uploaded_file in Django and it throws me the following error: MultiValueDictKeyError at / restore / "'file'" Here I leave my code to see if you can help me and know what happens This is the form.py : class...
asked by 12.12.2017 / 16:27
0
answers

How do I save the results of an autocomplete in an input, django1.11?

My problem is that I'm using an autocomplete to relate a model in Django 1.11. Until now that autocomplete is looking for me, but I want the result to keep it in an input. That autocomplete I'm using it in a registry. I hope and help me. Vis...
asked by 09.12.2017 / 17:17
0
answers

Authenticate user and identify their role or group to which Django belongs

How do I authenticate a user with an email and password, and then log in to show him a menu according to the role or group he belongs to. Model.py from django.db import models from Apps.persona.models import Person from django.contrib.aut...
asked by 16.11.2017 / 23:00
1
answer

Access to data within a loop in the context - Django

I hope everything is fine. I have a problem and I come to the community waiting for your help! Grateful in advance. I try to do some consultations in Django, my query what you need to do is to know some figures of some users. It happens th...
asked by 17.10.2017 / 14:20
1
answer

Help with Angular rest service 4 Django Rest Framework

Good afternoon, I'm making an application using Django and Angular 4 however when I try to consume the service provided by django I get the following error.    Response to preflight request does not pass access control c...
asked by 26.10.2017 / 19:57
0
answers

Django - Reply with JsonResponse and pdf

I have a view that responds with a JsonResponse. I need to generate a pdf report using the same instance of the Building class (the structure variable). For example, the view returned by a Json is: @login_required def buildings(reque...
asked by 04.10.2017 / 16:18
1
answer

Appropriate class view to contain various forms of different objects

I want to do a view with three sections forms for three different objects, Priorities, States and Types to know. I have something like this . I did it using modelformsets , in a list view, but I do not know what kind of view to use to...
asked by 09.10.2017 / 14:39
1
answer

Error loading file in html form

I am creating an application using django where files should be uploaded and these will be saved in the folder of a project. The problem is that when I fill out the form from the admin of django it allows me to save the file without problem...
asked by 24.03.2018 / 21:55
0
answers

How can I enter the time in Django? [closed]

I need help I am developing an application in which the user enter a time from a form, and managed to enter the date but the client wishes to enter the time in 2:00 pm format, but never managed a model for this task can someone help me as I can...
asked by 11.08.2017 / 15:20