On Jun 4, 2:23 pm, by-neron <mertmetin...@gmail.com> wrote:

> however,
>
> in mysite/template/index.html
>
>  {% for post in latestPosts %}
>      {{ post.id }}
>     {% endfor %}
> prints nothing because it could not send data here. How can i send it ?

You pass them as a Context object to the render() method of the
template - which is what your code is doing.  IOW : the problem is
probably elsewhere.

I assume that
1/ you are running the builtin dev server with the DEBUG flag set to
True in your settings,
2/ you do have some posts in your database,
3/ you already made sure your code was using the right template (like
by editing something in your template and reloading the url to check
if you see the edit).


-- 
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 unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to