Add a set_key django admin command to make it easier to load keys
parent
090d36de66
commit
40a660e9b6
|
@ -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()
|
||||
|
Loading…
Reference in New Issue