diff --git a/db.sqlite3 b/db.sqlite3
index 7f81c06..6606a28 100644
Binary files a/db.sqlite3 and b/db.sqlite3 differ
diff --git a/filme/templates/criarconta.html b/filme/templates/criarconta.html
new file mode 100644
index 0000000..02f49a2
--- /dev/null
+++ b/filme/templates/criarconta.html
@@ -0,0 +1,17 @@
+{% extends 'base.html' %}
+
+{% block title %}
+ Criar Conta
+{% endblock %}
+
+{% block head %}
+{% load static %}
+
+{% endblock %}
+
+{% block content %}
+
+
Criar Conta
+
+
+{% endblock %}
diff --git a/filme/templates/editarperfil.html b/filme/templates/editarperfil.html
new file mode 100644
index 0000000..b0e6230
--- /dev/null
+++ b/filme/templates/editarperfil.html
@@ -0,0 +1,17 @@
+{% extends 'base.html' %}
+
+{% block title %}
+ Edição de Perfil
+{% endblock %}
+
+{% block head %}
+{% load static %}
+
+{% endblock %}
+
+{% block content %}
+
+
Edição do Perfil
+
+
+{% endblock %}
diff --git a/filme/templates/logout.html b/filme/templates/logout.html
index 5f28d06..04259c3 100644
--- a/filme/templates/logout.html
+++ b/filme/templates/logout.html
@@ -11,6 +11,24 @@
{% block content %}
-
Logout
+
+
{% endblock %}
diff --git a/filme/urls.py b/filme/urls.py
index fb5c5a2..2428485 100644
--- a/filme/urls.py
+++ b/filme/urls.py
@@ -1,5 +1,5 @@
from django.urls import path, include
-from .views import Homepage, HomeFilmes, DetalhesFilme, PesquisaFilme
+from .views import Homepage, HomeFilmes, DetalhesFilme, PesquisaFilme, EditarPerfil, CriarConta
from django.contrib.auth import views as auth_view
@@ -10,9 +10,11 @@
path('', Homepage.as_view(), name='homepage'),
path('filmes/', HomeFilmes.as_view(), name='homefilmes'),
path('filmes/', DetalhesFilme.as_view(), name='detalhesfilme'),
- path('pesquisa', PesquisaFilme.as_view(), name='pesquisafilme'),
- path('login', auth_view.LoginView.as_view(
+ path('pesquisa/', PesquisaFilme.as_view(), name='pesquisafilme'),
+ path('login/', auth_view.LoginView.as_view(
template_name='login.html'), name='login'),
- path('logout', auth_view.LogoutView.as_view(
+ path('logout/', auth_view.LogoutView.as_view(
template_name='logout.html'), name='logout'),
+ path('editarperfil/', EditarPerfil.as_view(), name='editarperfil'),
+ path('criarconta/', CriarConta.as_view(), name='criarconta'),
]
diff --git a/filme/views.py b/filme/views.py
index a2afddf..d9302db 100644
--- a/filme/views.py
+++ b/filme/views.py
@@ -1,4 +1,4 @@
-from django.shortcuts import render
+from django.shortcuts import render, redirect
from .models import Filme
from django.views.generic import TemplateView, ListView, DetailView
from django.contrib.auth.mixins import LoginRequiredMixin
@@ -9,6 +9,14 @@
class Homepage(TemplateView):
template_name = 'homepage.html'
+ def get(self, request, *args, **kwargs):
+ if request.user.is_authenticated:
+ # Redireciona para o app_name filme url name homefilmes
+ return redirect('filme:homefilmes')
+ else:
+ # Redireciona para a url final da view neste caso a homepage
+ return super().get(request, *args, **kwargs)
+
class HomeFilmes(LoginRequiredMixin, ListView):
template_name = "homefilmes.html"
@@ -55,12 +63,10 @@ def get_queryset(self):
else:
return None
-# def homepage(request):
-# return render(request, "homepage.html")
-#url - view - template
-# def homefilmes(request):
-# context = {}
-# lista_filmes = Filme.objects.all() # pega todos os objetos do banco de dados
-# context['lista_filmes'] = lista_filmes
-# return render(request, "homefilmes.html", context)
+class EditarPerfil(LoginRequiredMixin, TemplateView):
+ template_name = 'editarperfil.html'
+
+
+class CriarConta(TemplateView):
+ template_name = 'criarconta.html'
diff --git a/static/css/style_criarconta.css b/static/css/style_criarconta.css
new file mode 100644
index 0000000..fc54b21
--- /dev/null
+++ b/static/css/style_criarconta.css
@@ -0,0 +1,3 @@
+.content {
+ padding-top: 4.68rem;
+}
diff --git a/static/css/style_editarperfil.css b/static/css/style_editarperfil.css
new file mode 100644
index 0000000..837af4f
--- /dev/null
+++ b/static/css/style_editarperfil.css
@@ -0,0 +1,4 @@
+.content{
+ padding-top: 4.68rem;
+ min-height: 100vh;
+}
diff --git a/static/css/style_logout.css b/static/css/style_logout.css
index e69de29..8fe76b9 100644
--- a/static/css/style_logout.css
+++ b/static/css/style_logout.css
@@ -0,0 +1,50 @@
+
+.header {
+ min-height: 100vh;
+ position: relative; /* Adicione uma posição relativa para que possamos posicionar o pseudo-elemento */
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+
+.header::before {
+ content: "";
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-image: url("../images/background_netflix.jpg");
+ background-repeat: no-repeat;
+ background-blend-mode: overlay;
+ background-size: cover; /* Ajuste para cobrir todo o cabeçalho */
+ background-color: rgb(0, 0, 0, 0.7);
+ opacity: 0.7; /* Opacidade para a imagem de fundo */
+ z-index: -1; /* Coloque o pseudo-elemento atrás do conteúdo */
+}
+
+.title-header {
+ color: rgb(255, 255, 255);
+ font: 2rem bold;
+ padding: 0.8rem;
+}
+
+.paragraph {
+ padding: 0.8rem;
+ font: 1.2rem bold;
+}
+
+.group-btn {
+ display: flex;
+ flex-direction: row;
+ gap: 0.3rem;
+ justify-content: center;
+ align-items: center;
+ flex-wrap: wrap;
+}
+
+.btn-access {
+ background-color: rgb(255, 0, 0);
+ padding: 0.55rem;
+}
diff --git a/templates/navbar.html b/templates/navbar.html
index d273a35..8c696b6 100644
--- a/templates/navbar.html
+++ b/templates/navbar.html
@@ -5,16 +5,28 @@
+
+ {% if user.is_authenticated %}
+ {% endif %}
+ {% if user.is_authenticated %}
+ {% else %}
+
+ {% endif %}
+ {% if user.is_authenticated %}
+ {% endif %}
+