python - Django generic views - sending data to project templates -


i try send data generic views app

urlpatterns = patterns('',     (r'*', listview.as_view(         queryset=post.objects.all().order_by("-created")[:2],     template_name="/mysite/templates/index.html"     )), ) 

however, data cannot sent c/p query , result returned. what's missing?

in mysite/templates/index.html

 {% post in object_list %}      {{ post.title }}     {% endfor %} 

prints nothing

you not providing enough information. r'*' not valid regular expression - * needs act on - , django report if tried use in urlconf. need show how including url in main urls.py.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -