AttributeError at /admin/login/

'tuple' object has no attribute 'regex'
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/login/?next=/admin/
Django Version: 1.8.2
Exception Type: AttributeError
Exception Value:
'tuple' object has no attribute 'regex'
Exception Location: /usr/local/lib/python3.4/dist-packages/django/core/urlresolvers.py in _populate, line 298
Python Executable: /usr/bin/python3.4
Python Version: 3.4.0
Python Path:
['/home/yidnekachew/Projects/Django/perfman2',
 '/usr/local/lib/python3.4/dist-packages/pip-7.1.0-py3.4.egg',
 '/home/yidnekachew/Projects/Django/perfman2',
 '/usr/lib/python3.4',
 '/usr/lib/python3.4/plat-x86_64-linux-gnu',
 '/usr/lib/python3.4/lib-dynload',
 '/home/yidnekachew/.local/lib/python3.4/site-packages',
 '/usr/local/lib/python3.4/dist-packages',
 '/usr/lib/python3/dist-packages']
Server time: Mon, 20 Jul 2015 13:29:30 +0000

Error during template rendering

In template /usr/local/lib/python3.4/dist-packages/django/contrib/admin/templates/admin/base_site.html, error at line 6

'tuple' object has no attribute 'regex'

1 {% extends "admin/base.html" %}
2
3 {% block title %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}
4
5 {% block branding %}
6 <h1 id="site-name"><a href=" {% url 'admin:index' %} ">{{ site_header|default:_('Django administration') }}</a></h1>
7 {% endblock %}
8
9 {% block nav-global %}{% endblock %}
10

Traceback Switch back to interactive view

Request information

GET

Variable Value
next
'/admin/'

POST

No POST data

FILES

No FILES data

Variable Value
csrftoken
'BY2pIROTJeFofa1EcjSL1pekPrhjaIak'
sessionid
'ug3xxoy8os5ypw3hg3v8pdmmmz35pp22'

META

