I'm trying to use a ListView to avoid creating a view for what should be quite a simple page. Basically I want to list a set of objects related to the current user, however I'm not sure how to access the session values from within the urls.py.
What I have looks something like this:
(r'^myrecords/$', ListView.as_view(
queryset=Record.objects.filter(CURRENT LOGGED IN USER),
context_object_name='record_list',
template_name='records.html')),
What do I need to do?
Also is there any way to apply the login_required decorator to this?
Any advice would be greatly appreciated.
Thanks.