raw_id_fields admin widget not showing search icon

2013-05-15 Thread Adrián López Calvo
Hello, I have the following code in my admin.py: class UserManagedGroupAdmin(admin.ModelAdmin): inlines = [MembershipInline] search_fields = ('name', 'leader__username', ) list_display = ('__unicode__', 'leader', ) filter

Re: raw_id_fields admin widget not showing search icon

2013-05-16 Thread Adrián López Calvo
wrote: > > > > On Thu, May 16, 2013 at 6:34 AM, Adrián López Calvo > > > wrote: > >> <http://i.stack.imgur.com/LuqOG.png> >> >> Hello, >> >> I have the following code in my admin.py: >> >> class UserManagedGroupAdmin(admin.ModelAdmi

Re: raw_id_fields admin widget not showing search icon

2013-05-16 Thread Adrián López Calvo
Nevermind, adding this to the ModelAdmin of my User proxy made the deal. Or so it seems. def get_model_perms(self, request): return {} Thanks again, Adrián On Thursday, May 16, 2013 4:22:43 PM UTC+2, Adrián López Calvo wrote: > > That was it, thank you Russell. > > Any way

How to obtain proxy instance from parent

2013-05-17 Thread Adrián López Calvo
Dear all, I'm working with a proxy model of django's User. I need to convert the user from the request into an instance of my proxy. At the moment I have the following method in my class: @classmethod def from_parent_user(cls, user): # return cls.objects.get(pk=user.pk)

Foreign keys to generated through models

2013-05-20 Thread Adrián López Calvo
Hello, Is this possible? It would be perfect for my implementation. I would need something alone the lines of this: class Membership(models.Model): membership = models.OneToOneField(User.groups.through) date_added = models.DateField(_('date added'), auto_now_add=True) made_member