0

i am using default django admin panel,I have just moved my django site on my live server, and found the admin panel has no styling with it,but in my local server,everything is fine.In mention i am using nginx.To fix this problem, i have just check the path /usr/local/lib/python2.7/site-packages/django/contrib/ and found that there is no /django/contrib/ directory in my virtual environment.There is no /django/contrib/ file in my virtual environment.is that the reason of missing django admin panel interface?

Md. Tanvir Raihan
  • 4,075
  • 9
  • 37
  • 70
  • possible duplicate of [Trying to serve django static files on development server - not found](http://stackoverflow.com/questions/12026010/trying-to-serve-django-static-files-on-development-server-not-found) – Maxime Lorant Jun 05 '14 at 10:06
  • You need to collectstatic in your live environment, have you setup your static folders and placed the appropriate declarations in your nginx? If yes then just run: `./manage.py collectstatic` – petkostas Jun 05 '14 at 10:07
  • can you please leave this comment as an answer,if it works fine,i will accept it @petkostas – Md. Tanvir Raihan Jun 05 '14 at 10:12

1 Answers1

1

You need to collectstatic in your live environment, have you setup your static folders and placed the appropriate declarations in your nginx? If yes then just run:

./manage.py collectstatic

petkostas
  • 7,250
  • 3
  • 26
  • 29
  • still admin interface is missing,The interface of my main site is fine,but only the admin panel not getting the style.I have do all the things according to your answer,but the problem hasn't solve. – Md. Tanvir Raihan Jun 05 '14 at 10:43
  • Did you install the packages after moving from dev to live? are you using a virtual env (you should)? In your dev machine: `pip freeze > requirements.txt` then copy that file to the live server, and within your virtualenv: `pip install -r requirements.txt` – petkostas Jun 05 '14 at 11:21
  • actually i found the solution,in my directory,an extra folder namely 'admin' has copied accidentally,this admin folder carries the css of the admin panel,which actually overriding my main admin panels css. – Md. Tanvir Raihan Jun 05 '14 at 11:33