Re: return number instead of string in admin

2010-07-14 Thread Subhranath Chunder
Alan, This is simple python string formatting. You may refer to the following for more details: http://docs.python.org/library/stdtypes.html#string-formatting Thanks, Subhranath Chunder. On Wed, Jul 14, 2010 at 5:31 PM, alan-l wrote: > brilliant, thank you. > > is there a python or django page

Re: return number instead of string in admin

2010-07-14 Thread alan-l
brilliant, thank you. is there a python or django page that layouts all the available options that can be after the percentage and what they mean? Thanks, Alan On Jul 14, 11:35 am, Subhranath Chunder wrote: > Try this instead: > > def __unicode__(self): >    return u"%d" % (self.mynumber, ) >

Re: return number instead of string in admin

2010-07-14 Thread Subhranath Chunder
Try this instead: def __unicode__(self): return u"%d" % (self.mynumber, ) On Wed, Jul 14, 2010 at 3:57 PM, Nuno Maltez wrote: > Hi, > > Why not > > def __unicode__(self): >return u"%d" % self.mynumber > > ? > > Nuno > > On Wed, Jul 14, 2010 at 11:15 AM, alan-l > wrote: > > Hi, > > > >

Re: return number instead of string in admin

2010-07-14 Thread Nuno Maltez
Hi, Why not def __unicode__(self): return u"%d" % self.mynumber ? Nuno On Wed, Jul 14, 2010 at 11:15 AM, alan-l wrote: > Hi, > > in the tutorial i see that to return a string or a combination of > strings, i can do: >    def __unicode__(self): >        return u'%s %s' % (self.firstname, s