aamalig / django-profile

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

Django-Profile have errors in handlers when uploading avatars #75

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Django error as follows:

File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-
py2.6.egg/django/core/handlers/base.py" in get_response
  92.                 response = callback(request, *callback_args, 
**callback_kwargs)
File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-
py2.6.egg/django/contrib/auth/decorators.py" in __call__
  78.             return self.view_func(request, *args, **kwargs)
File "/home/trantuananh/public_html/sample_net/ovso/userprofile/views.py" in 
avatarchoose
  230.         request.upload_handlers.insert(0, QuotaUploadHandler())
File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-
py2.6.egg/django/utils/datastructures.py" in complain
  395.             raise AttributeError, self.warning

Exception Type: AttributeError at /accounts/profile/edit/avatar/
Exception Value: You cannot alter upload handlers after the upload has been 
processed.

I am using Ubuntu, Apache 2, and mod_wsgi. Please help me. Thanks!

Original issue reported on code.google.com by megafire...@gmail.com on 9 Dec 2009 at 3:32

GoogleCodeExporter commented 8 years ago
Same with
Ubuntu nginx + uwsgi and django 1.2 Dev

Original comment by fo3nik5 on 3 Feb 2010 at 12:43

GoogleCodeExporter commented 8 years ago
Environment:

Request Method: POST
Request URL: http://XXXX/accounts/profile/edit/avatar/
Django Version: 1.2 alpha 1
Python Version: 2.6.4
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.humanize',
 'django.contrib.markup',
 'django.contrib.messages',
 'website.apps.common',
 'website.apps.sysop',
 'website.apps.analytics',
 'website.apps.about',
 'website.apps.profile',
 'userprofile',
 'markitup',
 'uni_form',
 'debug_toolbar']
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.middleware.http.ConditionalGetMiddleware',
 'django.middleware.gzip.GZipMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.transaction.TransactionMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'debug_toolbar.middleware.DebugToolbarMiddleware')

Traceback:
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py" in 
get_response
  101.                     response = callback(request, *callback_args, 
**callback_kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/utils/decorators.py" in 
__call__
  36.         return self.decorator(self.func)(*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/auth/decorators.py" 
in 
_wrapped_view
  24.                 return view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/userprofile-0.6-
py2.6.egg/userprofile/views.py" in avatarchoose
  230.         request.upload_handlers.insert(0, QuotaUploadHandler())
File "/usr/local/lib/python2.6/dist-packages/django/utils/datastructures.py" in 
complain
  403.             raise AttributeError(self.warning)

Exception Type: AttributeError at /accounts/profile/edit/avatar/
Exception Value: You cannot alter upload handlers after the upload has been 
processed.

Original comment by fo3nik5 on 3 Feb 2010 at 1:06

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
'django.middleware.csrf.CsrfViewMiddleware',

Should be responsible for this error...

Original comment by fo3nik5 on 3 Feb 2010 at 7:39

GoogleCodeExporter commented 8 years ago
i added correct csrf support for django 1.2 in r427

Original comment by stephane.angel on 26 Apr 2010 at 4:30

GoogleCodeExporter commented 8 years ago
Still have this problem. My env:
Django Version: 1.2 beta 1 SVN-13067
Python Version: 2.6.5
django-profile: current trunk (with csrf fixes in avatar templates)

Original comment by ilya.lindberg on 2 May 2010 at 12:59

GoogleCodeExporter commented 8 years ago
I just got the same problem with 
SVN : 454
Django : 1.2.1

Any suggestion ?

Original comment by alph...@gmail.com on 12 Jun 2010 at 5:37