On Tue, Feb 21, 2012 at 5:18 PM, Daniel Marquez
wrote:
> Wow, I should've caught that. Thanks guys. However, since I needed a
> string, what I did was add "default=x" to the integer field as
> follows:
>
> class Phone(models.Model):
> phonenumber =
On Tue, Feb 21, 2012 at 12:18 PM, Daniel Marquez <
daniel.marquez0...@gmail.com> wrote:
> Wow, I should've caught that. Thanks guys. However, since I needed a
> string, what I did was add "default=x" to the integer field as
> follows:
>
> class Phone(models.Model):
>phonenumber =
Wow, I should've caught that. Thanks guys. However, since I needed a
string, what I did was add "default=x" to the integer field as
follows:
class Phone(models.Model):
phonenumber = models.IntegerField(default=10)
pub_date = models.DateTimeField('date published')
def
As an aside, I would assume you want your phone number field to be a string
(models.CharField) instead of integer.
Furbee
On Mon, Feb 20, 2012 at 2:39 PM, Babatunde Akinyanmi
wrote:
> @Daniel
> Your __unicode__ should always return a string so like Shawn said,
> when you
@Daniel
Your __unicode__ should always return a string so like Shawn said,
when you check your phone model, its __unicode__ method should be
returning str() or unicode() not int
On 2/20/12, Shawn Milochik wrote:
> Read the error message in your subject line. Then look at the
Read the error message in your subject line. Then look at the
__unicode__ method of your Phone model. It appears that this is the
problem, and not the Device model.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send
Hey all,
I am a beginner django user. I am going through the tutorial, but when
I post the following I get the TypeError: coercing to unicode:
class Phone(models.Model):
phonenumber = models.IntegerField()
pub_date = models.DateTimeField('date published')
def
On Tuesday 05 January 2010 21:01:44 Karen Tracey wrote:
> ...
> Change this to return unicode(self.coupleid)
>
Thanks!
signature.asc
Description: This is a digitally signed message part.
On Tue, Jan 5, 2010 at 8:32 PM, E. Hakan Duran wrote:
>def __unicode__(self):
>return self.coupleid
> ---
>
>
Change this to return unicode(self.coupleid)
Karen
--
You received this message because you are subscribed to the Google Groups "Django users"
Hi all,
I am just following the tutorial with minimal coding
skills/knowledge.
I have a models.py file part of which is shown below:
---
# -*- coding: utf-8 -*-
from django.db import models
import datetime
# Create your models here.
class Couple(models.Model):
coupleid =
10 matches
Mail list logo