Skip to content

Instantly share code, notes, and snippets.

View jonathanccardoso's full-sized avatar
🤙
living and learning!

Jonathan Cardoso jonathanccardoso

🤙
living and learning!
View GitHub Profile
@jonathanccardoso
jonathanccardoso / models.py
Created May 6, 2021 17:54
Django rest framework - Base64 image field, simple way!
from django.db import models
class User(models.Model):
name = models.CharField('Name', max_length=50)
avatar = models.ImageField(
'Avatar',
upload_to='profiles/',
null=True,
blank=True

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/incubatech/.oh-my-zsh"
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<!-- Bootstrap CSS -->
<link
from django.shortcuts import render
import re
import requests, json, locale
from bs4 import BeautifulSoup
def index(request):
cities = [
{'state': 'rn', 'name': 'natal'},