Hello, I am a new programmer on Django.
I want in this class show, in the admin site of Django, the field "id",
I don't want create other field, if this could be possible.

class Tarjeton(models.Model):
farmacia = models.ForeignKey(Farmacia, null=True, on_delete=models.SET_NULL)
    MOTIVO = (
        ('ACT', 'ACTIVO'),
        ('VEN', 'VENCIDO'),
        ('TRA', 'TRASLADO'),
        ('CER', 'CERRADO'),
        ('FAL', 'FALLECIDO'),
    )
TarjetonMotivo = models.CharField(max_length=3, choices=MOTIVO, default='ACTIVO')

    class Admin:pass

    def __str__(self):
        return self.id

T.I.A.

--

Jesús Reyes Piedra
Admin Red Neurodesarrollo,Cárdenas
La caja decía:"Requiere windows 95 o superior"...
Entonces instalé LINUX.


--
Este mensaje le ha llegado mediante el servicio de correo electronico que 
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema 
Nacional de Salud. La persona que envia este correo asume el compromiso de usar 
el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5963DEC0.2010400%40infomed.sld.cu.
For more options, visit https://groups.google.com/d/optout.

Reply via email to