문제

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!

도움이 되었습니까?

해결책

Django has a shell tool to debug or do something others,you can do like this:

cd ~/YOUR-PROJECT
python manage.py shell

But the unit testing is more better than that,Django has a buildin unit testing framework ,it is a standard way that django recommend

다른 팁

You can use django-extensions, here is a good tutorial (in spanish) http://www.youtube.com/watch?v=h4k4J3N63YM

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top