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
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
On Nov 9, 3:00 am, VP <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> How to handle errors from different modules, for example CSV or
> DATETIME in view?
> I am trying to parse CSV content in my view after an uplod a file by
> user.
>
> def my_view(request):
> ...
> try:
> for row in csv.
Hi all,
How to handle errors from different modules, for example CSV or
DATETIME in view?
I am trying to parse CSV content in my view after an uplod a file by
user.
def my_view(request):
...
try:
for row in csv.reader(request.FILES['file']):
for i in range(0, len(row)
4 matches
Mail list logo