mousadialo / django-profile

Automatically exported from code.google.com/p/django-profile
BSD 2-Clause "Simplified" License
2 stars 0 forks source link

Problem with avatar upload #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I am using old revision of django-profile, when i try to upload an
avatar i have 

AttributeError at /accounts/profile/edit/avatar/
'InMemoryUploadedFile' object has no attribute 'content'

Im using the new trunk of Django (I've modiffied django-profile to use
newforms-admin). I won't use new trunk of django-profile because is very
different than the old version. The models have different names etc (My app
is integrated with the old)

Any hints?

Original issue reported on code.google.com by artur.s...@gmail.com on 17 Aug 2008 at 12:10

GoogleCodeExporter commented 8 years ago
Hi Artur,
you can continue with the old django-profile version changing some code to 
complain
the last django backward incompatible changes:

http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#ChangedthewayURL
pathsaredetermined

Or you can upgrade to the last django-profile version, making a backup and port 
of
your data.

I can help you if you want. Please, could you write your problem to the Google 
Group
so anyone reading it can get information about these issues? I will respond to 
you
inmediatly.

http://groups.google.com/group/django-profile

Original comment by david.ru...@gmail.com on 17 Aug 2008 at 1:39

GoogleCodeExporter commented 8 years ago
Thanks for reply :) I am porting my data for new django-profile svn trunk ;) 
I'll
post my djang-profile code changes to group when i get done ;)

Original comment by artur.s...@gmail.com on 17 Aug 2008 at 3:24

GoogleCodeExporter commented 8 years ago
You can try using photo.data, if you are using the latest django, you may want 
to use 
photo.read(). But then I encountered another problem which is:

AttributeError at /accounts/profile/edit/avatar/
'Profile' object has no attribute 'save_avatartemp_file'

I am using Django 1.0 with django-profile 0.5. Before I migrate to 0.6, I want 
to 
understand if there's a quick fix for that. Any ideas?

Original comment by waifun...@gmail.com on 23 Oct 2008 at 8:54

GoogleCodeExporter commented 8 years ago
Django 1.0 changed a lot of things, making some of them backwards incompatible.

Now you must use profile.avatartemp.save() instead of save_avatartemp_file [0]

But I recommend you to upgrade to django-profile 0.6, I can help you to use this
version, because it's the main version compatible with django-1.0

[0]
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Filestoragerefac
toring

Original comment by david.ru...@gmail.com on 23 Oct 2008 at 6:31