I had faced same problem but collectstatic worked for me,, On Sat, 5 Nov, 2022, 1:15 pm Nishant Sagar, <[email protected]> wrote:
> Hi Ashutosh, > > Yeah I tried that as well, still not working. > > On Sat, 5 Nov 2022 at 1:10 PM, Ashutosh Mishra < > [email protected]> wrote: > >> Did you tried, python manage.py collectstatic? >> >> On Sat, 5 Nov, 2022, 1:05 pm Nishant Sagar, <[email protected]> >> wrote: >> >>> Hi all, >>> >>> I deployed the django project to AWS ec2 instance using nginx and >>> gunicorn but the static file is not loading at all. >>> >>> Can someone suggest where did I do wrong? >>> >>> Note - I've not created Profile before deploying >>> >>> Here is my settings.py file >>> STATIC_URL = 'static/' >>> STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') >>> STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),) >>> >>> Project URl - http://54.242.38.208/ >>> Github- https://github.com/Nishant-Sagar/BaskinSolar >>> >>> Thank you for your help, >>> Nishant >>> >>> >>> >>> >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/CANNtL-K_ntgKNAYUd8DHe8wa4bGwHO5da%3DypJfAVN%3DJHj9uCmQ%40mail.gmail.com >>> <https://groups.google.com/d/msgid/django-users/CANNtL-K_ntgKNAYUd8DHe8wa4bGwHO5da%3DypJfAVN%3DJHj9uCmQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAGDmY64P1vrziiG_%3DX0pMb3YS%2BWv2BqZLLkix2gY%2B4cL3YRsEA%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAGDmY64P1vrziiG_%3DX0pMb3YS%2BWv2BqZLLkix2gY%2B4cL3YRsEA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CANNtL-J6HWZ%3DPk7iYx4nxk%2BYZ_9HXSMQY2kt-FiBa6fDQz2vrA%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CANNtL-J6HWZ%3DPk7iYx4nxk%2BYZ_9HXSMQY2kt-FiBa6fDQz2vrA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGDmY66usVHG3O7VOU%2B4b%3Dr6TrKRZVNe1RM5ZEOjBAciZs8biw%40mail.gmail.com.

