Django ignoring changes made to URLS.py file - Amazon AWS

妖精的绣舞 提交于 2019-12-04 04:26:40

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!