Ajout des applications blog et progression avec modèles, vues, URLs et intégration dans le sitemap et les configurations du projet.
This commit is contained in:
parent
45d2cb66f0
commit
3e44013132
23 changed files with 215 additions and 0 deletions
16
blog/models.py
Normal file
16
blog/models.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from django.db import models
|
||||
|
||||
class Post(models.Model):
|
||||
name = models.CharField(max_length=200)
|
||||
tags = models.CharField(max_length=200)
|
||||
slug = models.SlugField()
|
||||
content = models.TextField()
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Article"
|
||||
verbose_name_plural = "Articles"
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
Loading…
Add table
Add a link
Reference in a new issue