2011/5/15 Andy McKay <[email protected]>

>
> > Exception Type: TypeError at /admin/main/learndjango/add/
> > Exception Value: 'float' object is not callable
>
>
> Please paste your model that is having the problem.
>

class MyItem(models.Model):
    title=models.CharField(max_length=1024)
    description=models.CharField(max_length=1024)
    price=models.FloatField(default=0.0)
    time=models.DateTimeField()
    name=models.CharField(max_length=256)
    detail=models.CharField(max_length=1024)
    address_city=models.CharField(max_length=36)
    address_area=models.CharField(max_length=36)


    def __unicode__(self):
        return self.title

and the ModelAdmin:

class MyItemAdmin(admin.ModelAdmin):
    list_display=('name','title','price','address_city',)

admin.site.register(MyItem, MyItemAdmin)

Thanks.


> --
>  Andy McKay
>  [email protected]
>  twitter: @andymckay
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


--

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to