__unicode__ in tutorial part 1

2011-04-12 Thread darekodz
I'm using instant django which have: Python 2.7.1 and Django 1.2.4. When I add def __unicode__(self): return self.question and def __unicode__(self): return self.choice to my class I have errors when I want to restart shell, like: C:\django\mysite>python manage.py syncd

Re: __unicode__ in tutorial part 1

2011-04-12 Thread Jirka Vejrazka
> IndentationError: unexpected indent > > I don't know what's wrong - Can You help me? It's exactly what it says - indentation is important in Python and number for spaces (or tabs) on that line does not match the rest of your file. Or you mixed tabs and spaces. HTH Jirka -- You received

Re: __unicode__ in tutorial part 1

2011-04-12 Thread Rafael Durán Castañeda
I think last line from traceback is enough: IndentationError: unexpected indent 2011/4/12 darekodz > I'm using instant django which have: Python 2.7.1 and Django 1.2.4. > When I add > >def __unicode__(self): >return self.question > > and > >def __unicode__(self): >return

Re: __unicode__ in tutorial part 1

2011-04-12 Thread Abhijeet Rastogi
May be you have copy-pasted the code from somewhere. May be you are using a TAB instead of 4-spaces or the other way round. Its a python question. You should brush-up your python skills before getting to django. Start with a book like "dive into python". On Wed, Apr 13, 2011 at 1:15 AM, darekodz

Re: __unicode__ in tutorial part 1

2011-04-12 Thread darekodz
It works!! THANK YOU EVERYBODY On 12 Kwi, 22:21, Rafael Durán Castañeda wrote: > I think last line from traceback is enough: > > IndentationError: unexpected indent > > 2011/4/12 darekodz > > > > > > > > > I'm using instant django which have: Python 2.7.1 and Django 1.2.4. > > When I add > > >