2011/5/15 Andy McKay <a...@clearwind.ca>

>
> > 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
>  a...@clearwind.ca
>  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 django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> 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 django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to