You are correct, your problem is in logout url , because you need to pass a
function not a duct as second parameter.

Are you using django auth views ?


https://docs.djangoproject.com/en/1.9/topics/auth/default/#django.contrib.auth.logout


El martes, 15 de marzo de 2016, Deepanshu Sagar <deepansh...@gmail.com>
escribió:
> Hello,
> i am getting below error while accessing http://localhost:8000/login/.
>
</mail/u/0/s/?view=att&th=1537a25505109f0c&attid=0.1&disp=emb&realattid=autoGeneratedInlineImage1&zw&atsh=1>
>
> Below are the chaining codes.
> boardgames\urls.py
>
</mail/u/0/s/?view=att&th=1537a25505109f0c&attid=0.2&disp=emb&realattid=autoGeneratedInlineImage2&zw&atsh=1>
> boardgames\templates\login.html
>
</mail/u/0/s/?view=att&th=1537a25505109f0c&attid=0.3&disp=emb&realattid=autoGeneratedInlineImage3&zw&atsh=1>
>
> NOTE: before adding "
>
> url(r'^logout/', {'next_page': 'boardgames_home'},
name='boardgames_logout')
>
> to boardgames\urls.py. the access was working fine.
> below is the settings.py
>
> """
> Django settings for boardgames project.
>
> For more information on this file, see
> https://docs.djangoproject.com/en/1.6/topics/settings/
>
> For the full list of settings and their values, see
> https://docs.djangopro ect.com/en/1.6/ref/settings/
> """
>
> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
> import os
> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>
>
> # Quick-start development settings - unsuitable for production
> # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
>
> # SECURITY WARNING: keep the secret key used in production secret!
> SECRET_KEY = '_p4ga=y!6rbqqv3&4)v7a*qtjb*8tedegd3=8#(p-2dl6a@3#v'
>
> # SECURITY WARNING: don't run with debug turned on in production!
> DEBUG = True
>
>
> ALLOWED_HOSTS = []
>
>
> # Application definition
>
> INSTALLED_APPS = (
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> 'main',
> 'tictactoe',
> )
>
> MIDDLEWARE_CLASSES = (
> '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 = 'boardgames.urls'
>
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> 'DIRS': [os.path.join(BASE_DIR, 'templates')],
> 'APP_DIRS': True,
> 'OPTIONS': {
> 'context_processors': [
> 'django.core.context_processors.request',
> 'django.template.context_processors.debug',
> 'django.template.context_processors.request',
> 'django.contrib.auth.context_processors.auth',
> 'django.contrib.messages.context_processors.messages',
> ],
> },
> },
> ]
>
>
> WSGI_APPLICATION = 'boardgames.wsgi.application'
>
>
> # Database
> # https://docs.djangoproject.com/en/1.6/ref/settings/#databases
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.sqlite3',
> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
> }
> }
>
> # Internationalization
> # https://docs.djangoproject.com/en/1.6/topics/i18n/
>
> LANGUAGE_CODE = 'en-us'
>
> TIME_ZONE = 'UTC'
>
> USE_I18N = True
>
> USE_L10N = True
>
> USE_TZ = True
>
>
> # Static files (CSS, JavaScript, Images)
> # https://docs.djangoproject.com/en/1.6/howto/static-files/
>
> STATIC_URL = '/static/'
> STATICFILES_DIRS = (os.path.join(BASE_DIR, "static"),)
>
> LOGIN_URL = 'boardgames_login'
> LOGOUT_URL = 'boardgames_logout'
> LOGIN_REDIRECT_URL = 'user_home'
>
> I am new to Django learning.
> Please let me know if more details are required.
> Regards
> Deepanshu
>
> --
> You received this message because you are subscribed to the Google Groups
"Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/28da63f3-382c-4ff8-b698-79bc0b0d8b49%40googlegroups.com
.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
"La utopía sirve para caminar" Fernando Birri

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyPDxLVpu%2BAwM7z9gmEO5mLj5sNdrMEED0gDhwm3qpigsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to