aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/models
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-08-13 06:08:22 +0200
committerGravatar Hassan Abouelela <[email protected]>2022-08-13 06:08:22 +0200
commitd50028d6b92909a39139007f0f3bcd7c90a88420 (patch)
tree6e4547b999be8797e71c087a7c795af271fc64ac /pydis_site/apps/content/models
parentAdd Setting For Static Builds (diff)
Add Tags To Content Listings
Adds bot tags to the content page, as well as a model to go along with it. Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'pydis_site/apps/content/models')
-rw-r--r--pydis_site/apps/content/models/__init__.py0
-rw-r--r--pydis_site/apps/content/models/tag.py17
2 files changed, 17 insertions, 0 deletions
diff --git a/pydis_site/apps/content/models/__init__.py b/pydis_site/apps/content/models/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/pydis_site/apps/content/models/__init__.py
diff --git a/pydis_site/apps/content/models/tag.py b/pydis_site/apps/content/models/tag.py
new file mode 100644
index 00000000..1437b96a
--- /dev/null
+++ b/pydis_site/apps/content/models/tag.py
@@ -0,0 +1,17 @@
+from django.db import models
+
+
+class Tag(models.Model):
+ """A tag from the python-discord server."""
+
+ last_updated = models.DateTimeField(
+ help_text="The date and time this data was last fetched.",
+ auto_now=True,
+ )
+ name = models.CharField(
+ help_text="The tag's name.",
+ primary_key=True,
+ max_length=50,
+ )
+ body = models.TextField(help_text="The content of the tag.")
+ url = models.URLField(help_text="The URL to this tag on GitHub.")