Commits

Jakub Zalewski committed 62658b3

some cleanup

Comments (0)

Files changed (2)

         
     def save(self, user_from, user_to, *args, **kwargs):
         self.instance.user_from = user_from
-        self.instance.user_to = user_to
-        #if self.instance.re > 0:    
-        #    try:
-        #        self.instance.re = Message.objects.get(id=self.instance.re, user_to=user_from, user_from=user_to)
-        #    except Message.DoesNotExist:
-        #        self.instance.re = None
+        self.instance.user_to = user_to        
         mess = super(MessageForm, self).save(*args, **kwargs)
         return mess
     
     return object_list(request, 
         queryset = messages,
         paginate_by = 10, 
-        extra_context = { 'messages': messages },
+        extra_context = { },
         template_object_name = 'message',
         template_name = template
         )
             message.save()
     re_word = ugettext('re: ')
     subject = "%s%s" % (re_word, message.subject.replace(re_word, '')[:40])
-    #subject = message.subject
     form = MessageForm(initial={'subject':subject, 're': id, 'username': message.user_from, }, disable_username=True)
     return render_to_response(template, {'message':message, 'form':form,}, 
                               context_instance=RequestContext(request))