data not validating after image field added to model form
I just added am image field to a model form but when I try to upload
an image using the form, it gives me the following error saying that
the data could not be validated. I don't understand though, what is
it about the image that could not be validated? Is there any way to
decipher this from this error?
Environment:
Request Method: POST
Request URL: http://127.0.0.1:8000/registration/
Django Version: 1.3
Python Version: 2.6.6
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
'mysite.books',
'mysite.registration']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware')
Traceback:
File "C:\Python26\lib\site-packages\django\core\handlers\base.py" in
get_response
111. response = callback(request,
*callback_args, **callback_kwargs)
File "C:\Users\Shazeb\django_code\mysite\..\mysite\registration
\views.py" in register
23. reg.save()
File "C:\Python26\lib\site-packages\django\forms\models.py" in save
363. fail_message, commit,
construct=False)
File "C:\Python26\lib\site-packages\django\forms\models.py" in
save_instance
73. " validate." % (opts.object_name,
fail_message))
Exception Type: ValueError at /registration/
Exception Value: The Company could not be created because the data
didn't validate.
--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home