2011/1/28 hollando <hrqiang@gmail.com>
Hi hollando,
I can't set permissions for proxy models, i think because the table auth_permissions doesn't have the proxy records.
That is, i have the Foo model and the FooProxy. Whe i loggin as superuser i see both, Foo and FooProxy admin forms. But when i log as other user (supose proxyuser), who only have the permission "Can change foo", only see Foo admin forms.
How can i reach the way to login as proxyuser, and enter only to the FooProxy admin forms?
Hi hollando,
You can use proxy models. Refer to
http://stackoverflow.com/questions/2223375/multiplue-modeladmins-views-for-same-model-in-django-admin
I can't set permissions for proxy models, i think because the table auth_permissions doesn't have the proxy records.
That is, i have the Foo model and the FooProxy. Whe i loggin as superuser i see both, Foo and FooProxy admin forms. But when i log as other user (supose proxyuser), who only have the permission "Can change foo", only see Foo admin forms.
How can i reach the way to login as proxyuser, and enter only to the FooProxy admin forms?
On 1月27日, 下午4时22分, Mario8k <mm...@8ksoft.com.ar> wrote:
> Hello,
>
> How can I customize a form by the user who is logged in?
> For example, if the user is_superuser(), i need to display the
> standard admin form, but if the user is another one, show only some
> fields and not all model fields. For this, I coud use
> ModelAdmin.fields (or exclude, or readonly_fields), but i don't know
> how to make it conditional to the user.
>
> Regards, Mario.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
--
Lic. Mario Moya
Tel: +54 299 4771196
Cel: +54 299 155023987
mmoya@8ksoft.com.ar
Belgrano 167 - (8324) Cipolletti, Río Negro
http://www.8ksoft.com.ar
Cuidar el medio ambiente depende de todos, imprime sólo lo necesario.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment