Question

webapp is not serving static files

urls.pyin main app

vurlpatterns = [
 	path('', include('products.urls', namespace='mainapp')),
 	path('', include('checkout.urls', namespace='checkout')),
    path('admin/', admin.site.urls),
    #path('accounts/', include('allauth.urls')),
    path('', include('accounts.urls')),

]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

** settings.py**

STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
STATIC_ROOT = os.path.join(BASE_DIR, 'static')

i am getting file not found on my website 404 i am using cyberpanel with openlightspeed server

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer