aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/gui/app/models.py
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2012-01-19 22:04:28 +0000
committerMichael Elkins <melkins@tislabs.com>2012-01-19 22:04:28 +0000
commit7cdaa9831e69b1943093751a3b6b0edb4f50d4aa (patch)
tree26e5ae033fc5f711eedea5c91cbe0ea18c7f3d32 /rpkid/rpki/gui/app/models.py
parent128ffb0bb70df94a508ffc27174251d1effccda8 (diff)
fixed ghostbuster suppport. app.models.GhostbusterRequest now does multi-table inheritance from irdb.models.GhostbusterRequest.
forms.GhostbusterRequest can be a plain class instead of a callable by setting the .queryset attribute on the field during __init__ svn path=/branches/tk161/; revision=4236
Diffstat (limited to 'rpkid/rpki/gui/app/models.py')
-rw-r--r--rpkid/rpki/gui/app/models.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/rpkid/rpki/gui/app/models.py b/rpkid/rpki/gui/app/models.py
index 5bfc9e81..87efdf8b 100644
--- a/rpkid/rpki/gui/app/models.py
+++ b/rpkid/rpki/gui/app/models.py
@@ -116,11 +116,15 @@ class ROARequestPrefix(rpki.irdb.models.ROARequestPrefix):
def get_absolute_url(self):
return ('rpki.gui.app.views.roa_detail', [str(self.pk)])
-class GhostbusterRequest(models.Model):
+class GhostbusterRequest(rpki.irdb.models.GhostbusterRequest):
"""
- Stores the information require to fill out a vCard entry to populate
- a ghostbusters record.
+ Stores the information require to fill out a vCard entry to
+ populate a ghostbusters record.
+
+ This model is inherited from the irdb GhostBusterRequest model so
+ that the broken out fields can be included for ease of editing.
"""
+
full_name = models.CharField(max_length=40)
# components of the vCard N type
@@ -143,9 +147,6 @@ class GhostbusterRequest(models.Model):
code = models.CharField(verbose_name='Postal Code', blank=True, null=True, max_length=40)
country = models.CharField(blank=True, null=True, max_length=40)
- # pointer to the IRDB object matching this ghostbuster request
- irdb = models.ForeignKey(rpki.irdb.models.GhostbusterRequest, related_name='app_ghostbusters')
-
def __unicode__(self):
return u"%s's GBR: %s" % (self.issuer.handle, self.full_name)