Django not serving static file because of i18n prefix in url
I wanted to have i18n internationalization on my project and whenever I need to serve some static file/image, I kept on getting this error. Does anyone know how to fix the url prefix so it know where to redirect?
[08/Dec/2021 14:11:09] "GET /admin-interface/logo/photo_2021-12-07_21-08-39_Gp96iY6.jpg HTTP/1.1" 302 0
Not Found: /en/admin-interface/logo/photo_2021-12-07_21-08-39_Gp96iY6.jpg
[08/Dec/2021 14:11:09] "GET /en/admin-interface/logo/photo_2021-12-07_21-08-39_Gp96iY6.jpg HTTP/1.1" 404 6917
This is what my urls.py looked like
from django.urls import path, include
from django.conf.urls.i18n import i18n_patterns
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('i18n/', include('django.conf.urls.i18n')),
]
urlpatterns += i18n_patterns(
path('', admin.site.urls),
)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)