summaryrefslogtreecommitdiff
path: root/postgresqleu/util/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'postgresqleu/util/models.py')
-rw-r--r--postgresqleu/util/models.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/postgresqleu/util/models.py b/postgresqleu/util/models.py
index 53caac67..87bccd5f 100644
--- a/postgresqleu/util/models.py
+++ b/postgresqleu/util/models.py
@@ -1,6 +1,8 @@
# Some very simple models used by utilities
from django.db import models
+from .oauthapps import oauth_application_choices
+
class Storage(models.Model):
key = models.CharField(max_length=16, null=False, blank=False)
@@ -11,3 +13,16 @@ class Storage(models.Model):
unique_together = (
('key', 'storageid'),
)
+
+
+class OAuthApplication(models.Model):
+ name = models.CharField(max_length=100, null=False, blank=False)
+ baseurl = models.URLField(max_length=100, null=False, blank=False, unique=True, verbose_name='Base URL')
+ client = models.CharField(max_length=200, null=False, blank=False)
+ secret = models.CharField(max_length=200, null=False, blank=False)
+
+ def __str__(self):
+ return self.name
+
+ class Meta:
+ verbose_name = 'OAuth Application'