Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Environment:
- Request Method: POST
- Request URL: http://localhost:8000/upload/
- Django Version: 1.7
- Python Version: 2.7.3
- Installed Applications:
- ('django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'expe',
- 'upload')
- Installed Middleware:
- ('django.contrib.sessions.middleware.SessionMiddleware',
- 'django.middleware.common.CommonMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',
- 'django.middleware.clickjacking.XFrameOptionsMiddleware')
- Traceback:
- File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
- 114. response = wrapped_callback(request, *callback_args, **callback_kwargs)
- File "/home/urbanslug/code/python/django/accounts/upload/views.py" in UploadView
- 19. obj.uploaded_file.save(instance, filename)
- File "/usr/lib/python2.7/dist-packages/django/db/models/fields/files.py" in save
- 86. name = self.field.generate_filename(self.instance, name)
- File "/usr/lib/python2.7/dist-packages/django/db/models/fields/files.py" in generate_filename
- 280. return os.path.join(self.get_directory_name(), self.get_filename(filename))
- File "/usr/lib/python2.7/dist-packages/django/db/models/fields/files.py" in get_filename
- 277. return os.path.normpath(self.storage.get_valid_name(os.path.basename(filename)))
- File "/usr/lib/python2.7/posixpath.py" in basename
- 112. i = p.rfind('/') + 1
- File "/usr/lib/python2.7/dist-packages/django/utils/functional.py" in inner
- 214. return func(self._wrapped, *args)
- Exception Type: AttributeError at /upload/
- Exception Value: 'User' object has no attribute 'rfind'
Advertisement
Add Comment
Please, Sign In to add comment