From 487e4a8c7cbd61eb15ace5112dc5cb68d0cc3522 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Tue, 26 Jan 2016 14:48:49 +0100 Subject: [PATCH] =?utf8?q?polecenie=20do=20aktualizacji=20licznik=C3=B3w?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../management/commands/update_counters.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/catalogue/management/commands/update_counters.py diff --git a/src/catalogue/management/commands/update_counters.py b/src/catalogue/management/commands/update_counters.py new file mode 100644 index 000000000..089dd0ff8 --- /dev/null +++ b/src/catalogue/management/commands/update_counters.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from __future__ import print_function, unicode_literals + +from django.conf import settings +from django.core.management.base import BaseCommand + +from catalogue.helpers import update_counters +from wolnelektury.utils import makedirs + + +class Command(BaseCommand): + help = 'Update counters.' + + def handle(self, **options): + makedirs(settings.VAR_DIR) + update_counters() -- 2.20.1