aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/home/models.py
diff options
context:
space:
mode:
authorGravatar hedy <[email protected]>2023-12-14 20:28:17 +0800
committerGravatar hedy <[email protected]>2023-12-14 20:28:17 +0800
commit449c08fd5459b2f804dbf825086ec1dd0f244d8a (patch)
treee4589cb227cdb2e611bcbf9b02ea481fe24cdb34 /pydis_site/apps/home/models.py
parentResize theme switch (diff)
parentMerge pull request #1173 from python-discord/dependabot/pip/sentry-sdk-1.39.0 (diff)
Fix all conflicts
hopefully I dont have to do this again
Diffstat (limited to 'pydis_site/apps/home/models.py')
-rw-r--r--pydis_site/apps/home/models.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/pydis_site/apps/home/models.py b/pydis_site/apps/home/models.py
new file mode 100644
index 00000000..00a83cd7
--- /dev/null
+++ b/pydis_site/apps/home/models.py
@@ -0,0 +1,33 @@
+from django.db import models
+
+
+class RepositoryMetadata(models.Model):
+ """Information about one of our repos fetched from the GitHub API."""
+
+ last_updated = models.DateTimeField(
+ help_text="The date and time this data was last fetched.",
+ auto_now=True,
+ )
+ repo_name = models.CharField(
+ primary_key=True,
+ max_length=40,
+ help_text="The full name of the repo, e.g. python-discord/site",
+ )
+ description = models.CharField(
+ max_length=400,
+ help_text="The description of the repo.",
+ )
+ forks = models.IntegerField(
+ help_text="The number of forks of this repo",
+ )
+ stargazers = models.IntegerField(
+ help_text="The number of stargazers for this repo",
+ )
+ language = models.CharField(
+ max_length=20,
+ help_text="The primary programming language used for this repo.",
+ )
+
+ def __str__(self):
+ """Returns the repo name, for display purposes."""
+ return self.repo_name