Re: 'unicode' object has no attribute 'user' when sending e-mail

2009-07-07 Thread alecs
Shit! Great thanks, Tracey! You are absolutely right! I've made a stupid mistake even for a beginner! I redifined send_mail in my app :(( Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: 'unicode' object has no attribute 'user' when sending e-mail

2009-07-07 Thread Karen Tracey
com', auth_password = > 'gfhjkm_') > File "/usr/lib/pymodules/python2.6/django/contrib/auth/decorators.py" > in __call__ > 66. if self.test_func(request.user): > > Exception Type: AttributeError at /alex/urlsend/ > Exception Value: 'unicode' object has no at

Re: 'unicode' object has no attribute 'user' when sending e-mail

2009-07-07 Thread alecs
ilez/filezupload/views.py" in urlsend 186. auth_user = 'u...@exmpl.com', auth_password = 'gfhjkm_') File "/usr/lib/pymodules/python2.6/django/contrib/auth/decorators.py" in __call__ 66. if self.test_func(request.user): Exception Type: AttributeError at /alex/urlsen

Re: 'unicode' object has no attribute 'user' when sending e-mail

2009-07-07 Thread Karen Tracey
On Tue, Jul 7, 2009 at 2:45 AM, alecs wrote: > > I'm trying to send a e-mail, but getting this error. Don't know what > to do... Any ideas? > Thanks in advance. > > def urlsend(request, username): >if request.method == 'POST': >form = SendMailForm(request.POST) >

Re: 'unicode' object has no attribute 'user' when sending e-mail

2009-07-07 Thread alecs
I've found a response for a similar problem: "Seems that the session middleware not active. It should append the user object to the request object." But can't understand how to solve the problem... Actually I'm getting to a page from which I'm sending a e-mail via GET:

Re: 'unicode' object has no attribute 'user' when sending e-mail

2009-07-07 Thread alecs
Tried to embrace in [] - no effect ... http://pastebin.com/m6437076d --~--~-~--~~~---~--~~ 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

Re: 'unicode' object has no attribute 'user' when sending e-mail

2009-07-07 Thread Daniel Roseman
On Jul 7, 7:45 am, alecs wrote: > I'm trying to send a e-mail, but getting this error. Don't know what > to do... Any ideas? > Thanks in advance. > > def urlsend(request, username): >     if request.method == 'POST': >         form = SendMailForm(request.POST) >         if

'unicode' object has no attribute 'user' when sending e-mail

2009-07-07 Thread alecs
I'm trying to send a e-mail, but getting this error. Don't know what to do... Any ideas? Thanks in advance. def urlsend(request, username): if request.method == 'POST': form = SendMailForm(request.POST) if form.is_valid(): subject = form.cleaned_data['subject']

Re: 'unicode' object has no attribute 'user'

2008-09-18 Thread Jens Diemer
Seems that the session middleware not active. It should append the user object to the request object. laspal schrieb: > I am trying to send mail using sendmail. Getting the error 'unicode' > object has no attribute 'user' ... > request.user.message_set.create(mess

'unicode' object has no attribute 'user'

2008-09-18 Thread laspal
Hi, I am trying to send mail using sendmail. Getting the error 'unicode' object has no attribute 'user' My view function: def send_mail(request): _user = request.user sender = _user.email mailing_list = [] if request.method != 'POST': emailform = EmailForm