Hi Greg,
Make sure you are consistently using tabs or spaces for indentation.
Most people set their editors to replace a tab with four spaces. I
would recommend this configuration. Python will get confused if you
start mixing tabs and spaces.

-Benjamin

On Jul 27, 2:59 pm, Greg <[EMAIL PROTECTED]> wrote:
> I have the following view:
>
> def addpad(request):
>         if request.method == 'POST':
>                 pads = request.session.get('pad', [])
>                 i = 1
>                 b = 1
>                 for a in request.POST:
>                         if a != '---':
>                                 opad = RugPad.objects.get(id=b)
>                                 s = opad.size
>                                 p = opad.price
>                                 pads.append({'size': s, 'price': p})
>                                 request.session['pad'] = pads
>                         b  = b + 1 # This is where it says the indent
> is wrong
>                 return render_to_response('addpad.html', {'spad':
> request.session['pad']})
>
> However, in the second to last line 'b = b + 1' it says that the
> indent is wrong.  However, I have this the same as my indent for my if
> statement.  I though that this would be correct.  Any suggestions?
>
> Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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