Re: Error (EXTERNAL IP): /add_comment/10/

2011-05-11 Thread Aragorn
Thanks !!! Now it works great! On 10 Mag, 00:29, Ulrich Petri wrote: > > message = "Comment was was added to '%s' by '%s': \n\n%s" % (self.post, > > self.author, self.body) > > Most likely your users are posting utf-8 data which you are trying to insert > into a byte string . > > To fix this c

Re: Error (EXTERNAL IP): /add_comment/10/

2011-05-09 Thread Ulrich Petri
> message = "Comment was was added to '%s' by '%s': \n\n%s" % (self.post, > self.author, self.body) Most likely your users are posting utf-8 data which you are trying to insert into a byte string . To fix this change that line to: message = u"Comment was was added to '%s' by '%s': \n\n%s" % (s

Re: Error (EXTERNAL IP): /add_comment/10/

2011-05-09 Thread Aragorn
This is line 44: message = "Comment was was added to '%s' by '%s': \n\n%s" % (self.post, self.author, self.body) another one more thing I do not understand, I put 6 post in the blog , where I insert the comment to Nr. 4 in the article the comment is accepted and I get e-mail. When I put the co

Re: Error (EXTERNAL IP): /add_comment/10/

2011-05-07 Thread Aragorn
...views.py def add_comment(request, pk): """Add a new comment.""" p = request.POST if p.has_key("body") and p["body"]: author = "Anonymous" if p["author"]: author = p["author"] comment = Comment(post=Post.objects.get(pk=pk)) # save comment form

Re: Error (EXTERNAL IP): /add_comment/10/

2011-05-07 Thread Aragorn
Hi, this is code for mail send: def save(self, *args, **kwargs): """Email when a comment is added.""" if "notify" in kwargs and kwargs["notify"] == True: message = "Comment was was added to '%s' by '%s': \n\n%s" % (self.post, self.author, self.body) from_add

Re: Error (EXTERNAL IP): /add_comment/10/

2011-05-07 Thread Aragorn
Hello, I tried it runserver on the production server and does not work! I made some mistakes in copying the code? On 4 Mag, 15:30, Xavier Ordoquy wrote: > Hi, > > Have you tried the development server (runserver) on the computer that runs > the wsgy ? > What LANG does apache declares (/etc/apach

Re: Error (EXTERNAL IP): /add_comment/10/

2011-05-07 Thread Aragorn
Hi, this is code for mail send: def save(self, *args, **kwargs): """Email when a comment is added.""" if "notify" in kwargs and kwargs["notify"] == True: message = "Comment was was added to '%s' by '%s': \n\n%s" % (self.post, self.author, self.body) from_a

Re: Error (EXTERNAL IP): /add_comment/10/

2011-05-04 Thread David Markey
sqlite3 uses unicode by default so you should be ok. Is that the full stack trace? Can you post another? On 4 May 2011 13:06, Aragorn wrote: > Sqlite3 > > On 4 Mag, 13:50, David Markey wrote: > > What is your database? > > > > On 4 May 2011 12:44, Aragorn wrote: > > > > > > > > > HI, > > > >

Re: Error (EXTERNAL IP): /add_comment/10/

2011-05-04 Thread Aragorn
Sqlite3 On 4 Mag, 13:50, David Markey wrote: > What is your database? > > On 4 May 2011 12:44, Aragorn wrote: > > > > > HI, > > > I can not understand where is the error. when you insert a > > blog comment I receive an email, but this' > > the email I receive ! > > > Traceback (most recent call