Variable Value
wsgi.errors
<_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'>
LC_IDENTIFICATION
'am_ET'
XDG_RUNTIME_DIR
'/run/user/1001'
JDK_HOME
'/usr/java/jdk1.6.0_30'
LANG
'en_US.UTF-8'
SSH_AUTH_SOCK
'/run/user/1001/keyring-sfoVTK/ssh'
REQUEST_METHOD
'GET'
HTTP_ACCEPT_ENCODING
'gzip, deflate'
HTTP_USER_AGENT
'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0'
LC_MEASUREMENT
'am_ET'
LC_PAPER
'am_ET'
CONTENT_TYPE
'text/plain'
SHELL
'/bin/bash'
HOME
'/home/yidnekachew'
LOGNAME
'yidnekachew'
PAGA_ENC_ITERATIONS
'1000'
PYTHONPATH
'/home/yidnekachew/Projects/Django/perfman2'
LC_TIME
'am_ET'
COMPIZ_BIN_PATH
'/usr/bin/'
LC_MONETARY
'am_ET'
GNOME_KEYRING_CONTROL
'/run/user/1001/keyring-sfoVTK'
XDG_VTNR
'7'
COMPIZ_CONFIG_PROFILE
'ubuntu'
HTTP_HOST
'127.0.0.1:8000'
SESSION_MANAGER
'local/zkassa:@/tmp/.ICE-unix/3168,unix/zkassa:/tmp/.ICE-unix/3168'
IM_CONFIG_PHASE
'1'
LC_TELEPHONE
'am_ET'
XDG_GREETER_DATA_DIR
'/var/lib/lightdm-data/yidnekachew'
GIO_LAUNCHED_DESKTOP_FILE_PID
'4155'
DESKTOP_SESSION
'ubuntu'
wsgi.run_once
False
wsgi.file_wrapper
''
wsgi.url_scheme
'http'
SCRIPT_NAME
''
XDG_DATA_DIRS
'/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/'
UPSTART_SESSION
'unix:abstract=/com/ubuntu/upstart-session/1001/2954'
DBUS_SESSION_BUS_ADDRESS
'unix:abstract=/tmp/dbus-WXORzVO6wA'
TZ
'UTC'
XFILESEARCHPATH
'/usr/dt/app-defaults/%L/Dt'
wsgi.multithread
True
GRAILS_HOME
'/opt/grails-2.3.11'
JAVA_HOME
'/usr/java/jdk1.6.0_30'
HTTP_ACCEPT_LANGUAGE
'am,en-US;q=0.7,en;q=0.3'
PYCHARM_HOSTED
'1'
XDG_SESSION_ID
'c5'
MANDATORY_PATH
'/usr/share/gconf/ubuntu.mandatory.path'
XDG_SESSION_PATH
'/org/freedesktop/DisplayManager/Session0'
XDG_CONFIG_DIRS
'/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg'
PAGA_ENC_ALGORITHM
'PBEWithMD5AndTripleDES'
XMODIFIERS
'@im=ibus'
PYTHONUNBUFFERED
'1'
SERVER_SOFTWARE
'WSGIServer/0.2'
GNOME_DESKTOP_SESSION_ID
'this-is-deprecated'
SESSIONTYPE
'gnome-session'
CONTENT_LENGTH
''
GATEWAY_INTERFACE
'CGI/1.1'
USER
'yidnekachew'
XDG_SEAT
'seat0'
LC_NAME
'am_ET'
TEXTDOMAINDIR
'/usr/share/locale/'
XDG_MENU_PREFIX
'gnome-'
wsgi.version
(1, 0)
JOB
'dbus'
LC_NUMERIC
'am_ET'
DJANGO_SETTINGS_MODULE
'perfman.settings'
PATH
'/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/groovy-1.8.5/bin:/opt/grails-2.3.11/bin'
GDMSESSION
'ubuntu'
REMOTE_HOST
''
SERVER_NAME
'localhost'
TEXTDOMAIN
'im-config'
DEFAULTS_PATH
'/usr/share/gconf/ubuntu.default.path'
PWD
'/home/yidnekachew'
RUN_MAIN
'true'
GDM_LANG
'en_US'
NLSPATH
'/usr/dt/lib/nls/msg/%L/%N.cat'
QT_IM_MODULE
'ibus'
PYTHONIOENCODING
'UTF-8'
LD_LIBRARY_PATH
'/usr/java/jdk1.6.0_30/jre/lib/amd64/server:/usr/java/jdk1.6.0_30/jre/lib/amd64:/usr/java/jdk1.6.0_30/jre/../lib/amd64:/home/yidnekachew/Desktop/My
 '
'Documents/pycharm-4.5.2/bin:'
GTK_MODULES
'overlay-scrollbar:unity-gtk-module'
PAGA_ENC_KEY
'dfjk38Gfdsj59sjFg'
QT4_IM_MODULE
'xim'
GPG_AGENT_INFO
'/run/user/1001/keyring-sfoVTK/gpg:0:1'
DISPLAY
':0'
GIO_LAUNCHED_DESKTOP_FILE
'/usr/share/applications/jetbrains-pycharm.desktop'
XAUTHORITY
'/home/yidnekachew/.Xauthority'
LANGUAGE
'en_US'
HTTP_ACCEPT
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
SHLVL
'0'
QT_QPA_PLATFORMTHEME
'appmenu-qt5'
XDG_CURRENT_DESKTOP
'Unity'
QUERY_STRING
'next=/admin/'
INSTANCE
''
wsgi.input
<_io.BufferedReader name=5>
XDG_SEAT_PATH
'/org/freedesktop/DisplayManager/Seat0'
LC_ADDRESS
'am_ET'
HTTP_CONNECTION
'keep-alive'
SELINUX_INIT
'YES'
CLUTTER_IM_MODULE
'xim'
HTTP_COOKIE
'csrftoken=BY2pIROTJeFofa1EcjSL1pekPrhjaIak; '
'sessionid=ug3xxoy8os5ypw3hg3v8pdmmmz35pp22'
PATH_INFO
'/admin/login/'
GNOME_KEYRING_PID
'2952'
SERVER_PROTOCOL
'HTTP/1.1'
REMOTE_ADDR
'127.0.0.1'
wsgi.multiprocess
False
SERVER_PORT
'8000'
SESSION
'ubuntu'
CSRF_COOKIE
'BY2pIROTJeFofa1EcjSL1pekPrhjaIak'
GTK_IM_MODULE
'ibus'

Settings

Using settings module perfman.settings

