[FRPythoneers] Daily Camera is now using Django - sort of!

Matt Boersma matt at sprout.org
Wed Nov 1 09:56:12 MST 2006


Ha!  That's why you never leave DEBUG=True in settings.py.

My old hometown newspaper, the Steamboat Pilot, where I used to stack
newspapers after school, is also a Django site:
http://www.steamboatpilot.com/

Matt

On 11/1/06, Jim Baker <jbaker at zyasoft.com> wrote:
>
>  Looks like the Daily Camera had a little upgrade difficulties in their
> switch to Django, as part of their new look (
> http://www.dailycamera.com/news/2006/oct/30/new-look-dailycameracom/). But
> at least they fixed this outage.
>
> I appreciate the DEBUG=True, so informative...
>
> - Jim
>  AttributeError at / 'module' object has no attribute 'urlpatterns'  Request
> Method: GET  Request URL: http://www.dailycamera.com/  Exception Type:
> AttributeError  Exception Value: 'module' object has no attribute
> 'urlpatterns'  Exception Location: /opt/local/appserv_bundle/django/core/urlresolvers.py
> in resolve, line 61
>  Traceback (innermost last)
>
>    - /opt/local/appserv_bundle/django/core/handlers/base.py in
>    get_response
>       1. for middleware_method in self._request_middleware:
>        2. response = middleware_method(request)
>        3. if response:
>        4. return response
>        5.
>        6. resolver = urlresolvers.RegexURLResolver(r'^/',
>       ROOT_URLCONF)
>        7. try:
>         1. callback, param_dict = resolver.resolve(path)
>     1.
>        2. # Apply view middleware
>        3. for middleware_method in self._view_middleware:
>        4. response = middleware_method(request, callback,
>       param_dict)
>        5. if response:
>        6. return response
>         Local vars ↓ <http://www.dailycamera.com/#>
>      Variable
>     Value
>       DEBUG
>     True
>
>      INTERNAL_IPS
>     ()
>
>      ROOT_URLCONF
>     'dev.urls'
>
>      db
>     <module 'django.core.db' from
>    '/opt/local/appserv_bundle/django/core/db/__init__.pyc'>
>
>      exceptions
>     <module 'django.core.exceptions' from
>    '/opt/local/appserv_bundle/django/core/exceptions.pyc'>
>
>      mail_admins
>     <function mail_admins at 0x2a98d0f398>
>
>      middleware_method
>     <bound method FFMigrationMiddleware.process_request of <
>    dev.middleware.ff_migration.FFMigrationMiddleware instance at
>    0x2a99897cb0>>
>
>      path
>     '/'
>
>      request
>     <DjangoRequest GET:{}, POST:{}, COOKIES:{'attribute':
>    '0102zz!!11515044600000%04%00%08scityZZcityZZ%05%00%09semailZZemailZZ%0A%00%0Esfirst%5FnameZZfirst%5FnameZZ%09%00%0Dslast%5FnameZZlast%5FnameZZ%05%00%09sstateZZstateZZ%06%00%0AsstatusZZstatusZZ%09%00%0Dsuser%5FnameZZuser%5FnameZZ%00',
>    'cookieChk': 'OK', 'role':
>    '0102zz!!11515044600000%0A%00%0Escreated%5FdtZZ1151504460ZZ%05%00%18srolesZZZZ16ZZZZBDCGENERALZZZZ%07%00%0Bsuser%5FidZZ1699904ZZ%00',
>    'value':
>    '0102zz!!11515044600000%04%00%0CscityZZLongmontZZ%05%00%14semailZZdc%40jim%2Dbaker%2EcomZZ%0A%00%05sfirst%5FnameZZJZZ%09%00%09slast%5FnameZZBAKERZZ%05%00%06sstateZZCOZZ%06%00%0AsstatusZZACTIVEZZ%09%00%14suser%5FnameZZdc%40jim%2Dbaker%2EcomZZ%03%00%04szipZZZZ%00'},
>    META:{'CONTENT_LENGTH': '0', 'DOCUMENT_ROOT': '/internet/www/',
>    'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=
>    0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET':
>    'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING':
>    'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
>    'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
>    'role=0102zz!!11515044600000%0A%00%0Escreated%5FdtZZ1151504460ZZ%05%00%18srolesZZZZ16ZZZZBDCGENERALZZZZ%07%00%0Bsuser%5FidZZ1699904ZZ%00;
>    value=0102zz!!11515044600000%04%00%0CscityZZLongmontZZ%05%00%14semailZZdc%40jim%2Dbaker%2EcomZZ%0A%00%05sfirst%5FnameZZJZZ%09%00%09slast%5FnameZZBAKERZZ%05%00%06sstateZZCOZZ%06%00%0AsstatusZZACTIVEZZ%09%00%14suser%5FnameZZdc%40jim%2Dbaker%2EcomZZ%03%00%04szipZZZZ%00;
>    attribute=0102zz!!11515044600000%04%00%08scityZZcityZZ%05%00%09semailZZemailZZ%0A%00%0Esfirst%5FnameZZfirst%5FnameZZ%09%00%0Dslast%5FnameZZlast%5FnameZZ%05%00%09sstateZZstateZZ%06%00%0AsstatusZZstatusZZ%09%00%0Dsuser%5FnameZZuser%5FnameZZ%00;
>    subscribe; cookieChk=OK', 'HTTP_HOST': 'www.dailycamera.com',
>    'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U;
>    Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0',
>    'PATH_INFO': '/', 'QUERY_STRING': '', 'REMOTE_ADDR': '24.8.111.50',
>    'REMOTE_PORT': '1243', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/', 'SCGI':
>    '1', 'SCRIPT_NAME': '', 'SCRIPT_URI': 'http://www.dailycamera.com/',
>    'SCRIPT_URL': '/', 'SERVER_ADDR': '204.78.38.215', 'SERVER_ADMIN': '
>    root at localhost', 'SERVER_NAME': 'www.dailycamera.com',
>    'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE':
>    'Apache/2.0.52 (Red Hat)', 'wsgi.errors': <open file '<stderr>',
>    mode 'w' at 0x2a95589110>, 'wsgi.input': <cStringIO.StringO object
>    at 0x2a9558e468>, 'wsgi.multiprocess': True, 'wsgi.multithread':
>    False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', '
>    wsgi.version': (1, 0)}>
>
>      resolver
>     <django.core.urlresolvers.RegexURLResolver object at 0x2a9ab1ad10>
>
>      response
>     None
>
>      self
>     <django.core.handlers.wsgi.WSGIHandler instance at 0x2a9849de18>
>
>      urlresolvers
>     <module 'django.core.urlresolvers' from
>    '/opt/local/appserv_bundle/django/core/urlresolvers.pyc'>
>
>       - /opt/local/appserv_bundle/django/core/urlresolvers.py in
>    resolve
>       1. self.urlconf_name = urlconf_name
>        2.
>        3. def resolve(self, path):
>        4. tried = []
>        5. match = self.regex.search(path)
>        6. if match:
>        7. new_path = path[match.end():]
>         1. for pattern in self.urlconf_module.urlpatterns:
>     1. try:
>        2. sub_match = pattern.resolve(new_path)
>        3. except Resolver404, e:
>        4. tried.extend([(pattern.regex.pattern + ' ' + t) for t in
>       e.args[0]['tried']])
>        5. else:
>        6. if sub_match:
>         Local vars ↓ <http://www.dailycamera.com/#>
>      Variable
>     Value
>       match
>     <_sre.SRE_Match object at 0x2a9ab40e40>
>
>      new_path
>     ''
>
>      path
>     '/'
>
>      self
>     <django.core.urlresolvers.RegexURLResolver object at 0x2a9ab1ad10>
>
>      tried
>     []
>
>
>  Request information GET
>
> No GET data
>
>  POST
>
> No POST data
>
>  COOKIES  Variable Value   attribute
> '0102zz!!11515044600000%04%00%08scityZZcityZZ%05%00%09semailZZemailZZ%0A%00%0Esfirst%5FnameZZfirst%5FnameZZ%09%00%0Dslast%5FnameZZlast%5FnameZZ%05%00%09sstateZZstateZZ%06%00%0AsstatusZZstatusZZ%09%00%0Dsuser%5FnameZZuser%5FnameZZ%00'
>   role
> '0102zz!!11515044600000%0A%00%0Escreated%5FdtZZ1151504460ZZ%05%00%18srolesZZZZ16ZZZZBDCGENERALZZZZ%07%00%0Bsuser%5FidZZ1699904ZZ%00'
>   value
> '0102zz!!11515044600000%04%00%0CscityZZLongmontZZ%05%00%14semailZZdc%40jim%2Dbaker%2EcomZZ%0A%00%05sfirst%5FnameZZJZZ%09%00%09slast%5FnameZZBAKERZZ%05%00%06sstateZZCOZZ%06%00%0AsstatusZZACTIVEZZ%09%00%14suser%5FnameZZdc%40jim%2Dbaker%2EcomZZ%03%00%04szipZZZZ%00'
>   cookieChk 'OK'
>   META  Variable Value   CONTENT_LENGTH '0'
>   DOCUMENT_ROOT '/internet/www/'
>   HTTP_ACCEPT 'text/xml,application/xml,application/xhtml+xml,text/html;q=
> 0.9,text/plain;q=0.8,image/png,*/*;q=0.5'
>   HTTP_ACCEPT_CHARSET 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
>   HTTP_ACCEPT_ENCODING 'gzip,deflate'
>   HTTP_ACCEPT_LANGUAGE 'en-us,en;q=0.5'
>   HTTP_CONNECTION 'keep-alive'
>   HTTP_COOKIE 'role=0102zz!!11515044600000%0A%00%0Escreated%5FdtZZ1151504460ZZ%05%00%18srolesZZZZ16ZZZZBDCGENERALZZZZ%07%00%0Bsuser%5FidZZ1699904ZZ%00;
> value=0102zz!!11515044600000%04%00%0CscityZZLongmontZZ%05%00%14semailZZdc%40jim%2Dbaker%2EcomZZ%0A%00%05sfirst%5FnameZZJZZ%09%00%09slast%5FnameZZBAKERZZ%05%00%06sstateZZCOZZ%06%00%0AsstatusZZACTIVEZZ%09%00%14suser%5FnameZZdc%40jim%2Dbaker%2EcomZZ%03%00%04szipZZZZ%00;
> attribute=0102zz!!11515044600000%04%00%08scityZZcityZZ%05%00%09semailZZemailZZ%0A%00%0Esfirst%5FnameZZfirst%5FnameZZ%09%00%0Dslast%5FnameZZlast%5FnameZZ%05%00%09sstateZZstateZZ%06%00%0AsstatusZZstatusZZ%09%00%0Dsuser%5FnameZZuser%5FnameZZ%00;
> subscribe; cookieChk=OK'
>   HTTP_HOST 'www.dailycamera.com'
>   HTTP_KEEP_ALIVE '300'
>   HTTP_USER_AGENT 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
> 1.8.1) Gecko/20061010 Firefox/2.0'
>   PATH_INFO '/'
>   QUERY_STRING ''
>   REMOTE_ADDR '24.8.111.50'
>   REMOTE_PORT '1243'
>   REQUEST_METHOD 'GET'
>   REQUEST_URI '/'
>   SCGI '1'
>   SCRIPT_NAME ''
>   SCRIPT_URI 'http://www.dailycamera.com/'
>   SCRIPT_URL '/'
>   SERVER_ADDR '204.78.38.215'
>   SERVER_ADMIN 'root at localhost'
>   SERVER_NAME 'www.dailycamera.com'
>   SERVER_PORT '80'
>   SERVER_PROTOCOL 'HTTP/1.1'
>   SERVER_SOFTWARE 'Apache/2.0.52 (Red Hat)'
>   wsgi.errors <open file '<stderr>', mode 'w' at 0x2a95589110>
>   wsgi.input <cStringIO.StringO object at 0x2a9558e468>
>   wsgi.multiprocess True
>   wsgi.multithread False
>   wsgi.run_once False
>   wsgi.url_scheme 'http'
>   wsgi.version (1, 0)
>   Settings Using settings module dev.settings_bdc_prod  Setting Value
> ABSOLUTE_URL_OVERRIDES {}
>   ADMINS (('Ellington Admins', 'djeffersonadmin at kwsn05.scripps.com'),)
>   ADMIN_FOR ('dev.settings_bdc_prod',)
>   ADMIN_MEDIA_PREFIX 'http://media.dailycamera.com/bdc/media/'
>   ALLOWED_INCLUDE_ROOTS ()
>   ALLOWED_REDIRECTS ('http://membercenter.dailycamera.com', '
> http://market.dailycamera.com/MemberCenter/')
>   APPEND_SLASH True
>   AUTH_PROFILE_MODULE 'profiles.profiles'
>   BANNED_EMAIL_DOMAINS ('none.com',)
>   BANNED_IPS ()
>   BLOGS_EMAILS_TO_NOTIFY ('hhimes at scrippsweb.com', '
> gfranxman at scrippsops.com')
>   BODY_FILTER_FUNCTION <function xlate2 at 0x2a9873de60>
>   CACHE_BACKEND 'memcached://127.0.0.1:11212/'
>   CACHE_MIDDLEWARE_KEY_PREFIX ''
>   COMMENTS_ALLOW_PROFANITIES False
>   COMMENTS_BANNED_USERS_GROUP 4
>   COMMENTS_FIRST_FEW 0
>   COMMENTS_MODERATORS_GROUP None
>   COMMENTS_SKETCHY_USERS_GROUP None
>   DATABASE_ENGINE 'postgresql'
>   DATABASE_HOST '10.140.84.116'
>   DATABASE_NAME 'bdc_prod'
>   DATABASE_PASSWORD '********************'
>   DATABASE_PORT ''
>   DATABASE_USER 'bdc_prod'
>   DATETIME_FORMAT 'N j, Y, P'
>   DATE_FORMAT 'N j, Y'
>   DEBUG True
>   DEFAULT_CHARSET 'utf-8'
>   DEFAULT_CONTENT_TYPE 'text/html'
>   DEFAULT_FROM_EMAIL 'webmaster at localhost'
>   DISALLOWED_USER_AGENTS ()
>   DUMMY_RELATED_LINK_ID 1
>   DUMMY_RELATED_STORY_ID 1
>   EMAIL_HOST 'localhost'
>   EMAIL_SUBJECT_PREFIX '[Django] '
>   ENVIRONMENT_VARIABLE 'DJANGO_SETTINGS_MODULE'
>   FF_SITE_ID 'BDC'
>   FULL_TEXT_INDEXING {'dev_photogalleries': ('Photo galleries', {'
> photogalleries.galleries': ('creation_date', {'sites__id__exact': 5})}),
> 'dev_stories': ('Stories', {'news.stories': ('pub_date',
> {'sites__id__exact': 5, 'status__exact': 1, 'where': ['pub_date <=
> NOW()::DATE']})})}
>   IGNORABLE_404_ENDS ('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi',
> 'favicon.ico', '.php')
>   IGNORABLE_404_STARTS ('/cgi-bin/', '/_vti_bin', '/_vti_inf')
>   INDEX_DIR '/internet/www/search_indexes/bdc/'
>   INSTALLED_APPS ['dev.apps.profiles', 'ellington.news', '
> dev.apps.home_pages', 'dev.apps.wxinfo', 'dev.apps.weather', '
> dev.apps.movielistings', 'ellington.sms', 'ellington.alerts', '
> ellington.registration', 'ellington.blogs', 'ellington.throttle', '
> ellington.categories', 'ellington.staff', 'ellington.relatedlinks', '
> ellington.places', 'ellington.music', 'ellington.events', '
> ellington.mailform', 'ellington.mailfriend', 'ellington.media', '
> ellington.movies', 'ellington.onthestreet', 'ellington.persistentsearch',
> 'ellington.podcasts', 'ellington.polls', 'ellington.q_and_a', '
> ellington.questionaire', 'ellington.quizzes', 'ellington.restaurants', '
> ellington.search', 'ellington.sexoffenders', 'ellington.playlists', '
> ellington.drinkspecials', 'dev.apps.Util', 'dev.apps.Stats', '
> dev.apps.StorySets', 'dev.apps.links', 'dev.apps.flatpages', '
> dev.apps.templatetools', 'django.contrib.admin', 'django.contrib.comments',
> 'django.contrib.markup', 'django.contrib.redirects', '
> django.contrib.syndication']
>   INTERNAL_IPS ()
>   JING_PATH '/opt/local/toolkit/bin/jing'
>   LANGUAGES (('bn', 'Bengali'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da',
> 'Danish'), ('de', 'German'), ('en', 'English'), ('es', 'Spanish'), ('fr',
> 'French'), ('gl', 'Galician'), ('is', 'Icelandic'), ('it', 'Italian'),
> ('no', 'Norwegian'), ('pt-br', 'Brazilian'), ('ro', 'Romanian'), ('ru',
> 'Russian'), ('sk', 'Slovak'), ('sr', 'Serbian'), ('sv', 'Swedish'),
> ('zh-cn', 'Simplified Chinese'))
>   LANGUAGE_CODE 'en-us'
>   MAIN_CITY_IDS (4,)
>   MANAGERS (('site-managers', 'site-managers at dailycamera.com'), ('Glenn
> Franxman', 'gfranxman at scrippsops.com'))
>   MEDIA_ROOT '/internet/www/media.dailycamera.com/htdocs/bdc/content'
>   MEDIA_URL 'http://media.dailycamera.com/bdc/content/'
>   MIDDLEWARE_CLASSES ('django.middleware.common.CommonMiddleware', '
> django.middleware.sessions.SessionMiddleware', '
> django.middleware.doc.XViewMiddleware', '
> django.middleware.locale.LocaleMiddleware', '
> dev.middleware.ff_migration.FFMigrationMiddleware', '
> django.contrib.redirects.middleware.RedirectFallbackMiddleware')
>   MOVIELISTINGS_CAPSULE_ABSTRACT_CUTOFF 290
>   PREPEND_WWW False
>   REGISTRATION_REQUIRES_PROFILE True
>   ROOT_URLCONF 'dev.urls'
>   SEARCH_RESULTS_PER_PAGE 40
>   SECRET_KEY '********************'
>   SEND_BROKEN_LINK_EMAILS False
>   SERVER_EMAIL 'root at localhost'
>   SESSION_COOKIE_AGE 1209600
>   SESSION_COOKIE_DOMAIN '.dailycamera.com'
>   SESSION_COOKIE_NAME 'hotclub'
>   SETTINGS_MODULE 'dev.settings_bdc_prod'
>   SITE_ID 5
>   SITE_PROFILE_MODULE 'bdc_profiles.bdcprofiles'
>   STATS_SITE_ID 'BDC'
>   STORIES_SORT_BY_DATE_THEN_PRIORITY False
>   TEMPLATE_DEBUG False
>   TEMPLATE_DIRS ('/opt/local/templates/bdc',
> '/opt/local/appserv_bundle/corp_templates',
> '/opt/local/appserv_bundle/ellington_9849/default_templates')
>   TEMPLATE_FILE_EXTENSION '.html'
>   TEMPLATE_LOADERS ('
> dev.apps.Util.parts.filesystem_loader.load_template_source', '
> django.core.template.loaders.app_directories.load_template_source')
>   TEMPLATE_TOOLS_ID 'bdcdev'
>   THRESHHOLD_COOKIE_NAME '45519'
>   THRESHHOLD_LOGIN_URL '/accounts/login/'
>   THRESHHOLD_MAX_VIEWS 500
>   THRESHHOLD_TIMESPAN 2678400
>   THUMB_ALLOWED_WIDTHS (60, 75, 100, 120, 140, 176, 180, 220, 600)
>   TIME_FORMAT 'P'
>   TIME_ZONE 'America/Denver'
>   USE_ETAGS False
>   WRITE_PROFILE_BACK_TO_FF True
>    Database Queries Query Stack  {'time': 'TBD', 'sql': 'SELECT
> "profiles_profiles"."user_id","profiles_profiles"."username","profiles_profiles"."ff_site","profiles_profiles"."ff_user_id","profiles_profiles"."q1","profiles_profiles"."q2","profiles_profiles"."gender","profiles_profiles"."birth_date","profiles_profiles"."postal_address1","profiles_profiles"."postal_address2","profiles_profiles"."postal_city","profiles_profiles"."postal_state","profiles_profiles"."postal_country","profiles_profiles"."postal_code","profiles_profiles"."telephone_number","profiles_profiles"."use_html_for_email","profiles_profiles"."automotive","profiles_profiles"."boating","profiles_profiles"."books","profiles_profiles"."cooking","profiles_profiles"."decorating","profiles_profiles"."entertainment","profiles_profiles"."gardening","profiles_profiles"."golf","profiles_profiles"."health","profiles_profiles"."electronics","profiles_profiles"."home_improvement","profiles_profiles"."internet_and_gaming","profiles_profiles"."music","profiles_profiles"."outdoor_activit
> ies","profiles_profiles"."shopping","profiles_profiles"."sports","profiles_profiles"."finance","profiles_profiles"."technology","profiles_profiles"."travel","profiles_profiles"."esaver","profiles_profiles"."income","profiles_profiles"."remember"
> FROM "profiles_profiles" WHERE "profiles_profiles"."ff_user_id" = 1372967
> AND "profiles_profiles"."ff_site" = BDC ORDER BY
> "profiles_profiles"."username" ASC'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>   {'start_new_request': '1'}
>
> 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
> 500 page.
>
> _______________________________________________
> This message sent by the FRPythoneers mailing list.
> Unsubscribe: echo unsubscribe |
> FRPythoneers-request at lists.community.tummy.com
> URL: http://lists.community.tummy.com/mailman/listinfo/frpythoneers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.community.tummy.com/pipermail/frpythoneers/attachments/20061101/2e4efd7b/attachment.html>


More information about the FRPythoneers mailing list