Filtering my User list based on a UserProfile field?

2009-10-22 Thread Jean-Nicolas

Hi there...

I've extended my User model (with both UserProfile and
UserPaymentInformation) to hold additional information about a user.
I'm able to add both to my admin area using Inlines (and re-
registering my admin site)...

However, I'm facing a problem that I'm not sure how to resolve: A very
important part of user administration for me is an "Approval queue",
so, basically when a new user registers, he's put in a queue until an
administrator approves him...(the queue is just a boolean field of my
UserProfile named is_in_queue)

My problem is: I would like to be able to display a list of users that
are in the queue... I tried using list_filter, but I can't filter my
User list using a UserProfile field ... here is my UserAdmin so far:

class MyUserAdmin(UserAdmin):
inlines = [UserPaymentInfoInline, UserProfileInline]
list_display = UserAdmin.list_display + (user_in_queue,)

Since list_display can be a callable, I added a function
(user_in_queue) that returns whether or not the user is in the queue,
which is great, but I still can't filter (or order) my users based on
the fact that they are in a queue, which is what I need for the
approval process... Having to scroll through the whole user list to
find out which ones are in the queue makes no sense...

I thought about adding a custom admin view that would only list the
users that are in the queue... That worked out well.. however, that
custom view will not show up on the Admin Index site...

So basically to sum it up: Can I filter my User list based on a
UserProfile field? If not, can I add a custom view that's accessible
from the front page without having to create a completely new
AdminSite only for that?

Any help would be 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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Could Django handle this particular setup?

2009-09-23 Thread Jean-Nicolas

I would like to use Django for my next project, however, the setup is
a bit particular and I'm not sure if there's a way to setup Django to
handle it...here's what I need basically...

The site is a subscription based site, ... the main functionalities
are: Member need to signup to access some pages... member can manage
his account, cancel it etc... and I need a generic Admin area to be
able to edit member details etc... This is all pretty basic stuff and
I already did a lot of similar projects using Django... However, where
this particular project differs from the others is that I need a
particular server setup that goes like this:

Only ONE main members database and ONE admin area to administer
everything...

Multiple "front-end" that allows you to signup login, etc.. each with
their own "member area"... but each using the same common member
database and admin area...

So to sum it up, 1 admin area, 1 member database (under 1 domain)

Multiple front end with signup/login/etc.. (each on different
domains)  obviously, because each site use the same member
database, a member could login on each of the "front ends" to access
the member area...

Would something like this be possible in Django? The problem is I'm
not sure what should be a separate App or Project... the goal is to be
able to deploy new "front-end" quickly...so perhaps this could be a
separate project?

I'm not sure if I'm being clear.. let me know if not and I will try to
provide more information!

Thanks a lot!

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---