Add a set_key django admin command to make it easier to load keys

pull/1/head
Raymond Yee 2012-05-09 17:17:18 -07:00
parent 090d36de66
commit 40a660e9b6
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
from django.core.management.base import BaseCommand
from regluit.core.models import Key
class Command(BaseCommand):
help = "set a core.models.Key with name value"
args = "<name> <value>"
def handle(self, name, value, **options):
k = Key.objects.create(name=name, value=value)
k.save()