diff options
Diffstat (limited to 'rpkid/rpki/gui/models.py')
-rw-r--r-- | rpkid/rpki/gui/models.py | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/rpkid/rpki/gui/models.py b/rpkid/rpki/gui/models.py index d9fc4e81..0ea0924b 100644 --- a/rpkid/rpki/gui/models.py +++ b/rpkid/rpki/gui/models.py @@ -1,27 +1,28 @@ -""" -$Id$ - -Copyright (C) 2012 SPARTA, Inc. a Parsons Company - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND SPARTA DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL SPARTA BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +# Copyright (C) 2012 SPARTA, Inc. a Parsons Company +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND SPARTA DISCLAIMS ALL WARRANTIES WITH +# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +# AND FITNESS. IN NO EVENT SHALL SPARTA BE LIABLE FOR ANY SPECIAL, DIRECT, +# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. +""" Common classes for reuse in apps. """ +__version__ = '$Id$' + from django.db import models import rpki.resource_set import rpki.POW +from south.modelsinspector import add_introspection_rules class IPv6AddressField(models.Field): @@ -57,6 +58,14 @@ class IPv4AddressField(models.Field): def get_db_prep_value(self, value, connection, prepared): return long(value) +add_introspection_rules( + [ + ([IPv4AddressField, IPv6AddressField], [], {}) + ], + ['^rpki\.gui\.models\.IPv4AddressField', + '^rpki\.gui\.models\.IPv6AddressField'] +) + class Prefix(models.Model): """Common implementation for models with an IP address range. |