Skip to content

Commit

Permalink
Incluido Middleware de login obritório para URLS
Browse files Browse the repository at this point in the history
close #42
  • Loading branch information
renzo authored and renzon committed Oct 2, 2024
1 parent 82cd996 commit baaa2a8
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 38 deletions.
2 changes: 2 additions & 0 deletions backend/devpro/base/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from django.contrib.auth.decorators import login_not_required
from django.shortcuts import render


# Create your views here.

@login_not_required
def home(request):
return render(request, 'base/home.html')
1 change: 1 addition & 0 deletions backend/devpro/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.LoginRequiredMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
Expand Down
74 changes: 37 additions & 37 deletions backend/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package-mode=false

[tool.poetry.dependencies]
python = "^3.12"
django = ">4"
django = ">5.1"
psycopg2 = "^2.9.9"
dj-database-url = "^2.2.0"
python-decouple = "^3.8"
Expand Down

0 comments on commit baaa2a8

Please sign in to comment.