andreirk / django-hotclub

Automatically exported from code.google.com/p/django-hotclub
0 stars 0 forks source link

Got a template error exception just after sending a new message in /messages/compose/ #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Environment:

Request Method: POST
Request URL: http://localhost:8000/messages/compose/
Django Version: 0.97-pre-SVN-8010
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.humanize',
 'django.contrib.markup',
 'notification',
 'emailconfirmation',
 'extensions',
 'robots',
 'dbtemplates',
 'friends',
 'mailer',
 'messages',
 'announcements',
 'django_openidconsumer',
 'django_openidauth',
 'oembed',
 'crashlog',
 'pagination',
 'gravatar',
 'threadedcomments',
 'wiki',
 'timezones',
 'feedutil',
 'app_plugins',
 'voting',
 'tagging',
 'bookmarks',
 'blog',
 'ajax_validation',
 'analytics',
 'profiles',
 'zwitschern',
 'account',
 'tribes',
 'projects',
 'core',
 'things',
 'django.contrib.admin']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django_openidconsumer.middleware.OpenIDMiddleware',
 'profiles.middleware.LocaleMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'djangologging.middleware.LoggingMiddleware',
 'pagination.middleware.PaginationMiddleware',
 'things.middleware.SortOrderMiddleware',
 'crashlog.CrashLogMiddleware')

Template error:
In template /home/roland/Projets et Notes/Creative
Convergence/django-hotclub/projects/pinax/messages/templates/notification/messag
es_sent/plain.txt,
error at line 1
   Caught an exception while rendering: u'message.recipient'
   1 : {% load i18n %} {% blocktrans %} You have sent the message '{{
message }}' to {{ message.recipient }}.{% endblocktrans %}

   2 : 

Traceback:
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in
get_response
  85.                 response = callback(request, *callback_args,
**callback_kwargs)
File "/usr/lib/python2.5/site-packages/django/contrib/auth/decorators.py"
in __call__
  67.             return self.view_func(request, *args, **kwargs)
File "/home/roland/Projets et Notes/Creative
Convergence/django-hotclub/projects/pinax/messages/views.py" in compose
  80.             form.save(sender=request.user)
File "/home/roland/Projets et Notes/Creative
Convergence/django-hotclub/projects/pinax/messages/forms.py" in save
  51.                 notification.send([sender], "messages_sent",
{'message': msg,})
File "/home/roland/Projets et Notes/Creative
Convergence/django-hotclub/projects/pinax/notification/models.py" in send
  234.         messages = get_formatted_messages(formats, label, context)
File "/home/roland/Projets et Notes/Creative
Convergence/django-hotclub/projects/pinax/notification/models.py" in
get_formatted_messages
  179.             'notification/%s' % format), context)
File "/usr/lib/python2.5/site-packages/django/template/loader.py" in
render_to_string
  107.     return t.render(context_instance)
File "/usr/lib/python2.5/site-packages/django/template/__init__.py" in render
  176.         return self.nodelist.render(context)
File "/usr/lib/python2.5/site-packages/django/template/__init__.py" in render
  751.                 bits.append(self.render_node(node, context))
File "/usr/lib/python2.5/site-packages/django/template/debug.py" in render_node
  81.             raise wrapped

Exception Type: TemplateSyntaxError at /messages/compose/
Exception Value: Caught an exception while rendering: u'message.recipient'

Original Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/django/template/debug.py", line
71, in render_node
    result = node.render(context)
  File "/usr/lib/python2.5/site-packages/django/templatetags/i18n.py", line
85, in render
    data = dict([(v, force_unicode(context[v])) for v in vars])
  File "/usr/lib/python2.5/site-packages/django/template/context.py", line
43, in __getitem__
    raise KeyError(key)
KeyError: u'message.recipient'

Original issue reported on code.google.com by frol...@gmail.com on 20 Jul 2008 at 9:10

GoogleCodeExporter commented 9 years ago
I was sending a message to myself for testing purpose.

Original comment by frol...@gmail.com on 20 Jul 2008 at 9:11

GoogleCodeExporter commented 9 years ago
Fixed in django-messages revision 54

Original comment by leidel on 20 Jul 2008 at 9:57