Exemple #1
0
    def handle(self, *args, **options):
        queryset = models.Currency.objects.no_cache().all()
        if not options['all']:
            queryset = queryset.order_by('last_update')[:options['num']]

        for currency in queryset:
            if options['verbosity']>1:
                self.stdout.write(u"updating %s\n"%currency.code)
            models.update_rate(currency)
Exemple #2
0
 def update_rate(self, request, queryset):
     for currency in queryset:
         models.update_rate(currency)
Exemple #3
0
 def update_rate(self, request, queryset):
     for currency in queryset:
         models.update_rate(currency)