Django admin template css is not loaded when deployed on Vercel?
On deploying my project to vercel hosting platform everything works successfully but when i try to access my admin panel it shows only the content with no styles.
Admin
2022-04-09
This is occuring becuase your static files are not being served in production on vercel. check our How to deploy a django project with staticfiles on vercel and ensure to pay attention to the part about running collectstatic using the builds_sh file and also ensure that this code is present in your settings.py file.
STATICFILES_DIRS = os.path.join(BASE_DIR, 'static'),
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles_build', 'static')
Add Message
Click on the button below to add a new message to this thread
Tags
Thread detail
Satus: Open
Messages: 1Started: 2022-04-09Thread Create
Click the button below to start a new thread for your question
loading..
Privacy Policy
By using our website,
you agree that devmaesters can store cookies on your device and disclose information in accordance with our privacy policy.