Desktop Options > Ação da tecla Super > Áreas de Trabalho
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
| # api.py - Exemplo genérico | |
| from http import HTTPStatus | |
| from django.shortcuts import get_object_or_404 | |
| from ninja import Router | |
| from .security import CombinedAuth, PermissionChecker | |
| from .schemas import ItemCreateSchema, ItemSchema, ItemUpdateSchema | |
| from .models import Item |
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
| for i in $(seq 1 100); | |
| do | |
| echo $i | |
| done |
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
| #!/bin/bash | |
| # Script rápido para Linux. No Windows siga o passo a passo do README. | |
| # Repo completo no Github: https://github.com/rg3915/copier-django-template | |
| # Salva o diretório atual em uma variável | |
| CURRENT_FOLDER=$(pwd) | |
| # echo "Diretório inicial: $CURRENT_FOLDER" | |
| # Cria a pasta /tmp/boilerplate se não existir |
A command-line tool for quickly generating Django applications with models, schemas, APIs, and admin interfaces using Django Ninja.
Ninja Scaffold is a CLI utility that automates the creation of Django app components following best practices. It generates a complete structure for your Django models, including Ninja API endpoints, schema definitions, and admin interfaces.
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 random | |
| import csv | |
| from pprint import pprint | |
| def csv_to_list(filename: str) -> list: | |
| ''' | |
| Lê um csv e retorna um OrderedDict. | |
| ''' | |
| with open(filename) as csv_file: |
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
| const getItems = () => ({ | |
| items: [], | |
| offset: 0, | |
| limit: 10, | |
| loading: false, | |
| hasMore: true, | |
| init() { | |
| this.loadItems(); | |
| }, |
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
| """ | |
| Este script gera uma estrutura básica de API Django com os seguintes arquivos: | |
| 1. urls.py: Arquivo principal de configuração de URLs do Django, que inclui: | |
| - Rota para a aplicação core | |
| - Rota para a API v1 | |
| - Rota para o painel admin | |
| - Configuração de arquivos estáticos | |
| 2. api.py: Arquivo de configuração da API usando Django Ninja, que: |
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
| <!DOCTYPE html> | |
| <html lang="pt-BR"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <link rel="icon" href="https://picocss.com/favicon.svg" type="image/svg+xml"> | |
| <title>Form Wizard - Máquina de Estado</title> |
NewerOlder