Okay I figured this one out on my own...I just added the following code...

   new_comment.save()
   comment_form = CommentForm()  - #(I added this line and it's working 
properly now)
else:
   comment_form = CommentForm()




On Wednesday, 16 March 2016 16:45:31 UTC-7, parker smith wrote:
>
> Hello,
>
> I am working on the django by example book and in ch. 2 I am having issues 
> getting the recipient email to display inside the template tag...
>
> here is the specific line of code that isn't working and what I changed it 
> to to get it some what working...
>
> views.py code referencing cd - 
>
>       ....
>       cd = form.cleaned_data
>       ....
>      send_mail(subject, message,'[email protected]',[cd['to']])
>
>
> code having issues - location is share.html
>       
>       ...
>       "{{ post.title }}" was successfully sent to {{ cd.to }}.
>       ...
>
>
> everything is displaying fine except that the {{ cd.to }} section is just 
> blank like this
>
>       
>        Post 3 was successfully sent to .
>
>
> however if I replace it with {{ form.to }} I do see the recipient email 
> address but it is floated to the left and is surrounded in in a grey box 
> with padding... so that it displays like 
>
>       [email protected] Post 3 was successfully sent to .
>
>
>
>
> I hope I am being clear and am hoping to get a better answer on how to get 
> it to display properly.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c389ec12-00ba-4784-ab5a-ff0e42fa4d2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to