1
I was studying python and Django, and I decided to make my wedding website in January. The project runs perfectly on my local pc, the problem is when I deploy on digital Ocean and it gives that error here.
The admin works fine. The problem is the main page or any other page I try to access from my site.
My main urls.py:
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [ url(r'^admin/', admin.site.urls),
url(r'', include('casamento.urls'))] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Wedding app urls.py:
from django.conf.urls import include, url
from . import views
urlpatterns = [
url(r'^$', views.tela_inicial),
url(r'^local', views.local_casamento),
url(r'^listapresentes', views.listapresentes),
url(r'^presenca', views.presenca),
]
I’ve looked for this error on google and none of the solutions worked :(
Are you using Nginx? And what command line do you use to start your app, e.g..:
./manage.py runserver 0.0.0.0:8000
– Tulio F.
I managed to solve the problem. It was the version of Django. It was using version 1.10 that comes as standard Pip install Django. installed version 1.9 and it worked. Thank you so much for the help.
– Filipe Assad
I recommend you post an answer to your own question in order to help other people who might encounter the same problem. You can do this when you have 15 or more reputation points.
– Tulio F.