New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changelist_view #100
Comments
Do you mean https://github.com/sshwsfc/django-xadmin/blob/master/demo_app/app/adminx.py#L46 |
I mean this https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.changelist_view My goal is to display different list depending on the logged in user. For instance, if superuser list_display would be ['a', 'b', 'c'] |
Can you give me more details or some reference on how to use it? |
return a list include the columns name you want display. |
not sure if this is what you mean @Property if I do that I keep getting an attribute error at |
you can override method class MyAdmin(object):
def get_list_display(self):
list_display = super(MyAdmin, self). get_list_display()
user = self.user
if user.username == 'tom':
list_display.append('tom_only_field')
return list_display |
That actually worked out. |
Hi,
I user changelist_view method to control which column I want to show in the admin view.
Is there any similar method I can call using xadmin?
Thanks in advance.
The text was updated successfully, but these errors were encountered: