0

I'm using Django 3.1.7 on a MacBook Pro after transferring the Django project off of a Windows 10 machine. However, upon re-setting up the database and superuser and running the command pipenv sync to install all necessary modules, the server does run; but it doesn't serve any of my URLs or the CSS styles for the Admin page. I can reach the admin page at '/admin' but no other page that I've set up will display. All it gives me is my custom 404 page whenever I try to serve a page. Is there any way to fix this? Is something wrong? Where are the Admin CSS files?

Peter Nielsen
  • 251
  • 4
  • 17

3 Answers3

1
python manage.py  runserver --insecure

Use the --insecure option to force serving of static files with the staticfiles app even if the DEBUG setting is False. djangoproject

Wertartem
  • 237
  • 2
  • 5
0

I think we'd need more information... maybe the files itself.

There could be tons of things that could go wrong. Is your settings.py still pointing to the correct file paths? In views.py, did you make sure you are setting the html files in the same path? Are the html files in the right folder? Are all the Django and module versions the same? There's too much to name.

stelity
  • 33
  • 8
0

I have the same problem. By what you are describing it happens because your file path uses either / or
One machine uses forward slash and the other backwards slash

I dont know to so use a method that work on both