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
TEMPLATES = [ | |
{ | |
... | |
'DIRS': [os.path.join(BASE_DIR, 'templates')], | |
... | |
}, | |
] | |
# Abaixo de STATIC_URL = '/static/' |
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
# Abaixo de import os | |
import sys | |
# Abaixo de BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
APPS_DIR = os.path.join(BASE_DIR, 'apps') | |
sys.path.insert(0, APPS_DIR) |
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
@startuml | |
skinparam roundcorner 10 | |
title Feedback App | |
package feedback.accounts { | |
class User #pink { | |
CharField first_name |
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
@startuml | |
skinparam roundcorner 10 | |
title Class Diagram - ToDo App | |
class User #pink { | |
first_name: CharField | |
last_name: CharField | |
username: CharField |
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 datefinder | |
minha_string_com_data = "Guido nasceu em 31/01/1956" | |
datas_encontradas = datefinder.find_dates(minha_string_com_data, source=True) | |
for data in datas_encontradas: | |
print(data) | |
(datetime.datetime(1956, 1, 31, 0, 0), '31/01/1956') |
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 datefinder | |
minha_string_com_data = "Guido nasceu em 31/01/1956" | |
datas_encontradas = datefinder.find_dates(minha_string_com_data) | |
for data in datas_encontradas: | |
print(data) | |
1956-01-31 00:00:00 |
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 re | |
minha_string_com_data = "Guido nasceu em 31/01/1956" | |
re.search(r'\d{2}/\d{2}/\d{4}', minha_string_com_data).group() | |
31/01/1956 |