fdemmer / django-weasyprint

A Django class-based view generating PDF resposes using WeasyPrint
Other
352 stars 53 forks source link

Permit undefined MEDIA_URL and STATIC_URL #34

Closed pauloxnet closed 4 years ago

pauloxnet commented 4 years ago

In django_url_fetcher permit to have undefined MEDIA_URL and STATIC_URL.

fdemmer commented 4 years ago

Can you describe the scenario, why you need this in more detail please?

Django sets MEDIA_URL='' and STATIC_URL=None by default in global_settings.py, so any project should have it.

Have you tried simply not using any URL starting with "file:"? In that case the code-path using MEDIA_URL and STATIC_URL is never used.

mmazzocchetti commented 4 years ago

When MEDIA_URL='' and STATIC_URL is defined, MEDIA_URL is always matched even for STATIC_URL prefixed urls.