Setting Value
MESSAGE_STORAGE
'django.contrib.messages.storage.fallback.FallbackStorage'
SESSION_FILE_PATH
None
CSRF_FAILURE_VIEW
'django.views.csrf.csrf_failure'
INTERNAL_IPS
()
LOGIN_REDIRECT_URL
'/accounts/profile/'
CSRF_COOKIE_HTTPONLY
False
TEMPLATE_DIRS
()
USE_X_FORWARDED_HOST
False
CACHE_MIDDLEWARE_SECONDS
600
FILE_UPLOAD_PERMISSIONS
None
DEFAULT_INDEX_TABLESPACE
''
ABSOLUTE_URL_OVERRIDES
{}
TEST_NON_SERIALIZED_APPS
[]
SESSION_COOKIE_NAME
'sessionid'
MANAGERS
()
LANGUAGE_COOKIE_PATH
'/'
DEBUG
True
CSRF_COOKIE_AGE
31449600
FILE_UPLOAD_HANDLERS
('django.core.files.uploadhandler.MemoryFileUploadHandler',
 'django.core.files.uploadhandler.TemporaryFileUploadHandler')
FILE_UPLOAD_TEMP_DIR
None
APPEND_SLASH
True
DATETIME_FORMAT
'N j, Y, P'
MEDIA_ROOT
''
CACHE_MIDDLEWARE_ALIAS
'default'
NUMBER_GROUPING
0
CSRF_COOKIE_PATH
'/'
SECURE_HSTS_SECONDS
0
PASSWORD_HASHERS
'********************'
DEFAULT_TABLESPACE
''
CSRF_COOKIE_DOMAIN
None
LANGUAGE_CODE
'en-us'
STATICFILES_FINDERS
('django.contrib.staticfiles.finders.FileSystemFinder',
 'django.contrib.staticfiles.finders.AppDirectoriesFinder')
USE_L10N
True
LANGUAGE_COOKIE_DOMAIN
None
DATE_INPUT_FORMATS
('%Y-%m-%d',
 '%m/%d/%Y',
 '%m/%d/%y',
 '%b %d %Y',
 '%b %d, %Y',
 '%d %b %Y',
 '%d %b, %Y',
 '%B %d %Y',
 '%B %d, %Y',
 '%d %B %Y',
 '%d %B, %Y')
