This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "foods": [ | |
| { | |
| "id": "1", | |
| "name": "Strogonoff", | |
| "total_ingredients": "4", | |
| "time": 40, | |
| "cover": "https://i.imgur.com/or7Phgi.jpeg", | |
| "video":"https://www.youtube.com/watch?v=y9yKuT1m9LI", | |
| "ingredients": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from usuarios.models import * | |
| from django.conf import settings | |
| from django.utils.encoding import smart_str | |
| from django.core.mail import EmailMessage | |
| destinatarios = ['cesar@brbid.com', 'luiz.fernando@brbid.com'] | |
| estado = 'BA' | |
| colunas = ['Nome', 'Telefone', 'e-mail'] | |
| arquivo = ";".join(colunas) | |
| usuarios = User.objects.filter( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import datetime | |
| from apreensao.models import Grv, PreRetirada | |
| from cobranca.models import QuantidadeDiariasHelper | |
| def valor_total_estoque(): | |
| grvs = Grv.objects.filter(retiradas__isnull=True) | |
| total = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import datetime | |
| import decimal | |
| from django.conf import settings | |
| from django.db.models import Sum, Q, F | |
| from django.utils.encoding import smart_str | |
| from django.core.mail import EmailMessage | |
| from apreensao.reports import Report | |
| from cobranca.models import Cobranca, Boleto, ContaBancaria |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| usuarios_internet = list(HistoricoFinanceiro.objects.filter(leilao__comissao__vendedor__nome='Patio Norte', content_type__model='userprofile').values_list('object_id', flat=True).distinct()) | |
| usuarios_presenciais = list(HistoricoFinanceiro.objects.filter(leilao__comissao__vendedor__nome='Patio Norte', content_type__model='cartelaprofile').values_list('object_id', flat=True).distinct()) | |
| a = CartelaProfile.objects.filter(id__in=usuarios_presenciais, tipo_pessoa__istartswith='j').distinct().count() | |
| b = UserProfile.objects.filter(id__in=usuarios_internet, tipo_pessoa__istartswith='j').distinct().count() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from novo_financeiro.models import * | |
| leilao = 'DIVSC09-18b' | |
| for nota in Nota.objects.filter(cache_dicionario__contains=leilao): | |
| dicionario = nota.dicionario_do_cache() | |
| dicionario['taxas'] = 0 | |
| nota.cache_dicionario = json.dumps(dicionario, cls=DjangoJSONEncoder) | |
| nota.save() |