diff options
-rw-r--r-- | rpkid/rpki/irdb/__init__.py | 22 | ||||
-rw-r--r-- | rpkid/rpki/irdb/models.py (renamed from rpkid/rpki/irdb.py) | 0 | ||||
-rw-r--r-- | scripts/convert-from-entitydb-to-sql.py | 21 |
3 files changed, 36 insertions, 7 deletions
diff --git a/rpkid/rpki/irdb/__init__.py b/rpkid/rpki/irdb/__init__.py new file mode 100644 index 00000000..efd75a03 --- /dev/null +++ b/rpkid/rpki/irdb/__init__.py @@ -0,0 +1,22 @@ +""" +Django really wants its models packaged as a models module within a +Python package. Humor it. + +$Id$ + +Copyright (C) 2011 Internet Systems Consortium ("ISC") + +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 ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC 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. +""" + +from rpki.irdb.models import * diff --git a/rpkid/rpki/irdb.py b/rpkid/rpki/irdb/models.py index 5afbebb3..5afbebb3 100644 --- a/rpkid/rpki/irdb.py +++ b/rpkid/rpki/irdb/models.py diff --git a/scripts/convert-from-entitydb-to-sql.py b/scripts/convert-from-entitydb-to-sql.py index 43a51cf7..4e82783c 100644 --- a/scripts/convert-from-entitydb-to-sql.py +++ b/scripts/convert-from-entitydb-to-sql.py @@ -69,16 +69,23 @@ for table in tables: from django.conf import settings -settings.configure(DATABASES = { "default" : { - "ENGINE" : "django.db.backends.mysql", - "NAME" : sql_database, - "USER" : sql_username, - "PASSWORD" : sql_password, - "HOST" : "", - "PORT" : "" }}) +settings.configure( + DATABASES = { "default" : { + "ENGINE" : "django.db.backends.mysql", + "NAME" : sql_database, + "USER" : sql_username, + "PASSWORD" : sql_password, + "HOST" : "", + "PORT" : "" }}, + INSTALLED_APPS = ("rpki.irdb",), +) import rpki.irdb +import django.core.management + +django.core.management.call_command("syncdb", verbosity = 4) + def ns(tag): return "{http://www.hactrn.net/uris/rpki/myrpki/}" + tag |