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
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__
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:
>
> ===
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 + ':
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
5 matches
Mail list logo