- Modificado (modified);
- Preparado (staged/index)
- Consolidado (comitted);
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
{"lastUpload":"2020-06-25T18:51:04.997Z","extensionVersion":"v3.4.3"} |
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
""" | |
Exercício: | |
1 - Escreva um programa que recebe como entrada um username e retorna as seguintes informações: | |
website | |
hemisfério (norte ou sul) | |
A fonte de dados original é a seguinte API: | |
https://jsonplaceholder.typicode.com/users |
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
""" | |
Exercício: | |
1 - Escreva um programa que recebe como entrada um username e retorna as seguintes informações: | |
website | |
hemisfério (norte ou sul) | |
A fonte de dados original é a seguinte API: | |
https://jsonplaceholder.typicode.com/users |
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
""" | |
Problema. | |
Uma entrada de valores numéricos (uma lista deles) | |
3x -> Queijo | |
5x -> Goiabada | |
3x e 5x -> romeu e Julieta | |
Base dos testes: |
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
{ | |
"data":{ | |
"version":"v1", | |
"negotiation":{ | |
"batch_type":"crusher_run" | |
}, | |
"characteristics":{ | |
"species":"arabica", | |
"origin":155, |
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
# Generated by Django 2.0.5 on 2020-01-13 18:22 | |
from django.db import migrations | |
class Migration(migrations.Migration): | |
dependencies = [ | |
('schemas', '0021_add_packing_type_and_allow_negotiation'), | |
] |
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
# models.py | |
from django.db import models | |
class Country(models.Model): | |
id = models.AutoField(db_column='ID_COUNTRY', primary_key=True) | |
name = models.CharField(db_column='NAME', max_length=30) | |
initials = models.CharField(db_column='INITIALS', max_length=4, blank=True, null=True) | |
class Meta: |
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 django.db import models | |
class Country(models.Model): | |
id = models.AutoField(db_column='ID_COUNTRY', primary_key=True) | |
name = models.CharField(db_column='NAME', max_length=30) | |
initials = models.CharField(db_column='INITIALS', max_length=4, blank=True, null=True) | |
class Meta: | |
managed = False | |
db_table = 'COUNTRY' |
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
``` | |
views.py | |
from django.db.models import F | |
from rest_framework.exceptions import ValidationError | |
from rest_framework import viewsets | |
from rest_framework.response import Response | |
from rest_framework.status import HTTP_201_CREATED, HTTP_409_CONFLICT, HTTP_400_BAD_REQUEST | |
from .models import GlobalVariable, Variable, Unity, State |