Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logout error 405 using Jet, but logout normal without jet #525

Open
hapesurya opened this issue Feb 11, 2024 · 0 comments
Open

Logout error 405 using Jet, but logout normal without jet #525

hapesurya opened this issue Feb 11, 2024 · 0 comments

Comments

@hapesurya
Copy link

Hello, this is my first time using Jet in django. And I immediately tried it on a new project, fresh, without installing any other packages first. I want to check the Jet interface first on my admin.

Before I used Jet, I was able to login and logout normally (still with the standard Django admin).

But after I activated Jet, the Django admin can login, with a nice view, but there's an error when logging out. There's a 405 error when logging out.

Has anyone else experienced the same thing?

Here's the code I wrote:

Error Debug Code:
[11/Feb/2024 05:28:39] "GET /jet/jsi18n/ HTTP/1.1" 200 3342
[11/Feb/2024 05:28:39] "GET /jet/jsi18n/ HTTP/1.1" 200 3342
Method Not Allowed (GET): /admin/logout/
Method Not Allowed: /admin/logout/
[11/Feb/2024 05:28:41] "GET /admin/logout/ HTTP/1.1" 405 0

File URLS.PY

from django.contrib import admin
from django.urls import path, include

urlpatterns = [
path('jet/', include('jet.urls', 'jet')), # Django JET URLS
path('jet/dashboard/', include('jet.dashboard.urls', 'jet-dashboard')), # Django JET dashboard URLS
path('admin/', admin.site.urls),
]

File Setting.py

INSTALLED_APPS = [
'jet.dashboard',
'jet',

'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',

]

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'testjet.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

The rest of the code hasn't been changed because it's still a standard new project from Django. And I have tested this on two browsers, Firefox and the latest version of Edge. The result remains the same. Logout Error 405 if using Jet. But normal if without Jet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant