I have a custom context processor that is in my settings file, so it is being called on each request. When making any request, I receive the following error.
Traceback (most recent call last): File "c:\Python24\lib\site-packages\django\core\handlers\base.py" in get_response 77. response = callback(request, *callback_args, **callback_kwargs) File "c:\Python24\lib\site-packages\django\contrib\admin\views \decorators.py" in _checklogin 65. return _display_login_form(request, message) File "c:\Python24\lib\site-packages\django\contrib\admin\views \decorators.py" in _display_login_form 28. }, context_instance=template.RequestContext(request)) File "c:\Python24\lib\site-packages\django\template\context.py" in __init__ 100. self.update(processor(request)) File "C:\djangosites\AGD\..\AGD\context_processors.py" in member 5. member = Member.objects.get(user=request.user) File "c:\Python24\lib\site-packages\django\db\models\manager.py" in get 73. return self.get_query_set().get(*args, **kwargs) File "c:\Python24\lib\site-packages\django\db\models\query.py" in get 250. obj_list = list(clone) File "c:\Python24\lib\site-packages\django\db\models\query.py" in __iter__ 108. return iter(self._get_data()) File "c:\Python24\lib\site-packages\django\db\models\query.py" in _get_data 470. self._result_cache = list(self.iterator()) File "c:\Python24\lib\site-packages\django\db\models\query.py" in iterator 183. cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params) File "c:\Python24\lib\site-packages\django\db\backends\util.py" in execute 24. self.db.queries.append({ TypeError at /admin/ __str__ returned non-string (type instance) All of my __str__ methods are returning strings according to the model. class Member(models.Model): user = models.OneToOneField(User, db_index=True) chapter = models.ForeignKey(Chapter) status = models.ForeignKey(ChapterStatus) initiation_number = models.CharField(maxlength=5, blank=True, null=True, unique=True) initiation_date = models.DateField('date initiated', blank=True, null=True) maiden_name = models.CharField(maxlength=25, blank=True, null=True) advisor = models.BooleanField(null=True) married_to_big_brother = models.BooleanField(null=True) facebook_id = models.CharField(maxlength=15, blank=True, null=True) sister_daughters = models.ManyToManyField('self', filter_interface=models.HORIZONTAL, blank=True) comments = models.TextField(maxlength=200, blank=True) def __str__(self): return '%s %s (%s)' % (self.user.first_name, self.user.last_name, self.status) class Admin: pass The context processor is very simple. from AGD.AGDWeb.models import Member def member(request): try: member = Member.objects.get(user=request.user) ... return_dict = {'member': member} except Member.DoesNotExist: return_dict = {} return return_dict This only seems to happen when I do not have a member record defined for my current user. What does this error mean? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---