Hi, I'm (still) having some problems with django's admin interface. When I try to save changes (or, occasionally, try to view entries, but I suspect it's the same cause) to some of my models (not all, some of them work) I get errors. Any help with deciphering the errors is appreciated!
Here is the traceback which django displays and, below that, I have pasted the model which it is referring to. Environment: Request Method: POST Request URL: http://192.168.178.22:8000/admin/primary_level/advertvacancyprimary/add/ Django Version: 0.97-pre-SVN-7728 Python Version: 2.5.2 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'educationposts.apps.main', 'educationposts.apps.disclaimers', 'educationposts.apps.levels', 'educationposts.apps.accounts', 'educationposts.apps.levels.primary_level', 'educationposts.apps.levels.pre_school', 'educationposts.apps.levels.second_level', 'educationposts.apps.levels.third_level', 'educationposts.apps.levels.other_posts'] Installed Middleware: ('django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'educationposts.apps.accounts.middleware.LoginMiddleware') Traceback: File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in get_response 82. response = callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.5/site-packages/django/contrib/admin/views/decorators.py" in _checklogin 62. return view_func(request, *args, **kwargs) 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/views/main.py" in add_stage 266. LogEntry.objects.log_action(request.user.id, ContentType.objects.get_for_model(model).id, pk_value, force_unicode(new_object), ADDITION) File "/usr/lib/python2.5/site-packages/django/utils/encoding.py" in force_unicode 51. s = unicode(s) Exception Type: TypeError at /admin/primary_level/advertvacancyprimary/add/ Exception Value: coercing to Unicode: need string or buffer, lCategoryOfVacancyLUT found The definition of CategoryOfVacancyLUT is: class lCategoryOfVacancyLUT(models.Model): english = models.CharField(max_length=256) gaeilge = models.CharField(max_length=256) marked_as_deleted = models.BooleanField() def __unicode__(self): return unicode(self.english) Note that I am only having problems with this in the admin interface. All of my own code which reads or writes to these models works perfectly. Is the current version of the admin interface broken? If so, is it safe for me to ignore this (ie, will it magically work in a future version)? I also get other similar errors when modifying some of the other models. If it is useful, I can paste details of those too. Thanks very much! Dan. -- Daniel Kersten. Leveraging dynamic paradigms since the synergies of 1985. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Python Ireland" 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.ie/group/pythonireland?hl=en -~----------~----~----~----~------~----~------~--~---