SECURE_SSL_REDIRECT
False
CACHES
{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
X_FRAME_OPTIONS
'SAMEORIGIN'
EMAIL_SSL_CERTFILE
None
LOGGING
{}
BASE_DIR
'/home/yidnekachew/Projects/Django/perfman2'
EMAIL_USE_TLS
False
SESSION_SERIALIZER
'django.contrib.sessions.serializers.JSONSerializer'
EMAIL_SUBJECT_PREFIX
'[Django] '
SECURE_HSTS_INCLUDE_SUBDOMAINS
False
THOUSAND_SEPARATOR
','
USE_ETAGS
False
MEDIA_URL
''
DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage'
EMAIL_USE_SSL
False
EMAIL_HOST_USER
''
DATABASE_ROUTERS
[]
TEMPLATE_STRING_IF_INVALID
''
SECURE_REDIRECT_EXEMPT
[]
EMAIL_SSL_KEYFILE
'********************'
LANGUAGE_COOKIE_NAME
'django_language'
LANGUAGES
(('af', 'Afrikaans'),
 ('ar', 'Arabic'),
 ('ast', 'Asturian'),
 ('az', 'Azerbaijani'),
 ('bg', 'Bulgarian'),
 ('be', 'Belarusian'),
 ('bn', 'Bengali'),
 ('br', 'Breton'),
 ('bs', 'Bosnian'),
 ('ca', 'Catalan'),
 ('cs', 'Czech'),
 ('cy', 'Welsh'),
 ('da', 'Danish'),
 ('de', 'German'),
 ('el', 'Greek'),
 ('en', 'English'),
 ('en-au', 'Australian English'),
 ('en-gb', 'British English'),
 ('eo', 'Esperanto'),
 ('es', 'Spanish'),
 ('es-ar', 'Argentinian Spanish'),
 ('es-mx', 'Mexican Spanish'),
 ('es-ni', 'Nicaraguan Spanish'),
 ('es-ve', 'Venezuelan Spanish'),
 ('et', 'Estonian'),
 ('eu', 'Basque'),
 ('fa', 'Persian'),
 ('fi', 'Finnish'),
 ('fr', 'French'),
 ('fy', 'Frisian'),
 ('ga', 'Irish'),
 ('gl', 'Galician'),
 ('he', 'Hebrew'),
 ('hi', 'Hindi'),
 ('hr', 'Croatian'),
 ('hu', 'Hungarian'),
 ('ia', 'Interlingua'),
 ('id', 'Indonesian'),
 ('io', 'Ido'),
 ('is', 'Icelandic'),
 ('it', 'Italian'),
 ('ja', 'Japanese'),
 ('ka', 'Georgian'),
 ('kk', 'Kazakh'),
 ('km', 'Khmer'),
 ('kn', 'Kannada'),
 ('ko', 'Korean'),
 ('lb', 'Luxembourgish'),
 ('lt', 'Lithuanian'),
 ('lv', 'Latvian'),
 ('mk', 'Macedonian'),
 ('ml', 'Malayalam'),
 ('mn', 'Mongolian'),
 ('mr', 'Marathi'),
 ('my', 'Burmese'),
 ('nb', 'Norwegian Bokmal'),
 ('ne', 'Nepali'),
 ('nl', 'Dutch'),
 ('nn', 'Norwegian Nynorsk'),
 ('os', 'Ossetic'),
 ('pa', 'Punjabi'),
 ('pl', 'Polish'),
 ('pt', 'Portuguese'),
 ('pt-br', 'Brazilian Portuguese'),
 ('ro', 'Romanian'),
 ('ru', 'Russian'),
 ('sk', 'Slovak'),
 ('sl', 'Slovenian'),
 ('sq', 'Albanian'),
 ('sr', 'Serbian'),
 ('sr-latn', 'Serbian Latin'),
 ('sv', 'Swedish'),
 ('sw', 'Swahili'),
 ('ta', 'Tamil'),
 ('te', 'Telugu'),
 ('th', 'Thai'),
 ('tr', 'Turkish'),
 ('tt', 'Tatar'),
 ('udm', 'Udmurt'),
 ('uk', 'Ukrainian'),
 ('ur', 'Urdu'),
 ('vi', 'Vietnamese'),
 ('zh-cn', 'Simplified Chinese'),
 ('zh-hans', 'Simplified Chinese'),
 ('zh-hant', 'Traditional Chinese'),
 ('zh-tw', 'Traditional Chinese'))
AUTH_USER_MODEL
'auth.User'
SECURE_PROXY_SSL_HEADER
None
LOCALE_PATHS
()
FILE_UPLOAD_MAX_MEMORY_SIZE
2621440
PASSWORD_RESET_TIMEOUT_DAYS
'********************'
FORMAT_MODULE_PATH
None
DEFAULT_CHARSET
'utf-8'
ALLOWED_INCLUDE_ROOTS
()
DEFAULT_CONTENT_TYPE
'text/html'
TEMPLATE_DEBUG
False
EMAIL_PORT
25
ALLOWED_HOSTS
[]
FILE_CHARSET
'utf-8'
DECIMAL_SEPARATOR
'.'
STATIC_URL
'/static/'
EMAIL_HOST
'localhost'
FIXTURE_DIRS
()
LANGUAGES_BIDI
('he', 'ar', 'fa', 'ur')
DEFAULT_FROM_EMAIL
'webmaster@localhost'
EMAIL_HOST_PASSWORD
'********************'
DEFAULT_EXCEPTION_REPORTER_FILTER
'django.views.debug.SafeExceptionReporterFilter'
TEMPLATES
[{'APP_DIRS': True,
  'BACKEND': 'django.template.backends.django.DjangoTemplates',
  'DIRS': ['/home/yidnekachew/Projects/Django/perfman2/templates'],
  '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']}}]
DATETIME_INPUT_FORMATS
('%Y-%m-%d %H:%M:%S',
 '%Y-%m-%d %H:%M:%S.%f',
 '%Y-%m-%d %H:%M',
 '%Y-%m-%d',
 '%m/%d/%Y %H:%M:%S',
 '%m/%d/%Y %H:%M:%S.%f',
 '%m/%d/%Y %H:%M',
 '%m/%d/%Y',
 '%m/%d/%y %H:%M:%S',
 '%m/%d/%y %H:%M:%S.%f',
 '%m/%d/%y %H:%M',
 '%m/%d/%y')
