page profiles.html
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<title>ConnectedIn</title>
</head>
<body>
<h1>Detalhe Perfil</h1>
</body>
</html>
urls.py
from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns ('',
url(r'^$', 'perfis.views.index'),
url(r'^perfis/\d+$', 'perfis.views.exibir')
)
views.py
from django.shortcuts import render
def index(request):
return render(request, 'index.html')
def exibir(request):
return render(request, 'perfil.html')
Give this error to the page
P
age not found (404)
Request Method: GET
Request URL: http://localhost:8000/perfil
Using the URLconf defined in connectedin.urls, Django tried these URL patterns, in this order:
^admin/
^$
The current URL, perfil, didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.