Re: Take an integer and string and make one string

2008-07-16 Thread Molly
Awesome, thanks a lot guys, that solved it :) On Jul 16, 11:24 am, "Colin Bean" <[EMAIL PROTECTED]> wrote: > Format strings are your friend: > > "%s: %d" % (self.consequence, self.slope_height_rr) > > Colin > > On Wed, Jul 16, 2008 at 8:14 AM, Molly <[EMAIL PROTECTED]> wrote: > > > I am trying

Re: Take an integer and string and make one string

2008-07-16 Thread Colin Bean
Format strings are your friend: "%s: %d" % (self.consequence, self.slope_height_rr) Colin On Wed, Jul 16, 2008 at 8:14 AM, Molly <[EMAIL PROTECTED]> wrote: > > I am trying to add an integer and a string: > > > def __unicode__

Re: Take an integer and string and make one string

2008-07-16 Thread Chris Webber
String substitution is a bit easier for stuff like this. Try: def __unicode__(self): return u"%s: %s" % (self.consequence, self.slope_height_rr) On Wed, Jul 16, 2008 at 10:14 AM, Molly <[EMAIL PROTECTED]> wrote: > > I am trying to add an integer and a string: > > ===

Re: Take an integer and string and make one string

2008-07-16 Thread Brett Hoerner
On Wed, Jul 16, 2008 at 10:14 AM, Molly <[EMAIL PROTECTED]> wrote: > I am trying to add an integer and a string: I assume self.slope_height_rr is the float? Have you tried turning it into a string before adding it to another string? def __unicode__(self): return self.consequence + ':

Take an integer and string and make one string

2008-07-16 Thread Molly
I am trying to add an integer and a string: def __unicode__(self): return self.consequence + ': ' + self.slope_height_rr When I run my app, I get a