This error is similar to ticket #999
http://code.djangoproject.com/ticket/999

I have renamed the field in question to something unique already and adjusted 
the the database to reflect this.  I'm still at a loss what the fix could be. 

Error:
'UserProfile' object has no attribute 'get'
Request Method:         POST
Request URL:    http://sylia.gufymike.com/mm/addmanga/submit/
Exception Type:         AttributeError
Exception Value:        'UserProfile' object has no attribute 'get'
Exception 
Location:     
/usr/lib64/python2.4/site-packages/django/db/models/fields/__init__.py 
in get_manipulator_new_data, line 289

Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/django/core/handlers/base.py" in 
get_response
  77. response = callback(request, *callback_args, **callback_kwargs)
File 
"/home/gufymike/My_Docs/Work_Area/Projects/django-site/floaties/mangamooch/views.py"
 
in add_manga
  78. user_manip.save(user_update)
File "/usr/lib64/python2.4/site-packages/django/db/models/manipulators.py" in 
save
  88. param = f.get_manipulator_new_data(new_data)
File "/usr/lib64/python2.4/site-packages/django/db/models/fields/__init__.py" 
in get_manipulator_new_data
  289. val = new_data.get(self.name, self.get_default())

  AttributeError at /mm/addmanga/submit/
  'UserProfile' object has no attribute 'get'

Class involved:

class UserProfile(models.Model):
        """
        User Profile extends the auth.models.User model.  This contains the 
info related
        to the User for the site.
        """
        user = models.ForeignKey(User, unique=True, 
edit_inline=models.TABULAR, num_in_admin=1,min_num_in_admin=1, 
max_num_in_admin=1,num_extra_on_change=0)
        activation_key = models.CharField(maxlength=40, blank=True)
        key_expires = models.DateTimeField(blank=True)
        my_points = models.FloatField(max_digits=5, decimal_places=2, 
editable=False, default=5, blank=True)
        avatar = models.ImageField(upload_to="users/%Y/%m/%d", 
validator_list=[validators.isValidImage], blank=True, )
        signature = models.TextField(maxlength=200, , core=True, blank=True)
        avrscore = models.FloatField(max_digits=2, decimal_places=1, 
blank=True)
        ipaddr = 
models.IPAddressField(validator_list=[validators.isValidIPAddress4], 
blank=True)
        newmess = models.BooleanField(editable=False, default=False, 
blank=True, null=True)


code its breaking on:
                        userprofile_data = UserProfile.objects.get(user = 
request.user.id)
                        user_manip = 
UserProfile.ChangeManipulator(userprofile_data.id)
                        new_points = 
calc_points(user_data.get_profile().my_points, new_data['condition'], 
new_data['language'])
                        user_update = UserProfile(my_points = new_points)
                        user_manip.save(user_update)

Thanks 
-- 
A mouse is an elephant built by the Japanese.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to