K
K
kieko2021-07-30 18:28:41
Django
kieko, 2021-07-30 18:28:41

Url to path Django?

url(
        r"^media/(?P<path>.*)$",
        serve,
        {
            "document_root": MEDIA_ROOT,
        },


how to write it downpath

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tarp20, 2021-07-30
@kieko

re_path(r'^media/(?P<path>.*)$', serve, {
            'document_root': settings.MEDIA_ROOT,
        }),

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question