Skip to content
Snippets Groups Projects
Commit d1ac40b1 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

Use abstract ModelWithCreatedUpdatedFields for Host model

this adds the fields `created_at`, `created_by`, `updated_at` and `updated_by`
parent aaa09211
No related branches found
No related tags found
No related merge requests found
......@@ -91,9 +91,9 @@ class ModelWithCreatedUpdatedFields(models.Model):
"""
created_at = models.DateTimeField(auto_now_add=True)
created_by = models.CharField()
created_by = models.CharField(max_length=150)
updated_at = models.DateTimeField(auto_now=True)
updated_by = models.CharField()
updated_by = models.CharField(max_length=150)
class Meta:
abstract = True
......@@ -175,7 +175,7 @@ class Language(models.Model):
return self.name
class Host(ModelWithImageFields):
class Host(ModelWithImageFields, ModelWithCreatedUpdatedFields):
name = models.CharField(max_length=128)
is_active = models.BooleanField(default=True)
email = models.EmailField(blank=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment