Hello Almir, Thanks for your comment. I added following in my wrapper view:
@login_required() def story_index(request, username, d={}): """" Stroy Index""" d['this_user'] = user = get_model(User, username=username) if not user: return find_user(username) d["story_index"] = Story.objects.filter(user=user) d['latest'] = archive_index(request, CareStory.objects.filter (user=user), 'date_created') #return render(request, 'care_story_index.html', d) return render(request, 'social/carestory_archive.html', d) Now, the page is redirected to carestory_archive.html, which is simply {% for story in latest %} {{ story.title }}<br/> <p>Published on {{ story.date_created|date:"F j, Y" }}</p> {% endfor %} But it does not parse the html elements, namely html tags like <br/> and <p> are displayed simply like text. Any inputs on this? Thanks a lot, Sonal. On Jul 15, 12:11 pm, Almir Karic <al...@almirkaric.com> wrote: > I would make an wrapper view that sets up the queryset and calls the > generic view. > > python/django hacker & sys > adminhttp://almirkaric.com&http://twitter.com/redduck666 > > On Wed, Jul 15, 2009 at 11:28 AM, Sonal Breed<sonal.br...@gmail.com> wrote: > > > Hi all, > > I am using django.views.generic.date_based.archive_index in my url > > patterns as below: > > > story_info_dict = { > > 'queryset': CareStory.objects.all(), > > 'date_field': 'date_created', > > } > > > urlpatterns = patterns('', > > .. > > > (r'^story/index/?$', > > 'django.views.generic.date_based.archive_index', story_info_dict), > > > ) > > > Now, the actual queryset that I intend to pass is > > story_info_dict = { > > 'queryset': CareStory.objects.filter(user=user), > > 'date_field': 'date_created', > > } > > > But since it is in urls.py, I cannot figure out how am I going to pass > > the user variable dynamically and have the filtering done. > > > Any help on this will be really appreciated. > > > Thanks in advance, > > Sonal. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---