Boa tarde,
Depois de executar todo passo-passo do vídeo e revisar, estou com o problema abaixo quando tento acessar http://localhost:8000/registrar/
Abaixo o erro e todos os arquivos que foram criados nesse vídeo. Erro TemplateDoesNotExist at /registrar/ registrar.html Request Method: GET Request URL: http://localhost:8000/registrar/ Django Version: 1.7.4 Exception Type: TemplateDoesNotExist Exception Value:registrar.html Exception Location: C:\Python27\lib\site-packages\django\template\loader.py in find_template, line 136 Python Executable: C:\Python27\python.exe Python Version: 2.7.13 Python Path:['C:\Users\David Silva\connectedin', 'C:\Windows\SYSTEM32\python27.zip', 'C:\Python27\DLLs', 'C:\Python27\lib', 'C:\Python27\lib\plat-win', 'C:\Python27\lib\lib-tk', 'C:\Python27', 'C:\Python27\lib\site-packages'
connectedin\usuarios\template base_usuario.html
{% load staticfiles %}
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>ConnectedIn</title>
<link href="{% static "styles/bootstrap.css" %}" rel="stylesheet">
<link href="{% static "styles/signin.css" %}" rel="stylesheet">
</head>
<body>
<div class="container">
{% block body %}
{% endblock %}
</div>
</body>
</html>
connectedin\usuarios\template registrar.html
<% extends "base_usuario.html" %}
{% block body %}
<form class="form-signin" action="{% url 'registrar' %}" method="post">
{% csrf_token %}
<h2 class="form-signin-heading">Crie seu usuário</h2>
<input id="id_email" name="email" type="text" class="form-control" placeholder="Email *" required>
<input id="id_nome" name="nome" type="text" class="form-control" placeholder="Nome *" required>
<input id="id_senha" name="senha" type="password" class="form-control" placeholder="Senha *" required>
<input id="id_telefone" name="telefone" type="text" class="form-control" placeholder="Telefone *">
<input id="id_nome_empresa" name="nome_empresa" type="text" class="form-control" placeholder="Empresa *">
<hr/>
<button class="btn brn-lg btn-primary btn-block" type="submit">Registrar</button>
</form>
{% endblock %}
connectedin\usuarios urls.py
from django.conf.urls import patterns, url
from views import RegistrarUsuarioView
urlpatterns = patterns('',
url(r'^registrar/$', RegistrarUsuarioView.as_view(), name="registrar"),
)
connectedin\usuarios views.py
from django.shortcuts import render
from django.views.generic.base import View
class RegistrarUsuarioView(View):
template_name = 'registrar.html'
def get(self, request):
return render(request, self.template_name)
def post(self, request):
return render(request, self.template_name)
``
connectedin\connectedin
urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin
urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^', include('perfis.urls')), url(r'^', include('usuarios.urls')) )
connectedin\connectedin
settings.py
INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'perfis', 'usuarios' ) ```