Friday, October 11, 2013

Re: View not working / how can I test it in the shell?

Thanks a lot Kelvin. I had already tried that, But I get nothing that tells me whether there is some error or not. I am 100% positive there is data that meets the criteria of my view nevertheless I neither see the data nor see an erroe message. :/


Dtb/Gby
=======
Mario R. Osorio
"... Begin with the end in mind ..."
http://www.google.com/profiles/nimbiotics


On Fri, Oct 11, 2013 at 7:19 PM, Kelvin Wong <wongo888@gmail.com> wrote:
In the shell:

>>> from django.test import Client
>>> c = Client()
>>> r = c.get('/about')
>>> r.context


K



On Friday, October 11, 2013 3:14:38 PM UTC-7, Mario Osorio wrote:
You are right, I fixed that after posting as someone else point it out to me, but this is not working out for me nonetheless


On Friday, October 11, 2013 6:11:54 PM UTC-4, donarb wrote:
On Friday, October 11, 2013 2:48:13 PM UTC-7, Mario Osorio wrote:
Hello all, working with mezzanine, I created in an app (newsroom) folder, a views.py http://dpaste.com/1413587/. This view is an addition to the blog app in site-packages. I then I put a section in my blog_post_list.html template file to (supposedly) show the data from that view http://dpaste.net/show/6cHStytzI5cqfICpFVAT/, but I cannot see this data. blog_post_list.html is my home. Will someone please point my mistake here? How can I test this view in the shell.TIA!

What is featured_post_list? You assign it in the context, but it doesn't appear anywhere (except as the name of the view method). Perhaps you meant to pass "blog_posts" instead?

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/jLHmh2-Ami0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ee87ee00-d4a2-4ab6-8311-8f61370f8c50%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAO2PNV5LJATZfzuR2BoM9CQHaWbQgUTPS40BsEbfue6uuVXZMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment