Django admin misbehaves after adding for django.contrib.sites on server

109 Views Asked by At

Django Admin Site was working fine on local server. But the same thing when deployed on server. Admin CSS misbehaves See Screenshot Admin panel screenshot on server

admin panel site also working fine on mobile responsive view or small screens

On localhost it looks something like this.

I have ran collect static several times on server but nothing happens. Tried Clearing Cache many time. Nothing worked But localhost seems to work fine

1

There are 1 best solutions below

0
On BEST ANSWER

I find answer myself. Initially a old version of site already working on server. Then i added django.contrib.sites for django.contrib.sites

Upon adding that when update is pushed to server then

python manage.py collectstatic

command does not completely replace old files.And It doesn't work well with old files.

  • So run collectstatic command on local
  • upload generated folder to server to avoid any such issues