SESSION_COOKIE_SECURE
False
SERVER_EMAIL
'root@localhost'
STATICFILES_STORAGE
'django.contrib.staticfiles.storage.StaticFilesStorage'
DEBUG_PROPAGATE_EXCEPTIONS
False
TIME_INPUT_FORMATS
('%H:%M:%S', '%H:%M:%S.%f', '%H:%M')
SESSION_COOKIE_DOMAIN
None
SECURE_SSL_HOST
None
TIME_FORMAT
'P'
DATE_FORMAT
'N j, Y'
DISALLOWED_USER_AGENTS
()
USE_THOUSAND_SEPARATOR
False
ROOT_URLCONF
'perfman.urls'
IGNORABLE_404_URLS
()
USE_I18N
True
AUTHENTICATION_BACKENDS
('django.contrib.auth.backends.ModelBackend',)
SESSION_SAVE_EVERY_REQUEST
False
TIME_ZONE
'UTC'
STATIC_ROOT
None
SIGNING_BACKEND
'django.core.signing.TimestampSigner'
TEST_RUNNER
'django.test.runner.DiscoverRunner'
WSGI_APPLICATION
'perfman.wsgi.application'
PREPEND_WWW
False
SESSION_COOKIE_HTTPONLY
True
SESSION_ENGINE
'django.contrib.sessions.backends.db'
CSRF_COOKIE_NAME
'csrftoken'
SHORT_DATETIME_FORMAT
'm/d/Y P'
YEAR_MONTH_FORMAT
'F Y'
TEMPLATE_CONTEXT_PROCESSORS
('django.contrib.auth.context_processors.auth',
 'django.template.context_processors.debug',
 'django.template.context_processors.i18n',
 'django.template.context_processors.media',
 'django.template.context_processors.static',
 'django.template.context_processors.tz',
 'django.contrib.messages.context_processors.messages')
SESSION_CACHE_ALIAS
'default'
FORCE_SCRIPT_NAME
None
SESSION_COOKIE_AGE
1209600
SECURE_CONTENT_TYPE_NOSNIFF
False
MIDDLEWARE_CLASSES
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware')
MONTH_DAY_FORMAT
'F j'
CSRF_COOKIE_SECURE
False
SECRET_KEY
'********************'
LOGIN_URL
'/accounts/login/'
DATABASES
{'default': {'ATOMIC_REQUESTS': False,
             'AUTOCOMMIT': True,
             'CONN_MAX_AGE': 0,
             'ENGINE': 'django.db.backends.mysql',
             'HOST': '',
             'NAME': 'perfman2',
             'OPTIONS': {},
             'PASSWORD': '********************',
             'PORT': '3306',
             'TEST': {'CHARSET': None,
                      'COLLATION': None,
                      'MIRROR': None,
                      'NAME': None},
             'TIME_ZONE': 'UTC',
             'USER': 'root'}}
SETTINGS_MODULE
'perfman.settings'
ADMINS
()
SESSION_COOKIE_PATH
'/'
MIGRATION_MODULES
{}
TEMPLATE_LOADERS
('django.template.loaders.filesystem.Loader',
 'django.template.loaders.app_directories.Loader')
EMAIL_BACKEND
'django.core.mail.backends.smtp.EmailBackend'
SILENCED_SYSTEM_CHECKS
[]
LOGGING_CONFIG
'logging.config.dictConfig'
FILE_UPLOAD_DIRECTORY_PERMISSIONS
None
STATICFILES_DIRS
()
LOGOUT_URL
'/accounts/logout/'
FIRST_DAY_OF_WEEK
0
LANGUAGE_COOKIE_AGE
None
CACHE_MIDDLEWARE_KEY_PREFIX
'********************'
SHORT_DATE_FORMAT
'm/d/Y'
USE_TZ
True
SECURE_BROWSER_XSS_FILTER
False
EMAIL_TIMEOUT
None
SESSION_EXPIRE_AT_BROWSER_CLOSE
False
INSTALLED_APPS
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'hrm')

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.