This file contains 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
""" | |
Middleware for logging requests and responses | |
""" | |
import json | |
import time | |
import uuid | |
from collections.abc import Callable | |
from fastapi import Request, Response | |
from rich.console import Console |
This file contains 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
# For more information, please refer to https://aka.ms/vscode-docker-python | |
FROM python:3.9 | |
EXPOSE 8000 | |
ENV SECRET_KEY=!u^8mqq_pm%jttx@-w+%q9bk9%iij3hw2(+$w13i*ptn#3lm+= | |
ENV DB_ENGINE=django.db.backends.postgresql_psycopg2 | |
ENV DB_NAME=iteea_db | |
ENV DB_USER=postgres | |
ENV DB_PASSWORD=123 |
This file contains 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
version: '3.4' | |
services: | |
database: | |
image: postgres:14.3 | |
restart: always | |
volumes: | |
- iteea-db:/var/lib/postgresql/data | |
environment: | |
- LC_ALL=C.UTF-8 |
This file contains 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
<script setup lang="ts"> | |
import { onMounted, Ref, ref } from "vue"; | |
const nome = ref(""); | |
const sobrenome: Ref<string> = ref("carvalho carneiro"); | |
const idade = ref(25); | |
const props = defineProps<{ | |
foo: string; | |
bar?: number; |
This file contains 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
"""Esse manager é responsável por gerar os arquivos padrões de um projeto Django (templates, urls, views, forms) | |
baseado nas informações contidas na classe da App do projeto Django. | |
""" | |
import fileinput | |
import os | |
from pathlib import Path | |
from bs4 import BeautifulSoup | |
from core.management.commands.utils import Utils |
This file contains 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 'package:flutter/cupertino.dart'; | |
/// [Travar o arquivo] | |
/// Caso deseje \"travar\" o arquivo para não ser parseado novamente | |
/// pelo manage do Django adicione um # antes da palavra abaixo | |
/// #FileLocked | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/scheduler.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; |
This file contains 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
def test_orgao_list_queryset(self, init, client): | |
username = "user1" | |
password = "bar" | |
user = User.objects.create_user(username=username, password=password) | |
# Use this: | |
client.force_login(user) | |
# Or this: | |
client.login(username=username, password=password) | |
request = self.factory.get(reverse('orgao:orgao-list')) | |
request.user = user |
This file contains 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
Widget _buildPDFGrid(List<LaudoExameModel> pdf) { | |
return ListView.builder( | |
shrinkWrap: true, | |
// physics: NeverScrollableScrollPhysics(), | |
primary: false, | |
itemCount: pdf.length, | |
itemBuilder: (BuildContext context, int index) { | |
final _pdf = pdf[index]; | |
return Container( | |
height: 160, |
This file contains 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
Widget _buildImagesGrid(List<LaudoExameModel> imagens) { | |
return GridView.count( | |
crossAxisCount: 2, | |
shrinkWrap: true, | |
crossAxisSpacing: 2.0, | |
// mainAxisSpacing: 4.0, | |
children: List.generate(imagens.length, (index) { | |
final imagemResultado = imagens[index]; | |
return Card( | |
color: Colors.white, |
This file contains 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
return SingleChildScrollView( | |
child: Container( | |
margin: const EdgeInsets.only(top: 115, bottom: 15), | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.start, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Text("Imagens"), | |
_buildImagesGrid(laudosImagensExameList), | |
Text("PDF's"), |
NewerOlder