问题
I just created an EC2 instance and created a Django app and am using Amazon servers. Normally when I make a change to my Djnago app, I updated it by doing
git add .
git commit -m "change"
git aws.push
I recently made changes to my URLS.py file and did the three steps above. I then went to my website and for some reason when I visit a URL, it gives a 404 not found error and says
Using the URLconf defined in myapp.urls, Django tried these URL patterns, in this order:
1. ^$
The current URL, register/, didn't match any of these.
However, my URLS.py does infact have
url(r'^$', mainPageView),
url(r'^login/$', login),
url(r'^logout/$', logoutView),
url(r'^register/$', registerView),
and many others. I even tried doing
eb update
just to see if that will updated the server but it does not. How come Django gives me a 404 error saying that the URL didn't match any of my URLS in my URLS.py file even though it does?
来源:https://stackoverflow.com/questions/25153129/django-ignoring-changes-made-to-urls-py-file-amazon-aws