-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #250 from unb-mds/Development
Development
- Loading branch information
Showing
46 changed files
with
1,768 additions
and
761 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
release: python forunb/manage.py migrate | ||
web: gunicorn --pythonpath=forunb forunb.wsgi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# ForUnB - Configuração do Projeto | ||
|
||
Esta pasta `forunb` contém os arquivos principais de configuração e gerenciamento do projeto **ForUnB**. Diferente dos apps tradicionais do Django, esta pasta não contém models, views ou templates, mas é essencial para o funcionamento geral do projeto. | ||
|
||
## Descrição dos Arquivos | ||
- **__init__.py:** Arquivo vazio que indica ao Python que este diretório deve ser tratado como um módulo. | ||
- **asgi.py:** Configuração para a interface ASGI (Asynchronous Server Gateway Interface), usada para servir o projeto em um ambiente assíncrono. | ||
- **settings/:** Diretório que contém os arquivos de configuração do projeto. | ||
- **base.py:** Contém as configurações básicas e comuns a todos os ambientes. | ||
- **production.py:** Configurações específicas para o ambiente de produção. | ||
- **urls.py:** Define os roteamentos principais do projeto, conectando URLs a views. | ||
- **wsgi.py:** Configuração para a interface WSGI (Web Server Gateway Interface), usada para servir o projeto em ambientes síncronos. | ||
|
||
## Licença | ||
Este projeto está licenciado sob os termos da licença MIT. | ||
|
||
Esse `README.md` oferece uma visão geral da função da pasta `forunb` no projeto Django 'ForUnB', explicando a finalidade dos principais arquivos de configuração. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
""" Module to manage environment variables and BASE_DIR. """ | ||
# my imports | ||
from pathlib import Path | ||
import environ | ||
|
||
env = environ.Env() | ||
|
||
# Build paths inside the project like this: BASE_DIR / 'subdir'. | ||
BASE_DIR = Path(__file__).resolve().parent.parent |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
""" Settings for local development. """ | ||
from forunb.env import env | ||
from .base import * | ||
from forunb.settings.base import * #pylint: disable=W0401, W0614 | ||
|
||
# SECURITY WARNING: don't run with debug turned on in production! | ||
DEBUG = env.bool('DJANGO_DEBUG', default=True) | ||
DEBUG = True | ||
|
||
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=['localhost', '0.0.0.0', '127.0.0.1']) | ||
ALLOWED_HOSTS = ['localhost', '0.0.0.0', '127.0.0.1'] | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': BASE_DIR / 'db.sqlite3', | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,27 @@ | ||
""" Settings for production development. """ | ||
from forunb.env import env | ||
import os | ||
import cloudinary | ||
import cloudinary.uploader | ||
import cloudinary.api | ||
from .base import * | ||
import dj_database_url | ||
|
||
|
||
# SECURITY WARNING: don't run with debug turned on in production! | ||
DEBUG = env.bool('DJANGO_DEBUG', default=False) | ||
DEBUG = False | ||
|
||
ALLOWED_HOSTS = ['.herokuapp.com', '.forunb.com'] | ||
|
||
DATABASES = { | ||
'default': dj_database_url.config( | ||
default=config('DATABASE_URL') | ||
) | ||
} | ||
|
||
CLOUDINARY_STORAGE = { | ||
'CLOUDINARY_URL': os.getenv('CLOUDINARY_URL'), | ||
} | ||
|
||
DEFAULT_FILE_STORAGE = 'cloudinary_storage.storage.MediaCloudinaryStorage' | ||
|
||
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=[]) # ainda estmos sem site | ||
MEDIA_URL = 'https://res.cloudinary.com/dmezdx5mc/image/upload/' |
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
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
Oops, something went wrong.