Anomalie #1968
Mis à jour par Étienne Loks il y a plus de 10 ans
AttributeError at /accounts/login/ 'list' object has no attribute 'all' Request Method: GET Request URL: http://192.168.100.204/accounts/login/ Django Version: 1.4.5 Exception Type: AttributeError Exception Value: 'list' object has no attribute 'all' Exception Location: /srv/ishtar/archaeological_files/models.py in get_owns, line 228 Python Executable: /usr/bin/python Python Version: 2.7.3 Python Path: ['/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/pymodules/python2.7', '/srv/ishtar/', '/usr/local/lib/', '/usr/local/lib/'] Server time: mer, 23 Jul 2014 01:09:05 +0200 Traceback Switch to copy-and-paste view /usr/lib/python2.7/dist-packages/django/core/handlers/base.py in get_response response = response.render() ... ▶ Local vars /usr/lib/python2.7/dist-packages/django/template/response.py in render self._set_content(self.rendered_content) ... ▶ Local vars /usr/lib/python2.7/dist-packages/django/template/response.py in rendered_content context = self.resolve_context(self.context_data) ... ▶ Local vars /usr/lib/python2.7/dist-packages/django/template/response.py in resolve_context return RequestContext(self._request, context, current_app=self._current_app) ... ▶ Local vars /usr/lib/python2.7/dist-packages/django/template/context.py in __init__ self.update(processor(request)) ... ▶ Local vars /srv/ishtar/ishtar_common/context_processors.py in get_base_context for item in model.get_owns(request.user): ... ▶ Local vars /srv/ishtar/archaeological_files/models.py in get_owns return sorted(owns.all(), key=lambda x:(x.has_adminact, ... ▶ Local vars Request information GET No GET data POST No POST data FILES No FILES data COOKIES Variable Value sessionid '4177a53be3e47d1aeb84e1f9d9ec7d4b' META Variable Value mod_wsgi.listener_port '80' HTTP_X_FORWARDED_SERVER 'ishtar-pdl.peacefrogs.net' HTTP_COOKIE 'sessionid=4177a53be3e47d1aeb84e1f9d9ec7d4b' HTTP_ACCEPT_LANGUAGE 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3' SERVER_SOFTWARE 'Apache/2.2.22 (Debian)' SCRIPT_NAME u'' mod_wsgi.handler_script '' SERVER_SIGNATURE '<address>Apache/2.2.22 (Debian) Server at 192.168.100.204 Port 80</address>\n' REQUEST_METHOD 'GET' PATH_INFO u'/accounts/login/' SERVER_PROTOCOL 'HTTP/1.1' QUERY_STRING '' HTTP_USER_AGENT 'Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Iceweasel/30.0' HTTP_CONNECTION 'Keep-Alive' SERVER_NAME '192.168.100.204' REMOTE_ADDR '192.168.100.1' mod_wsgi.request_handler 'wsgi-script' wsgi.url_scheme 'http' PATH_TRANSLATED '/srv/ishtar/apache/django.wsgi/accounts/login/' SERVER_PORT '80' wsgi.multiprocess True mod_wsgi.input_chunked '0' SERVER_ADDR '192.168.100.204' DOCUMENT_ROOT '/var/www' mod_wsgi.process_group 'ishtar' SCRIPT_FILENAME '/srv/ishtar/apache/django.wsgi' SERVER_ADMIN 'webmaster@localhost' wsgi.input <mod_wsgi.Input object at 0x7f55585e8c70> HTTP_HOST '192.168.100.204' wsgi.multithread False mod_wsgi.callable_object 'application' REQUEST_URI '/accounts/login/' HTTP_ACCEPT 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' mod_wsgi.listener_host '' wsgi.version (1, 1) GATEWAY_INTERFACE 'CGI/1.1' HTTP_X_FORWARDED_FOR '62.147.149.24' wsgi.errors <mod_wsgi.Log object at 0x7f55585e8af0> REMOTE_PORT '52609' HTTP_X_FORWARDED_HOST 'ishtar-pdl.peacefrogs.net' mod_wsgi.version (3, 3) wsgi.run_once False mod_wsgi.application_group '127.0.0.1|' mod_wsgi.script_reloading '1' wsgi.file_wrapper '' CSRF_COOKIE 'Szobh1MLxcxFNQajTbU5wC3qVouKrrBr' HTTP_ACCEPT_ENCODING 'gzip, deflate' Settings Using settings module ishtar_pdl.settings Setting Value YEAR_MONTH_FORMAT 'F Y' SERVER_EMAIL 'root@localhost' USE_L10N True ISHTAR_PERMIT_TYPES {'': (u'NP', 'Non pr\xc3\xa9cis\xc3\xa9'), u'autorisation': (u'AUT', u'Autorisation'), u'autorisation de lotir': (u'AL', u'Autorisation de lotir'), u'autorisation de travaux': (u'AT', u'Autorisation de travaux'), u'autre': (u'O', u'Autre'), u"certificat d'urbanisme": (u'CU', u"Certificat d'urbanisme"), u'd\xe9couverte fortuite': (u'DF', u'D\xe9couvert fortuite'), u'installation class\xe9e': (u'IC', u'Installation class\xe9e'), u'permis de construire': (u'PC', u'Permis de construire'), u'permis de d\xe9molir': (u'PD', u'Permis de d\xe9molir'), u"\xe9tude d'impact": (u'EI', u"\xc9tude d'impact"), u'\xe9tude pr\xe9alable MH': (u'EMH', u'\xc9tude pr\xe9alable MH')} USE_THOUSAND_SEPARATOR False CSRF_COOKIE_SECURE False LANGUAGE_CODE 'fr-fr' ROOT_URLCONF 'ishtar_pdl.urls' MANAGERS () ACCOUNT_ACTIVATION_DAYS 7 STATIC_ROOT '/var/www/static/' DEBUG_TOOLBAR False ALLOWED_HOSTS ['*'] MESSAGE_STORAGE 'django.contrib.messages.storage.fallback.FallbackStorage' EMAIL_SUBJECT_PREFIX '[Django] ' SEND_BROKEN_LINK_EMAILS False URL_VALIDATOR_USER_AGENT 'Django/1.4.5 (https://www.djangoproject.com)' STATICFILES_FINDERS ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') SESSION_COOKIE_DOMAIN None SESSION_COOKIE_NAME 'sessionid' ISHTAR_DPTS [44, 49, 53, 72, 85] ADMIN_FOR () TIME_INPUT_FORMATS ('%H:%M:%S', '%H:%M') DATABASES {'default': {'ENGINE': 'django.contrib.gis.db.backends.postgis', 'HOST': '192.168.100.205', 'NAME': 'ishtar-pdl', 'OPTIONS': {}, 'PASSWORD': u'********************', 'PORT': '5432', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'Europe/Paris', 'USER': 'ishtar-pdl'}} FILE_UPLOAD_PERMISSIONS None FILE_UPLOAD_HANDLERS ('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler') DEFAULT_CONTENT_TYPE 'text/html' TEST_RUNNER 'django.test.simple.DjangoTestSuiteRunner' JOINT u' | ' APPEND_SLASH True FIRST_DAY_OF_WEEK 0 DATABASE_ROUTERS [] URL_PATH '' SURFACE_UNIT 'square-metre' STATICFILES_STORAGE 'django.contrib.staticfiles.storage.StaticFilesStorage' CACHES {'default': {'BACKEND': 'django.core.cache.backends.memcached.CacheClass', 'LOCATION': '127.0.0.1:11211'}} COUNTRY 'fr' SESSION_COOKIE_PATH '/' USE_X_FORWARDED_HOST False MIDDLEWARE_CLASSES ['django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.locale.LocaleMiddleware'] USE_I18N True THOUSAND_SEPARATOR ',' SECRET_KEY u'********************' LANGUAGE_COOKIE_NAME 'django_language' JQUERY_UI_URL 'http://ishtar-pdl.peacefrogs.net/javascript/jquery-ui/' DEFAULT_INDEX_TABLESPACE '' CACHE_SMALLTIMEOUT 120 TRANSACTIONS_MANAGED False LOGGING_CONFIG 'django.utils.log.dictConfig' SIGNING_BACKEND 'django.core.signing.TimestampSigner' TEMPLATE_LOADERS ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader') WSGI_APPLICATION None SURFACE_UNIT_LABEL u'm\xb2' TEMPLATE_DEBUG False X_FRAME_OPTIONS 'SAMEORIGIN' AUTHENTICATION_BACKENDS ('django.contrib.auth.backends.ModelBackend', 'ishtar_common.backend.ObjectPermBackend') FORCE_SCRIPT_NAME None CACHE_BACKEND 'memcached://127.0.0.1:11211/' DEFAULT_CHARSET 'utf-8' SESSION_COOKIE_SECURE False BASE_URL '' CSRF_COOKIE_DOMAIN None FILE_CHARSET 'utf-8' DEBUG True CACHE_TIMEOUT 3600 SESSION_FILE_PATH None DEFAULT_FILE_STORAGE 'django.core.files.storage.FileSystemStorage' INSTALLED_APPS ['django.contrib.auth', 'django.contrib.admin', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.gis', 'django.contrib.staticfiles', 'django.contrib.formtools', 'south', 'registration', 'ishtar_common', 'archaeological_files', 'archaeological_operations', 'archaeological_context_records', 'archaeological_warehouse', 'archaeological_finds'] LANGUAGES (('fr', u'Fran\xe7ais'), ('en', u'English')) COMMENTS_ALLOW_PROFANITIES False STATICFILES_DIRS () PREPEND_WWW False SECURE_PROXY_SSL_HEADER None PASSWORD_RESET_TIMEOUT_DAYS u'********************' SESSION_COOKIE_HTTPONLY True ISHTAR_DOC_TYPES {'RF': u'Rapport final', 'RI': u'Rapport interm\xe9diaire', 'undefined': u'Non pr\xe9cis\xe9'} ISHTAR_OPE_TYPES {(u'programm\xe9e', u'BAT'): (u'building_study_research', u'\xc9tude de b\xe2ti (programm\xe9)'), (u'programm\xe9e', u'DIAG'): (u'arch_diagnostic_research', u'Diagnostic arch\xe9ologique (programm\xe9)'), (u'programm\xe9e', u'ED'): (u'documents_study_research', u'\xc9tude documentaire (programm\xe9)'), (u'programm\xe9e', u'FO'): (u'prog_excavation', u'Fouille arch\xe9ologique programm\xe9e'), (u'programm\xe9e', u'FP'): (u'prog_excavation', u'Fouille arch\xe9ologique programm\xe9e'), (u'programm\xe9e', u'FPP'): (u'prog_excavation', u'Fouille arch\xe9ologique programm\xe9e pluriannuelle'), (u'programm\xe9e', u'PA'): (u'aerial_survey_research', u'Prospection a\xe9rienne (programm\xe9e)'), (u'programm\xe9e', u'PCR'): (u'collective_research_project', u'Projet Collectif de Recherche'), (u'programm\xe9e', u'PI'): (u'inventory_survey_research', u'Prospection inventaire (programm\xe9)'), (u'programm\xe9e', u'PR'): (u'survey_research', u'Prospection (programm\xe9)'), (u'programm\xe9e', u'PT'): (u'thematic_survey', u'Prospection th\xe9matique'), (u'programm\xe9e', u'RE'): (u'rock_art_survey', u"Prospection avec relev\xe9 d'art rupestre"), (u'programm\xe9e', u'SD'): (u'sampling_research', u'Sondage (pr\xe9ventif)'), (u'pr\xe9ventive', u'BAT'): (u'building_study', u'\xc9tude de b\xe2ti (pr\xe9ventif)'), (u'pr\xe9ventive', u'DIAG'): (u'arch_diagnostic', u'Diagnostic arch\xe9ologique (pr\xe9ventif)'), (u'pr\xe9ventive', u'ED'): (u'documents_study', u'\xc9tude documentaire (pr\xe9ventif)'), (u'pr\xe9ventive', u'EV'): (u'evaluation', u'\xc9valuation'), (u'pr\xe9ventive', u'FO'): (u'prev_excavation', u'Fouille arch\xe9ologique pr\xe9ventive'), (u'pr\xe9ventive', u'Fo. Pr\xe9v.'): (u'prev_excavation', u'Fouille arch\xe9ologique pr\xe9ventive'), (u'pr\xe9ventive', u'PA'): (u'aerial_survey', u'Prospection a\xe9rienne (pr\xe9ventif)'), (u'pr\xe9ventive', u'PI'): (u'inventory_survey', u'Prospection inventaire (pr\xe9ventif)'), (u'pr\xe9ventive', u'PR'): (u'survey', u'Prospection (pr\xe9ventif)'), (u'pr\xe9ventive', u'SD'): (u'sampling', u'Sondage (programm\xe9)'), (u'pr\xe9ventive', u'SP'): (u'prev_excavation', u'Fouille arch\xe9ologique pr\xe9ventive'), (u'pr\xe9ventive', u'SU'): (u'emergency_excavation', u'Sauvetage urgent')} MONTH_DAY_FORMAT 'F j' LOGIN_URL '/accounts/login/' SESSION_EXPIRE_AT_BROWSER_CLOSE False DEFAULT_LANGUAGE 1 TIME_FORMAT 'P' EXTRA_APPS ['archaeological_context_records', 'archaeological_warehouse', 'archaeological_finds'] 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') CSRF_COOKIE_NAME 'csrftoken' EMAIL_HOST_PASSWORD u'********************' AUTH_PROFILE_MODULE 'ishtar_common.IshtarUser' CACHE_MIDDLEWARE_ALIAS 'default' ROOT_PATH '/var/www/' SESSION_SAVE_EVERY_REQUEST False NUMBER_GROUPING 0 THUMB_MAX_SIZE (300, 300) ISHTAR_OPE_COL_FORMAT [[('code_patriarche',), 'parse_string'], None, None, None, [('code_dracar',), 'parse_string_10'], None, (('in_charge',), 'parse_name_surname'), None, (('common_name',), 'parse_ope_name'), (('periods',), 'parse_period_name', None, True), (('cira_rapporteur',), 'parse_name_surname'), (('operation_type',), 'parse_patriarche_operationtype'), None, None, None, None, None, None, (('comment',), 'parse_comment_addr_nature', [16]), None, None, (('in_charge__attached_to',), 'parse_orga', [7]), None, None, None, None, None, None, None, (('start_date',), 'parse_date'), None, None, (('negative_result',), 'parse_bool'), None, None, None, None, None, None, (('year',), 'parse_yearref'), None, (('administrative_act', 'signature_date'), 'parse_date'), (('cira_date',), 'parse_date'), None, None, None, None, None, (('end_date',), 'parse_date'), None, None, None, (('administrative_act', 'act_type'), 'parse_admin_act_typ', [49]), (('administrative_act', 'ref_sra'), 'parse_fileref'), None, None, None, None, None, None, None, None, None, None, None, (('surface',), 'parse_ha'), None, (('source', 'index'), 'parse_rapp_index'), (('source', 'reference'), 'parse_string'), None, None, (('source', 'internal_reference'), 'parse_string'), (('source', 'receipt_date'), 'parse_date'), None, None, (('source', 'source_type'), 'parse_doc_types'), None, None, None, (('towns',), 'parse_insee', None, True), None, (('parcels',), 'parse_parcels', [79]), None, None, None, (('eas_number',), 'parse_string'), None, (('source', 'title'), 'parse_string'), None, None] SESSION_ENGINE 'django.contrib.sessions.backends.db' CSRF_FAILURE_VIEW 'django.views.csrf.csrf_failure' CSRF_COOKIE_PATH '/' LOGIN_REDIRECT_URL '/' LOGGING {'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'console': {'class': 'logging.StreamHandler', 'level': 'DEBUG'}, 'logfile': {'class': 'logging.handlers.WatchedFileHandler', 'filename': '/var/log/django/ishtar.log'}, 'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'include_html': True, 'level': 'ERROR'}}, 'loggers': {'chimere': {'handlers': ['logfile'], 'level': 'WARNING', 'propogate': False}, 'django': {'handlers': ['logfile'], 'level': 'ERROR', 'propagate': False}, 'django.request': {'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True}}, 'version': 1} IGNORABLE_404_URLS () LOCALE_PATHS () TEMPLATE_STRING_IF_INVALID '' LOGOUT_URL '/accounts/logout/' EMAIL_USE_TLS False FIXTURE_DIRS () EMAIL_HOST 'localhost' DATE_FORMAT u'%-d %B %Y' MEDIA_ROOT '/var/www/media/' IMAGE_MAX_SIZE (1024, 768) DEFAULT_EXCEPTION_REPORTER_FILTER 'django.views.debug.SafeExceptionReporterFilter' ADMINS () FORMAT_MODULE_PATH None DEFAULT_FROM_EMAIL 'webmaster@localhost' XHTML2ODT_PATH '/usr/local/lib/' MEDIA_URL 'http://ishtar-pdl.peacefrogs.net/media/' DATETIME_FORMAT 'N j, Y, P' TEMPLATE_DIRS ('/var/www/templates',) ENCODING '' SITE_ID 1 DISALLOWED_USER_AGENTS () ALLOWED_INCLUDE_ROOTS () SRID 27572 DECIMAL_SEPARATOR '.' ISHTAR_PERIODS {u'': u'not_yet_documented', u'BAS': u'low_empire', u'BMA': u'low_middle_age', u'BRA': u'old_bronze_age', u'BRF': u'final_bronze_age', u'BRM': u'middle_bronze_age', u'BRO': u'bronze_age', u'CON': u'contemporan', u'FE1': u'first_iron_age', u'FE2': u'second_iron_age', u'FER': u'iron_age', u'GAL': u'gallo-roman', u'HAU': u'high-empire', u'HMA': u'high_middle_age', u'IND': u'indetermined', u'MA': u'middle_age', u'MAC': u'classic_middle_age', u'MEA': u'old_mesolithic', u'MEM': u'middle_mesolithic', u'MER': u'recent_mesolithic', u'MES': u'mesolithic', u'MOD': u'modern', u'NEA': u'old_neolithic', u'NEF': u'final_neolithic', u'NEM': u'middle_neolithic', u'NEO': u'neolithic', u'NER': u'recent_neolithic', u'NRE': u'republic', u'PAA': u'ancien_paleolithic', u'PAF': u'final_paleolithic', u'PAL': u'paleolithic', u'PAM': u'middle_paleolithic', u'PAS': u'late_paleolithic', u'PRO': u'protohistory', u'REC': u'recent_times'} APP_NAME 'SRA - Pays de la Loire' SHORT_DATE_FORMAT 'm/d/Y' CACHE_MIDDLEWARE_KEY_PREFIX u'********************' TIME_ZONE 'Europe/Paris' FILE_UPLOAD_MAX_MEMORY_SIZE 2621440 EMAIL_BACKEND 'django.core.mail.backends.smtp.EmailBackend' DEFAULT_TABLESPACE '' TEMPLATE_CONTEXT_PROCESSORS ('ishtar_common.context_processors.get_base_context', 'django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static') ODT_TEMPLATE '/srv/ishtar/ishtar_common/static/template.odt' SESSION_COOKIE_AGE 1209600 SETTINGS_MODULE 'ishtar_pdl.settings' USE_ETAGS False LANGUAGES_BIDI ('he', 'ar', 'fa') DEBUG_PROPAGATE_EXCEPTIONS False FILE_UPLOAD_TEMP_DIR None INTERNAL_IPS ('127.0.0.1',) STATIC_URL 'http://ishtar-pdl.peacefrogs.net/static-20140722/' EMAIL_PORT 25 USE_TZ False SHORT_DATETIME_FORMAT 'm/d/Y P' SQL_DEBUG False PASSWORD_HASHERS u'********************' ABSOLUTE_URL_OVERRIDES {} CACHE_MIDDLEWARE_SECONDS 600 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') JQUERY_URL 'http://ishtar-pdl.peacefrogs.net/javascript/jquery/jquery.js' EMAIL_HOST_USER '' PROFANITIES_LIST u'********************'