Hi Jan
I think you need a comma after the ('VHS','VHS') line in the ITEM_TYPE
Like this
ITEM_TYPES = ( ('VHS','VHS'),
('CD','CD'),
('VHS','VHS'),
)
It might not fix all your problems, but it's a start
On 30/09/2007, Jan Stavel <[EMAIL PROTECTED]> wrote:
>
> Hello,
> I tried to fill this Item with data (non english texts): (Django version
> 0.97-pre-SVN-unknown)
>
> class StoreItem(models.Model):
> ITEM_TYPES = ( ('VHS','VHS'),
> ('CD','CD'),
> ('VHS','VHS')
> )
> class Admin:
> list_display = ('name', 'code', 'cmat', 'specification',
> 'lowlimitquantity', 'highlimitquantity',
> 'quantity',
> 'itemtype',
> 'group',
> 'picture',
> 'producer',
> )
> list_filter = ('name', 'code',
> 'producer'
> )
> search_fields = ('name', 'code', 'cmat')
> pass
>
> code = models.CharField(maxlength=12, unique=True)
> cmat = models.TextField()
> objversion = models.IntegerField()
> name = models.TextField()
> specification = models.TextField()
> datemodify = models.DateTimeField()
> lowlimitquantity = models.IntegerField()
> highlimitquantity = models.IntegerField()
> haslowlimit = models.BooleanField(default=False)
> quantity = models.IntegerField(default=0)
>
> itemtype = models.CharField('type',maxlength=16,choices=ITEM_TYPES)
> group = models.ForeignKey(Group)
> picture = models.ForeignKey(Picture)
> producer = models.ForeignKey(cdbazar.contacts.models.Firm)
>
> def __unicode__(self):
> return u"%s (%s)" % (self.name, self.code)
>
>
> The first attempt passed.
>
> But at the second item insertion I gave this error:
> InternalError at /admin/store/storeitem/ (1, "Can't create/write to file
> '/var/lib/mysql/tmp/#sql_2182_0.MYI' (Errcode: 2)") Request Method: GET
> Request
> URL: http://localhost:8000/admin/store/storeitem/ Exception Type:
> InternalError Exception Value: (1, "Can't create/write to file
> '/var/lib/mysql/tmp/#sql_2182_0.MYI' (Errcode: 2)") Exception Location:
> build/bdist.linux-i686/egg/MySQLdb/connections.py
> in defaulterrorhandler, line 35 Python Executable: /usr/bin/python Python
> Version: 2.4.2
> Template error
>
> In template
> /usr/local/lib/python2.4/site-packages/django/contrib/admin/templates/admin/filters.html,
> error at line *5*
> Caught an exception while rendering: (1, "Can't create/write to file
> '/var/lib/mysql/tmp/#sql_2182_0.MYI' (Errcode: 2)") 1 {% load admin_list
> %} 2 {% load i18n %} 3 {% if cl.has_filters %}<div
> id="changelist-filter"> 4 <h2>{% trans 'Filter' %}</h2> 5 {% for spec in
> cl.filter_specs %} 6 {% filter cl spec %} 7 {% endfor %}</div>{% endif
> %} 8
>
> Now I can neither insert new item nor list inserted items in storeitem.
>
> Please could you show me a way to find an error?
>
> Thanks,
> Jan Stavel
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---