Problem with urls and views inside the server

Asked

Viewed 69 times

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.

inserir a descrição da imagem aqui

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

  • 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.

  • 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.

1 answer

0


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.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.