keokilee / makahiki

An open source framework for creating dorm energy competitions using Django and Pinax.
http://code.google.com/p/kukui-cup
12 stars 8 forks source link

Adding activity member manually causes error #384

Closed rbrewer closed 12 years ago

rbrewer commented 13 years ago

If an admin tries to add an Activity Member object manually, they get a 500 error, but no traceback on evaluation instance. On dev instance, this is the traceback:


Environment:

Request Method: GET
Request URL: http://dasha.ics.hawaii.edu:8150/admin/activities/activitymember/add/

Django Version: 1.3
Python Version: 2.6.1
Installed Applications:
['pages.view_activities',
 'pages.view_profile',
 'pages.view_energy',
 'pages.view_help',
 'pages.view_canopy',
 'pages.home',
 'pages.landing',
 'pages.news',
 'pages.mobile',
 'pages.view_prizes',
 'components.activities',
 'components.api',
 'components.ask_admin',
 'components.canopy',
 'components.energy_goals',
 'components.floors',
 'components.help_topics',
 'components.logging',
 'components.makahiki_auth',
 'components.makahiki_avatar',
 'components.makahiki_badges',
 'components.makahiki_base',
 'components.makahiki_facebook',
 'components.makahiki_notifications',
 'components.makahiki_profiles',
 'components.makahiki_themes',
 'components.prizes',
 'components.quests',
 'components.resources',
 'components.standings',
 'lib.django_cas',
 'lib.brabeion',
 'lib.minidetector',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.humanize',
 'django.contrib.messages',
 'pinax.templatetags',
 'emailconfirmation',
 'mailer',
 'pagination',
 'timezones',
 'ajax_validation',
 'uni_form',
 'dbtemplates',
 'staticfiles',
 'django_extensions',
 'account',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'sorl.thumbnail',
 'frontendadmin',
 'attachments',
 'django.contrib.markup',
 'django_generic_flatblocks',
 'django_generic_flatblocks.contrib.gblocks',
 'indexer',
 'paging',
 'sentry',
 'sentry.client',
 'south']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'account.middleware.LocaleMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'pagination.middleware.PaginationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.middleware.csrf.CsrfResponseMiddleware',
 'lib.django_cas.middleware.CASMiddleware',
 'components.makahiki_profiles.middleware.LoginTrackingMiddleware',
 'lib.minidetector.Middleware',
 'pages.home.middleware.CheckSetupMiddleware',
 'components.logging.middleware.LoggingMiddleware')

Traceback:
File "/Users/kukuicup/Envs/kukuicup/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/Users/kukuicup/Envs/kukuicup/lib/python2.6/site-packages/django/contrib/admin/options.py" in wrapper
  307.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "/Users/kukuicup/Envs/kukuicup/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapped_view
  93.                     response = view_func(request, *args, **kwargs)
File "/Users/kukuicup/Envs/kukuicup/lib/python2.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  79.         response = view_func(request, *args, **kwargs)
File "/Users/kukuicup/Envs/kukuicup/lib/python2.6/site-packages/django/contrib/admin/sites.py" in inner
  197.             return view(request, *args, **kwargs)
File "/Users/kukuicup/Envs/kukuicup/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapper
  28.             return bound_func(*args, **kwargs)
File "/Users/kukuicup/Envs/kukuicup/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapped_view
  93.                     response = view_func(request, *args, **kwargs)
File "/Users/kukuicup/Envs/kukuicup/lib/python2.6/site-packages/django/utils/decorators.py" in bound_func
  24.                 return func(self, *args2, **kwargs2)
File "/Users/kukuicup/Envs/kukuicup/lib/python2.6/site-packages/django/db/transaction.py" in inner
  217.                 res = func(*args, **kwargs)
File "/Users/kukuicup/Envs/kukuicup/lib/python2.6/site-packages/django/contrib/admin/options.py" in add_view
  900.             form = ModelForm(initial=initial)
File "/Users/kukuicup/staging/makahiki/apps/components/activities/admin.py" in __init__
  274.     if self.instance and member and member.activity.has_variable_points:
File "/Users/kukuicup/Envs/kukuicup/lib/python2.6/site-packages/django/db/models/fields/related.py" in __get__
  301.                 raise self.field.rel.to.DoesNotExist

Exception Type: DoesNotExist at /admin/activities/activitymember/add/
Exception Value: 
yongwen commented 12 years ago

migrate to makahiki2 in csdl repo.