Skip to content

Commit

Permalink
media env화
Browse files Browse the repository at this point in the history
  • Loading branch information
enoch2110 committed Jul 16, 2023
1 parent 22c695e commit c39d978
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SECRET_KEY=secret
ALLOWED_HOSTS=*

# DATABASE
# Format: http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
# Format: https://django-environ.readthedocs.io/en/latest/types.html#environ-env-db-url
DATABASE_URL=postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]

# EMAIL
Expand All @@ -19,5 +19,5 @@ [email protected]
# CACHE
CACHE_URL=rediscache://127.0.0.1:6379/1?client_class=django_redis.client.DefaultClient&password=ungithubbed-secret

# URL PREFIX
URL_PREFIX=
# FILES
MEDIA_ROOT=/path/to/media
14 changes: 4 additions & 10 deletions project_name/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,9 @@
'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'
),
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
{'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator'},
{'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator'},
{'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator'},
]

AUTH_USER_MODEL = 'account.User'
Expand Down Expand Up @@ -128,7 +122,7 @@

MEDIA_URL = '/media/'

MEDIA_ROOT = BASE_DIR / 'resources/media'
MEDIA_ROOT = env('MEDIA_ROOT')


# Default primary key field type
Expand Down

0 comments on commit c39d978

Please sign in to comment.