Hi, i have django 1.1

I have a user profile model, call it OurUser. I have defined a custom
action, "send mail". This action is available in OurUser and django
auth's User models. It is handled via a global function with this
signature

def send_mail_to_users(modeladmin, request, queryset):
    selected = request.POST.getlist(admin.ACTION_CHECKBOX_NAME)
    return HttpResponseRedirect(reverse('some view') + '?ids=%s' %
",".join(selected))

This works well only for auth's User model(since it gets the correct
ids). What i need is an if else of the form
if modeladmin belongs to "User" then do something
else if modeladmin belongs to "OurUser" then do something

so that i can extract the User ids from OurUser and then redirect
properly
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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