I get the following error when I try and delete a "testcase": Request Method: GET Request URL: http://hades/admin/bisite/testcase/20/delete/ Django Version: 1.0.2 final Python Version: 2.5.2 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.admindocs', 'bisite'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware')
Traceback: File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in get_response 86. response = callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py" in root 157. return self.model_page(request, *url.split('/', 2)) File "/usr/lib/python2.5/site-packages/django/views/decorators/ cache.py" in _wrapped_view_func 44. response = view_func(request, *args, **kwargs) File "/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py" in model_page 176. return admin_obj(request, rest_of_url) File "/usr/lib/python2.5/site-packages/django/contrib/admin/ options.py" in __call__ 195. return self.delete_view(request, unquote(url[:-7])) File "/usr/lib/python2.5/site-packages/django/contrib/admin/ options.py" in delete_view 679. get_deleted_objects(deleted_objects, perms_needed, request.user, obj, opts, 1, self.admin_site) File "/usr/lib/python2.5/site-packages/django/contrib/admin/util.py" in get_deleted_objects 107. nh(deleted_objects, current_depth, [u'%s: %s' % (force_unicode(capfirst(related.opts.verbose_name)), sub_obj), []]) Exception Type: TypeError at /admin/bisite/testcase/20/delete/ Exception Value: coercing to Unicode: need string or buffer, int found but deleting a "job" works just fine. You can see from my testcase model that it does in fact return a string (test_name) I have the following models: class Testcase(models.Model): test_id = models.AutoField(primary_key=True) test_name = models.CharField(max_length=300) src = models.ForeignKey(Source, null=True, blank=True) bitrate = models.IntegerField(null=True, blank=True) test_type = models.CharField(max_length=300) output_resolution = models.CharField(max_length=15, blank=True) description = models.CharField(max_length=3000, blank=True) ref_file = models.CharField(max_length=765, blank=True) ref_encode_filesize = models.IntegerField(null=True, blank=True) ref_y_psnr = models.DecimalField(null=True, max_digits=7, decimal_places=2, blank=True) ref_u_psnr = models.DecimalField(null=True, max_digits=7, decimal_places=2, blank=True) ref_v_psnr = models.DecimalField(null=True, max_digits=7, decimal_places=2, blank=True) ref_yuv_psnr = models.DecimalField(null=True, max_digits=7, decimal_places=2, blank=True) highmark_version = models.CharField(max_length=60, blank=True) def __unicode__(self): return self.test_name class Meta: ordering = ['test_name'] db_table = u'testcase' class Job(models.Model): job_id = models.AutoField(primary_key=True) job_name = models.CharField(max_length=50) server = models.CharField(max_length=25) minute = models.CharField(max_length=10, choices = u.min_choices()) hour = models.CharField(max_length=10, choices = u.hour_choices()) day_of_month = models.CharField(max_length=10, choices = u.dom_choices()) month = models.CharField(max_length=10, choices = u.mon_choices()) day_of_week = models.CharField( max_length=10, choices = u.dow_choices(), help_text = '* If Day of Week is selected, \ Day of Month and Month will be ignored.') logfile_name = models.CharField(max_length=100) new_code = models.BooleanField( help_text = '* Check out new code and compile before running tests.') base_dir = models.CharField( max_length=100, help_text = '* Directory to check code into.') svn_dir = models.CharField(max_length=100, help_text = '* SVN directory to check code out of.') test_dir = models.CharField(max_length=100, help_text = '* Directory to store test files in.') profile = models.ForeignKey(Profile) enable = models.BooleanField( help_text = '* Enable this job for scheduling.') last_run_time = models.DateTimeField(blank=True) next_run_time = models.DateTimeField(blank=True) def save(self, force_insert=False, force_update=False): self.next_run_time = u.update_runtime(self.minute, \ self.hour, \ self.day_of_month, \ self.month, \ self.day_of_week) super(Job,self).save(force_insert, force_update) def __unicode__(self): return self.job_name class Meta: db_table = u'job'
-- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.