mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-13 00:14:52 +03:00
Customise MEDIA_URL setting instead of using fixture
This commit is contained in:
parent
f3909e6e80
commit
5e11a8f1fd
|
@ -29,6 +29,11 @@ EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend"
|
|||
# ------------------------------------------------------------------------------
|
||||
TEMPLATES[0]["OPTIONS"]["debug"] = True # type: ignore # noqa: F405
|
||||
|
||||
# MEDIA
|
||||
# ------------------------------------------------------------------------------
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#media-url
|
||||
MEDIA_URL = 'http://media.testserver'
|
||||
|
||||
{%- if cookiecutter.frontend_pipeline == 'Webpack' %}
|
||||
# django-webpack-loader
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -9,11 +9,6 @@ def media_storage(settings, tmpdir):
|
|||
settings.MEDIA_ROOT = tmpdir.strpath
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def media_url(settings):
|
||||
settings.MEDIA_URL = 'http://testserver'
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def user(db) -> User:
|
||||
return UserFactory()
|
||||
|
|
Loading…
Reference in New Issue
Block a user