Skip to content

Instantly share code, notes, and snippets.

View gabrielloliveira's full-sized avatar
💻
Resolvendo problemas.

Gabriell Oliveira gabrielloliveira

💻
Resolvendo problemas.
View GitHub Profile
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=*
"""
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 {
@gabrielloliveira
gabrielloliveira / python-guide.sh
Created March 28, 2021 17:50 — forked from henriquebastos/python-guide.sh
The definitive guide to setup my Python workspace
# 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
@gabrielloliveira
gabrielloliveira / index.html
Last active May 21, 2022 01:58
Modo dark utilizando JavaScript puro
<!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]{
@gabrielloliveira
gabrielloliveira / base.html
Created December 9, 2017 23:57
Aprenda Grid - Parte 1 - Oh My Code
<!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>
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'
print('hello')