From 89e13579e1b44b738f10fadec8454aa0e6f073af Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Fri, 8 Aug 2014 15:03:03 +0100 Subject: toaster: update orm models for layerindex compatibility We add a ToasterSettings table that will keep installation-wide settings. We update the models for the layer-related data storage to make them compatible with the layerindex application API. We add a LayerSource class that can update local data from a LayerIndex-like compatible API. Adding a command line option to perform information update from all upstream layer sources. Fair warning - there is no backward migration from 0013. Signed-off-by: Alexandru DAMIAN --- lib/toaster/orm/management/commands/lsupdates.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/toaster/orm/management/commands/lsupdates.py (limited to 'lib/toaster/orm/management/commands/lsupdates.py') diff --git a/lib/toaster/orm/management/commands/lsupdates.py b/lib/toaster/orm/management/commands/lsupdates.py new file mode 100644 index 000000000..75e9513fc --- /dev/null +++ b/lib/toaster/orm/management/commands/lsupdates.py @@ -0,0 +1,12 @@ +from django.core.management.base import NoArgsCommand, CommandError +from orm.models import LayerSource +import os + +class Command(NoArgsCommand): + args = "" + help = "Updates locally cached information from all LayerSources" + + + def handle_noargs(self, **options): + for ls in LayerSource.objects.all(): + ls.update() -- cgit 1.2.3-korg