- Clone o repositório.
- Crie um virtualenv com Python 3.6
- Ative o virtualenv.
- Instale as dependências.
- Configure a instância com o .env
- Execute os 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
#!/bin/bash | |
if [ $1 ] | |
then | |
project_name=$1 | |
echo "" | |
echo -e "\e[32m###############################################################################################\e[0m" | |
echo -e "\e[32m# CRIANDO DIRETÓRIO ###########################################################################\e[0m" | |
echo -e "\e[32m###############################################################################################\e[0m" |
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
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# C extensions | |
*.so | |
# Distribution / packaging | |
.Python |
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
Django | |
dj-database-url | |
dj-static | |
python-decouple | |
static3 | |
gunicorn | |
psycopg2 | |
psycopg2-binary | |
pytz |
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
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# C extensions | |
*.so | |
# Distribution / packaging | |
.Python |
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
DEFAULT_FILE_STORAGE=yourproject.storage.MediaStorage | |
STATICFILES_STORAGE=yourproject.storage.StaticStorage | |
STATIC_AWS_BUCKET=yourproject-static | |
MEDIA_AWS_BUCKET=yourproject-media | |
AWS_ACCESS_KEY_ID=your-access-key | |
AWS_SECRET_ACCESS_KEY=your-secret-access-key |
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 datetime import datetime | |
from dateutil.relativedelta import relativedelta | |
now = datetime.now() | |
first_day = now + relativedelta(day=1) | |
last_day = now + relativedelta(day=1, months=+1, days=-1) |
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
DEBUG=True | |
SECRET_KEY=THIS_IS_NOT_A_GOOD_SECRET | |
ALLOWED_HOSTS=127.0.0.1, .localhost, .herokuapp.com |
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 decouple import Csv | |
from decouple import config | |
from django.urls import reverse_lazy | |
from dj_database_url import parse as dburl | |
SECRET_KEY = config('SECRET_KEY') | |
DEBUG = config('DEBUG', default=False, cast=bool) | |
ALLOWED_HOSTS = config('ALLOWED_HOSTS', default=[], cast=Csv()) | |
default_dburl = 'sqlite:///' + os.path.join(BASE_DIR, 'db.sqlite3') |
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
import os | |
from dj_static import Cling | |
from django.core.wsgi import get_wsgi_application | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "<path-to-project>.settings") | |
application = Cling(get_wsgi_application()) |
NewerOlder