Hi need a solution

23 views
Skip to first unread message

Mh Raffi

unread,
Nov 7, 2022, 11:08:20 AM11/7/22
to django...@googlegroups.com


I have deployed to post g res p g admin4 and deleted db. s q lite from Django. and set my allowed host =['*']

Am getting server [500].

if any help will be appreciated

need a solution after deleting s q .lite d b from Django project and used allowed host to * .

am getting 500 server request. LOOKING FOR SOLUTION AM NEW TO DJANGO

DEBUG = False ALLOWED_HOSTS = ['*']

DATABASES = { 'default': {

    'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'accerla',
    'USER' : 'post g res',
    'PASSWORD': 'pwd3',
    'HOST' : 'localhost',
    'PORT' : '5432',
}

}

[07/Nov/2022 05:14:06] INFO [django.utils.autoreload:677] Watching for file changes with StatReloader
[07/Nov/2022 05:14:06] DEBUG [django.utils.autoreload:330] Waiting for apps ready_event.
[07/Nov/2022 05:14:06] DEBUG [django.utils.autoreload:342] Apps ready_event triggered. Sending autoreload_started signal.
[07/Nov/2022 05:14:06] DEBUG [django.utils.autoreload:296] Watching dir C:\Users\Admin\Desktop\webappstudioz\templates with glob **/*.
any suggestion would be appreciated

Thanks & Regards
Mohammed Raffi.J


kateregga julius

unread,
Nov 7, 2022, 11:29:26 AM11/7/22
to django...@googlegroups.com
First check the spelling of your user.

If it fails take a screenshot of what is played in your console.
It will help in getting for your a clear response 

--
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 django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKfPRhUJhovCY8D3pNAzR6hHZWCR35FUGWyt7vE7WNXMTPzn%3Dw%40mail.gmail.com.

Kasper Laudrup

unread,
Nov 7, 2022, 12:46:07 PM11/7/22
to django...@googlegroups.com
On 07/11/2022 08.20, Mh Raffi wrote:
>
> I have deployed to post g res p g admin4 and deleted db. s q lite from
> Django. and set my allowed host =['*']
>
> Am getting server [500].
>
> if any help will be appreciated
>

You need to look in your log files to find the cause of the 500 error.
That will make it much, much easier to debug.

Maybe have a look here:
https://docs.djangoproject.com/en/4.1/topics/logging/

Kind regards,
Kasper Laudrup
OpenPGP_0xE5D9CAC64AAA55EB.asc
OpenPGP_signature

sham khan

unread,
Nov 7, 2022, 1:26:57 PM11/7/22
to django...@googlegroups.com
Check the logs I am certain it will talk about DB. do a migrate first. Once you delete the DB, the db is not created automatically 

James

unread,
Nov 7, 2022, 2:18:51 PM11/7/22
to Django users
You can't just swap out a database without doing a migration (with few exceptions). There are management commands to makemigration and migrate. Don't worry it's really easy and you'll get it!

https://docs.djangoproject.com/en/4.1/topics/migrations/

Mh Raffi

unread,
Nov 8, 2022, 10:58:53 AM11/8/22
to django...@googlegroups.com
Hi Thanks for the reply.
Found the solution yesterday, as the issue was caused due to 
# STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"

Only thing causing a problem now is the collectstatic is collecting the static files and its in DIR c:\\user.
All my images and png files are not working after switching to postgres database.
Any solution will be appreciated.
Thanks & Regards
Mohammed Raffi.J

--
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 django-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages