Skip to content

Commit

Permalink
Define locais de templates e arquivos estáticos nas configurações
Browse files Browse the repository at this point in the history
  • Loading branch information
brnocesar committed Nov 7, 2020
1 parent 19845aa commit e5ee498
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion djangoreceitas/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"""

from pathlib import Path
import os.path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
Expand Down Expand Up @@ -55,7 +56,7 @@
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [os.path.join(BASE_DIR, 'apps/receitas/templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
Expand Down Expand Up @@ -118,4 +119,8 @@
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.1/howto/static-files/

STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'djangoreceitas/static')
]

0 comments on commit e5ee498

Please sign in to comment.