intro_Django/ProyectoWeb/servicios/models.py

22 lines
513 B
Python

from django.db import models
# Create your models here.
class Servicio(models.Model):
titulo = models.CharField( max_length = 50 )
contenido = models.CharField( max_length = 50 )
imagen = models.ImageField()
created = models.DateTimeField( auto_now_add = True)
updated = models.DateTimeField( auto_now_add = True)
class Meta:
verbose_name = 'servicio'
verbose_name_plural = 'servicios'
def __str_(self):
return self.titulo