Hi

Thanks for the answer. The current solution I had it's the one that you 
sugest.

But I still have the problem that on the index admin page shows the 
application.
The scenario is this:
A factory have a diary production (A)
And every day people produce Articles and to do that they use some Feedstock
I have two different models to control Articles and Feedstock flow, FlowB 
(B) and FlowC(C)

Some users can add a diary production, and in there add some articles and 
some feedstock
And for those users, the only way that Articles go in and feedstock go out 
is in the diary production (Diary)

But sometimes other people take some feedstock for other pruposes, and that 
not belong to the Diary. Also only the Administrator can allow that 
situation, and therefore he have to add an entrance directly on C. This is 
why I need to have C registered in Admin.

But to the other users can add C elements in the diary (A), they see C in 
index and I want them not to see, only the Administrator

Thanks

Quinta-feira, 9 de Outubro de 2014 21:02:28 UTC+1, Collin Anderson escreveu:
>
> Why can't the first two users edit the data the same way as user 3?
>
> I'd recommend overriding get_readonly_fields() on the ModelAdmin for A so 
> that all fields are readonly for the users who aren't allowed to edit model 
> A. They'll still need the "can edit" permission for model A.
>
> https://docs.djangoproject.com/en/1.7/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_readonly_fields
>
> I _think_ the inlines will automatically figure out if the user has 
> permission to edit them. Otherwise, you can override get_inline_instances() 
> to remove the inlines if they can't edit them.
>
> https://docs.djangoproject.com/en/1.7/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_inline_instances
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8274079a-0f59-424d-81de-2dd5d5c3e90d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to