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
print('hello') |
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
from django.contrib import admin | |
from .models import Perfil | |
from django.contrib.auth.models import User | |
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin | |
# Register your models here. | |
class PerfilInline(admin.StackedInline): | |
model = Perfil | |
can_delete = False | |
verbose_name_plural = 'perfil' |
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
<!DOCTYPE html> | |
<html lang="pt-BR"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Grid Layout - Parte 1</title> | |
</head> | |
<body> | |
<div class="grid"> | |
<div class="grid-item">1</div> | |
<div class="grid-item">2</div> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Index</title> | |
<style> | |
html[dark]{ |
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
# The definitive guide to setup my Python workspace | |
# Author: Henrique Bastos <henrique@bastos.net> | |
PY3=3.8.0 | |
PY2=2.7.16 | |
PY3TOOLS="youtube-dl s3cmd fabric pytest" | |
PY2TOOLS="rename mercurial" | |
VENVS=~/.ve | |
PROJS=~/workspace |
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 datetime | |
import uuid | |
from decimal import Decimal | |
from rest_framework import generics | |
from rest_framework.response import Response | |
def fake_some_model_data() -> dict: | |
return { |
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
from pathlib import Path | |
from django.core.management.utils import get_random_secret_key | |
BASE_DIR = Path(__file__).resolve().parent.parent | |
ENV_VARIABLES = f"""SECRET_KEY={get_random_secret_key()} | |
DEBUG=True | |
ALLOWED_HOSTS=* | |
""" |