OK, I seem to have found a way to achieve the first task, even though
it doesn't seem to be a rather elegant one. Here's the code that I
wrote for it:

from django.contrib.admin.views.main import change_list

def index(request):
    # Copy the GET dict in order to modify it
    g = request.GET.copy()
    g['user__id__exact'] = request.user.id
    request.GET = g
    return change_list(request, 'measurements', 'measurement')

Basically, I pretend as if a filter has been defined, thus cheating
the admin view into filtering the data according to my wish. As I
said, not a pretty sight. And, well, I've still got that other problem
to solve. So, any help will still be greatly appreciated.


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to