Questions tagged as 'django'

1
answer

Create models.forms dynamically in Django

Good Night with everyone There is some way to create Django form from the existing Django models in a dynamic, automatic way or maybe by doing a for or a loop. I ask this question already if I have for example 2 Company and Book models, th...
asked by 21.02.2018 / 04:58
1
answer

Create JsonResponse UTF-8 in Django

Is there a simple way to cancel DjangoJSONEncoder.ensure_ascii and put it in False or print text different from ascii in django.http.JsonResponse in any other way?     
asked by 20.09.2017 / 03:49
1
answer

Save the ip when sending a form django

I want to add a field in the Post class that stores the ip of the person who sends the form. This is my "models.py" file from django.db import models from django.utils import timezone class Post(models.Model): author = models.ForeignKey('...
asked by 23.07.2017 / 19:16
1
answer

Structure for project in Django [closed]

What is the recommended structure to create a project? /proyecto /app01 /app02 manage.py I have 3 doubts: Is an application (app) considered a module in the project? What is a module in Django? What is an application on Django?
asked by 17.02.2016 / 04:52
1
answer

Modifying some Django admin behaviors regarding their generated forms

I have a model which I am manipulating through the Django administrator. The model and "its business logic" requires me to establish a specific behavior regarding its form to enter data. What I need to do is the following: I have the follo...
asked by 01.02.2016 / 22:24
1
answer

Problem with Django multitenant rendering

I have a project called ripso_v2 in python3 and django 1.9 that by now has a couple of apps (created with the startapp and to which I added the file urls.py and forms.py) called "general" and "phva", the main folder of the project and a folder f...
asked by 03.02.2016 / 16:07
2
answers

Render a JSON in a bootstrap table Django REST framework

I have a model that I have called Empleado which has a foreign key to a model Direccion to keep a record of the employee's addresses. Serializer: from rest_framework import serializers from models import Empleado, Direccion...
asked by 03.02.2016 / 19:20
3
answers

Convert query to Python list

I want to convert this query Clientes.objects.values() in a list to later use the Chartkick graphs but with the values that it returns to me. The Clientes model is: class Clientes(models.Model): Nombre = models.CharField(m...
asked by 28.03.2016 / 17:59
1
answer

API on ReportLab with Django

Well, I have this doubt because I have not found good documentation about it, there is a specific doubt at the moment and it is with the images. from reportlab.lib import colors from reportlab.lib.units import cm from reportlab.lib.enums impor...
asked by 10.03.2016 / 21:25
1
answer

Cross imports in Django

In my Django project I have 2 apps, as the following map shows: Django/ProyectoWeb/Apps/ ├── Catedra └── Usuarios Without detailing much: The Chair has a unique model called Commission. Users have 2 models called Student, Teacher....
asked by 20.07.2017 / 03:02