creativetimofficial / argon-dashboard-django

Argon Dashboard - Django Template | Creative-Tim
https://www.creative-tim.com/product/argon-dashboard-django
MIT License
178 stars 443 forks source link

Regex problem #7

Closed damonlemke closed 6 months ago

damonlemke commented 6 months ago

Under apps/home/urls.py the line re_path(r'^.*\.*', views.pages, name='pages'),

doesn't only match any html file as the comment says, rather it matches any file at all. This causes a problem if you try and serve media files in the development server. Any image will be matched by this regex and the view will return a 404 because it can't find a template with the same name.

Changing the regex from ^.*\.* to ^.*\.*html$ fixes the issue entirely, as that expression will only match .html files