Hi,

I am attempting to add a domain to a domain administrator account within the
Baruwa web interface.  Below is the debug traceback I am getting. It appears
that it is expecting an email address rather than just the domain? 
Additionally, I am using the superuser account I created during install to
create the domain admin account and add the domain to that domain admin
account. Any ideas?

Environment:


Request Method: POST
Request URL: http://baruwa.domain.com/accounts/add/domain/2/

Django Version: 1.3
Python Version: 2.7.2
Installed Applications:
['baruwa.fixups',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'baruwa.auth',
 'baruwa.accounts',
 'baruwa.messages',
 'baruwa.lists',
 'baruwa.reports',
 'baruwa.status',
 'baruwa.config',
 'djcelery',
 'south']
Installed Middleware:
('django.middleware.gzip.GZipMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/usr/lib/pymodules/python2.7/django/core/handlers/base.py" in
get_response
  111.                         response = callback(request, *callback_args,
**callback_kwargs)
File "/usr/lib/pymodules/python2.7/django/contrib/auth/decorators.py" in
_wrapped_view
  23.                 return view_func(request, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/baruwa/utils/decorators.py" in _inner
  35.         return function(request, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/baruwa/accounts/views.py" in add_address
  243.         if form.is_valid():
File "/usr/lib/pymodules/python2.7/django/forms/forms.py" in is_valid
  121.         return self.is_bound and not bool(self.errors)
File "/usr/lib/pymodules/python2.7/django/forms/forms.py" in _get_errors
  112.             self.full_clean()
File "/usr/lib/pymodules/python2.7/django/forms/forms.py" in full_clean
  268.         self._clean_form()
File "/usr/lib/pymodules/python2.7/django/forms/forms.py" in _clean_form
  296.             self.cleaned_data = self.clean()
File "/usr/lib/pymodules/python2.7/baruwa/accounts/forms.py" in clean
  158.                 del cleaned_data['address']

Exception Type: KeyError at /accounts/add/domain/2/
Exception Value: 'address'

Some detail from the trace:

usr/lib/pymodules/python2.7/baruwa/accounts/forms.py in clean 
151.                error_msg = _('provide a valid domain address')
152.                self._errors["address"] = ErrorList([error_msg])
153.                del cleaned_data['address']
154.        else:
155.            if not email_re.match(address):
156.                error_msg = _('provide a valid email address')
157.                self._errors["address"] = ErrorList([error_msg])
158.                del cleaned_data['address'] ...
159.        return cleaned_data
160.
161.    class Meta:
162.        model = UserAddresses
163.        exclude = ('id', 'address_type')
164.

Detail from line 158:
Variable Value 
account <UserProfile: User profile for: admin> 
cleaned_data {'enabled': True, 'load_balance': False, 'user': <User: admin>} 
self <baruwa.accounts.forms.UserAddressForm object at 0x223d734c> 
user <User: admin> 
address u'domain.com' 
error_msg u'provide a valid email address' 

Thanks,

Jeff



--
View this message in context: 
http://baruwa-users-list.963389.n3.nabble.com/Unable-to-Add-Domain-to-Domain-Administrator-tp3619177p3619177.html
Sent from the Baruwa users list mailing list archive at Nabble.com.
_______________________________________________
Keep Baruwa FREE - http://pledgie.com/campaigns/12056

Reply via email to