One thing I'm trying to do is have an view that shows an individual
comment. So for instance I will have a list of comments and then you
could link that to a page that pulled up a view that just displayed
that individual comment.

So I have urls that look something like:

mysite.com/document/ch/sec/subsec/

and I want to be able to say:

mysite.com/document/ch/sec/subsec/comment

but what I'm having a hard time with is a way to pull a queryset for
that particular comment. For the list of course I'm using
get_comment_list templatetag.

So I can see from the code that pulls up the list I've got to get
there through contentType. But that's as far as I've come.

Here is what my view for the drill down to subsec:

def subsection(request, codedocument_number, chapter_number,
section_number, subsection_number):
        queryset = get_object_or_404(Subsection, number=subsection_number)
        return render_to_response(
                'subsection.html',
                {'queryset' : queryset},
        )

Here are my urls:

url(r'^code/v(?P<codedocument_number>\d+)/ch(?P<chapter_number>\d+)/sec
(?P<section_number>\d+)/(?P<subsection_number>.*)/$', subsection,
name='subsection-permalink'),


And in my models:
        @models.permalink
        def get_absolute_url(self):
                return ('section-permalink',(), {'codedocument_number':
codedocument_number, 'chapter_number': chapter.number,
'section_number': section.number ,'subsection_number': self.number})


I guess this should seem really straightforward so far.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to