On Friday, October 11, 2013 4:37:47 PM UTC-7, Mario Osorio wrote:
BTW, here is the output I'm getting: http://dpaste.com/1413745/
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 <wong...@gmail.com> wrote:In the shell:-->>> from django.test import Client>>> c = Client()>>> r = c.get('/about')>>> r.contextK
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...@googlegroups.com .
To post to this group, send email to django...@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 mentioned you don't see the data, but do you see anything, or just a blank page? In your last post you mentioned a warning about ALLOWED_HOSTS not being set when starting the shell. Is DEBUG set to False? If so ALLOWED_HOSTS must be set for security, otherwise a 500 error may not display anything on screen.
I was going to suggest that the next thing I'd try is to use the shell, and import the BlogPost class and enter the first two lines of code from your view, you should get something so you can verify the results are correct.
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/d73dc520-3a3f-4e83-b7e5-7854a7271cde%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment