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
> 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
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
...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
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
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
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
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,
> >
> >
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
9 matches
Mail list logo