Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

# -*- coding: UTF-8 -*- 

# Copyright 2016 by Luc Saffre. 

# License: BSD, see LICENSE for more details. 

"""Defines the :manage:`checksummaries` management command: 

 

.. management_command:: checksummaries 

 

 

.. py2rst:: 

 

  from lino.modlib.summaries.management.commands.checksummaries \ 

      import Command 

  print(Command.help) 

 

 

""" 

 

from __future__ import unicode_literals, print_function 

 

from django.conf import settings 

from django.core.management.base import BaseCommand 

 

from lino.api import rt 

 

 

class Command(BaseCommand): 

    args = "[app1.Model1] [app2.Model2] ..." 

    help = """ 

 

    Update the summary tables. 

 

    If no arguments are given, run it on all summaries. 

 

    Otherwise (not yet implemented) every positional argument is 

    expected to be a model name in the form `app_label.ModelName`, and 

    only these models are being updated. 

 

    """ 

 

    def handle(self, *args, **options): 

        ses = rt.login() 

        ses.run(settings.SITE.site_config.check_summaries) 

        # checksummaries(args=args)