Re: IndentationError :Unexpected Indent

2014-04-28 Thread Dow Street
Based on the code below it looks like your indentation is off for def was_published recently code block (i.e. 3 spaces instead of 4). If that does not solve the problem, you might also check to ensure that you're not mixing tabs and spaces when indenting. Depending on your environment that can

Re: IndentationError :Unexpected Indent

2014-04-28 Thread Rene Zelaya
Ditto from what Andreas said - Python is very sensitive to indentation. If the method 'was_published_recently' is part of the Poll model, then there should be the same amount of indentations before 'def was_published...' as for the 'def __unicode__' method. Then, for uniformity's sake (even th

Re: IndentationError :Unexpected Indent

2014-04-28 Thread Andreas Kuhne
2014-04-28 7:55 GMT+02:00 Kelvin Mwangi : > I have been following up on the tutorial on Python version 1.6 and I got > stuck at an indentation error I can't seem to debug. Its under the first > tutorial of creating Django application and I modified my polls\models.py > file to look like this; > >

IndentationError :Unexpected Indent

2014-04-28 Thread Kelvin Mwangi
I have been following up on the tutorial on Python version 1.6 and I got stuck at an indentation error I can't seem to debug. Its under the first tutorial of creating Django application and I modified my polls\models.py file to look like this; from django.db import models import datetime from

Re: IndentationError: unexpected indent for Django-1.2.1, Python 2.6.4 on ubuntu

2010-06-08 Thread Vasil
o fix the IndentationError: unexpected indent problem. > Thanks. > > $ uname -a > Linux core2quad 2.6.31-17-generic-pae #54-Ubuntu SMP Thu Dec 10 > 17:23:29 UTC 2009 i686 GNU/Linux > > $tar xzvf Django-1.2.1.tar.gz > $cd Django-1.2.1 > $sudo python setup.py install > > $ pyth

IndentationError: unexpected indent for Django-1.2.1, Python 2.6.4 on ubuntu

2010-06-07 Thread albert kao
I downloaded Django-1.2.1 and installed it for Python 2.6.4 on ubuntu. Please help to fix the IndentationError: unexpected indent problem. Thanks. $ uname -a Linux core2quad 2.6.31-17-generic-pae #54-Ubuntu SMP Thu Dec 10 17:23:29 UTC 2009 i686 GNU/Linux $tar xzvf Django-1.2.1.tar.gz $cd Django