Asking for your support again, I am making an application to inventory the electrical and optical ports of various equipment, and it is not clear to me how to relate a model with several models.
I have the following two objects:
class ITarj...
I have the following SQL query:
SELECT DISTINCT ON (e.id) e.id, e.nombre, e.apellido, e.estado, e.documento, c.nivelado, s.nombre AS semestre, t.nombre AS tipo
FROM estudiante e
JOIN caracterizacion c ON c.estudia...
I am building a form based on some models in one of which I have attributes with ManyToMany relationships to others.
The situation is as follows:
Model CorporalSegment
class CorporalSegment(models.Model):
SEGMENTO_HOMBRO = 'Hombr...
I am exposing an application (at the moment it is only your user scheme) with Django Rest Framework, and it happens to me that every model that I have serialized, in the url attribute, I have is the address of the localhost of my development mac...
I am creating the user profile with post_save signal , but I have a field foreign key that It's not being saved, and I do not see any way to solve it. I did it like this:
All this from the django admin.
The error is: 1048, "Column...
I have a model called worker
class Worker(models.Model):
name = models.CharField(max_length=300)
code = models.CharField(max_length=100)
user = models.OneToOneField(User, null=True, blank=True)
def __str__(self):
ret...
I have a model that has an image field, at the beginning the image was shown, but after I made a few changes but without changing the code that serves the image now it does not work, I have tried everything but it does not work, this is the code...
I'm trying to access a model in reverse.
To access the Vale model by consulting the model DetailVale is as follows:
val= DetalleVale.objects.filter(vale__usuarioVale=usuario).filter(vale__statusFinalizado=1)
However I need to consult about...
Good afternoon friends, I am creating an app in Django 1.10 and I have a model where the basic data of the people will be stored, this model includes a dateNaciento field, in this model create a method which calculates the age of the people ....
I have a problem that I do not know how to solve it. I have three models in my app:
class Hecho(models.Model):
codigo = models.CharField(max_length=1)
hecho = models.CharField(max_length=100)
class Beneficiario(models.Model):
tipo...