I tried to render 3 forms with Class-based views in a single template but I did not succeed, so I decided to do something like this with a method: def formTortas(request): ....
where I call my 3 forms defended in Forms.py in this way,...
I have a problem where I want to subtract two fields and then update a record, which would be cantidad - stock , and the latter would be the modified one, here the model:
models.py:
class Pedido(models.Model):
especialidad = m...
I have these models:
class TablaA(models.Model):
estado = models.BooleanField()
# mas campos...
class TablaB(models.Model):
tabla_a = models.ForeignKey(TablaA)
estado = models.BooleanField()
# mas campos...
class TablaC(m...
I hope it is not a little trivial my question I have the following models.
class ModelA(models.Model):
tipo= UCharField(max_length=20, null=True, blank=True)
class ModelB(models.Model):
model_a= models.ForeignKey(ModelA, null=False...
I am adding the following attribute type choice to my model
class User(AbstractUser):
GENDER_MALE = 'M'
GENDER_FEMALE = 'F'
GENDER_OTHER = 'O'
GENDER_CHOICES = (
(GENDER_MALE, u'male'),
(GENDER_FEMALE, u'...
I have these two models:
class Pacientes(models.Model):
nombres = models.CharField(max_length=50)
apellidos = models.CharField(max_length=50)
numero_identificacion = models.CharField(max_length=10)
fecha_nacimiento = models.DateField(blank=Fal...
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...
When I try to access the database that Django automatically creates from the interpreter, or from a script that Django has not created on its own, I receive an error.
Code where I try to import the User model of the application called ap...
In my application I have the user model that extends AbstractUser and I have added two boolean fields, my question is, how can I make the user not enter certain views by url depending on whether it is validator or is a digitizer? So far I have o...
Hi, I have a model that inherits from AbstractUser:
Models.py
class Usuario(AbstractUser,models.Model):
dni=models.CharField(
verbose_name="DNI",
max_length=9,
blank=False,
)
clave = models.CharField(...