2020-11-20 14:04:12 -03:00
|
|
|
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 )
|
2020-11-20 20:52:22 -03:00
|
|
|
imagen = models.ImageField( upload_to= 'servicios' )
|
2020-11-20 14:04:12 -03:00
|
|
|
created = models.DateTimeField( auto_now_add = True)
|
|
|
|
updated = models.DateTimeField( auto_now_add = True)
|
2020-11-20 20:52:22 -03:00
|
|
|
|
2020-11-20 14:04:12 -03:00
|
|
|
class Meta:
|
|
|
|
verbose_name = 'servicio'
|
|
|
|
verbose_name_plural = 'servicios'
|
|
|
|
|
|
|
|
|
2020-11-20 16:12:15 -03:00
|
|
|
def __str__(self):
|
2020-11-20 14:04:12 -03:00
|
|
|
return self.titulo
|
|
|
|
|