Reputation: 5452
I change my computer and I migrated my django project just by copying the directory created by django-admin create project
from the old computer to the new one. I installed all required modules in the new computer (including django) under a new Python virtual environment, and everything worked perfectly, but the admin site of the project, that shows in plain html with no styling at all.
I don't know how to fix it
Upvotes: 1
Views: 849
Reputation: 5800
This happened to me when I transferred the project to the production server for the first time. I don't know if you are using runserver
or is your new computer hosting the project with Apache or Nginx. If it is the latter try the following command on the project root directory.
python manage.py collectstatic
Beware that you also need to specify the STATIC_ROOT
and STATICFILES_DIRS
in the settings.py
file in order for the above command to work.
Refer to the django docs in order to learn more about working with static files in Django.
Upvotes: 4