Please paste your model that is having the problem.
--
Andy McKay
an...@clearwind.ca
twitter: @andymckay
Please paste your model that is having the problem.
> Exception Type: TypeError at /admin/main/learndjango/add/
> Exception Value: 'float' object is not callable
--
Andy McKay
an...@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...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
price=models.FloatField(default=0.0)
2011/5/15 Andy McKay <an...@clearwind.ca>Please paste your model that is having the problem.
> Exception Type: TypeError at /admin/main/learndjango/add/
> Exception Value: 'float' object is not callable
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.titleand the ModelAdmin:class MyItemAdmin(admin.ModelAdmin):list_display=('name','title','price','address_city',)admin.site.register(MyItem, MyItemAdmin)
'Decimal' object is not callable
Request Method: | POST |
---|---|
Request URL: | http://localhost:8000/admin/main/myitem/add/ |
Django Version: | 1.3 |
Exception Type: | TypeError |
Exception Value: | 'Decimal' object is not callable |
Exception Location: | C:\Python26\lib\site-packages\django\contrib\admin\options.py in save_model, line 665 |
Python Executable: | C:\Python26\python.exe |
Python Version: | 2.6.6 |
Python Path: | ['D:\\eclipse\\carveout\\d1d2d3\\src\\d1d2d3', 'C:\\Python26\\lib\\site-packages\\markdown-2.0.3-py2.6-win32.egg', 'C:\\Python26\\lib\\site-packages\\html5lib-0.90-py2.6.egg', 'C:\\Python26\\lib\\site-packages\\cheetah-2.4.4-py2.6-win32.egg', 'C:\\Python26\\lib\\site-packages\\tenjin-1.0.2-py2.6.egg', 'C:\\Python26\\lib\\site-packages\\tornado-1.2.1-py2.6.egg', 'C:\\Python26\\lib\\site-packages\\transifex-1.0.0-py2.6.egg', 'C:\\Python26\\lib\\site-packages\\python_magic-0.4.0-py2.6.egg', 'C:\\Python26\\lib\\site-packages\\pygooglechart-0.3.0-py2.6.egg', 'C:\\Python26\\lib\\site-packages\\django_addons-0.6.4-py2.6.egg', 'C:\\Python26\\lib\\site-packages\\feedparser-5.0.1-py2.6.egg', 'C:\\WINDOWS\\system32\\python26.zip', 'C:\\Python26\\DLLs', 'C:\\Python26\\lib', 'C:\\Python26\\lib\\plat-win', 'C:\\Python26\\lib\\lib-tk', 'C:\\Python26', 'C:\\Python26\\lib\\site-packages', 'C:\\Python26\\lib\\site-packages\\PIL'] |
Server time: | Fri, 20 May 2011 00:32:12 +0800 |
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@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...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.