Question

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!

Was it helpful?

Solution

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

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top