On Nov 9, 12:28 pm, VP <[EMAIL PROTECTED]> wrote:
> Unfortunatelly I don't know how to get that traceback.
> If the exception happens from a model e.g.
>
> try:
>     b = Blog.objects.get(id = 1)
> except Blog.DoesNotExist:
>     b = Blog(name = 'MyBlog')
>     b.save()
>     b = b.id
>
> It works very well. But following not:
>
> try:
>     for row in csv.reader(request.FILES['file']):
>         for i in range(0, len(row)):
>             if not row[i].strip(): row[i] = 'None'
> except csv.Error, e:
>     csv_error = e
>
> or
>
> try:
>     discount = int(row[5])
> except ValueError:
>     csv_error = 'Bla Bla Bla'
>
> When I am passing csv_error into my template I couldn't see this error
> in my browser.
>

Sorry, I'm still not understanding the problem. Please can you post
your template and views code (preferably on dpaste.com) and I will
take a look.
--
DR.
--~--~---------~--~----~------------~-------~--~----~
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