

from django.core.management.base import BaseCommand

from syntacticframes.models import VerbNetClass

class Command(BaseCommand):
    def handle(self, *args, **options):
        for vn_class in VerbNetClass.objects.all():
            print(vn_class.name)
            vn_class.update_members_and_translations()



from time import gmtime, strftime

from django.core.management.base import BaseCommand

from syntacticframes.models import VerbNetClass

class Command(BaseCommand):
    def handle(self, *args, **options):

        when = strftime("%d/%m/%Y %H:%M:%S", gmtime())
        verb_logger.info("{}: Start full update of verbs (members and translations)".format(when))

        for vn_class in VerbNetClass.objects.all():
            print(vn_class.name)
            vn_class.update_members_and_translations()

        when = strftime("%d/%m/%Y %H:%M:%S", gmtime())
        verb_logger.info("{}: Ended full update of verbs (members and translations)".format(when))

Include time of update start/end
Include time of update start/end

  
+ from time import gmtime, strftime
  
  from django.core.management.base import BaseCommand
  
  from syntacticframes.models import VerbNetClass
  
  class Command(BaseCommand):
      def handle(self, *args, **options):
+ 
+         when = strftime("%d/%m/%Y %H:%M:%S", gmtime())
+         verb_logger.info("{}: Start full update of verbs (members and translations)".format(when))
+ 
          for vn_class in VerbNetClass.objects.all():
              print(vn_class.name)
              vn_class.update_members_and_translations()
  
+         when = strftime("%d/%m/%Y %H:%M:%S", gmtime())
+         verb_logger.info("{}: Ended full update of verbs (members and translations)".format(when))
  
Include time of update start/end
## Code Before:


from django.core.management.base import BaseCommand

from syntacticframes.models import VerbNetClass

class Command(BaseCommand):
    def handle(self, *args, **options):
        for vn_class in VerbNetClass.objects.all():
            print(vn_class.name)
            vn_class.update_members_and_translations()


## Instruction:
Include time of update start/end
## Code After:

from time import gmtime, strftime

from django.core.management.base import BaseCommand

from syntacticframes.models import VerbNetClass

class Command(BaseCommand):
    def handle(self, *args, **options):

        when = strftime("%d/%m/%Y %H:%M:%S", gmtime())
        verb_logger.info("{}: Start full update of verbs (members and translations)".format(when))

        for vn_class in VerbNetClass.objects.all():
            print(vn_class.name)
            vn_class.update_members_and_translations()

        when = strftime("%d/%m/%Y %H:%M:%S", gmtime())
        verb_logger.info("{}: Ended full update of verbs (members and translations)".format(when))
