I'd like to show for editing the 'owner' field only to superuser; I'm
using django 1.0:
class ProductAdmin(admin.ModelAdmin):
form = ProductForm
fieldsets = [
('Product Identification', {'fields': ['owner', 'code', ...),
('Product Description', {'fields': ['...]
I've three views each with different URL. They are visible to logged
in users.
If a non-logged user tries to access a URL requiring login, I'm able
to redirect it to the login page.
What I'm missing is how to go back to the initial page, once the user
log in the system.
Cheers, Sergio
--~--~---
I found where to work on. The render_change_form function in the
options.py file where the render_change_form is invoked.
All the information seem to be available in that context.
Sergio
On Jun 14, 2:42 pm, "Sergio A." wrote:
> I need to identify where to overwrite the template s
d/c84d...
> Not exactly what you want but might give you some ideas.
>
> On Jun 11, 7:36 pm, "Sergio A." wrote:
>
> > Hello,
>
> > in this blog post:
>
> >http://www.b-list.org/weblog/2008/dec/24/admin/
>
> > it is explained how to list
Hello,
in this blog post:
http://www.b-list.org/weblog/2008/dec/24/admin/
it is explained how to list only data that someone owns and restrict
edit permission.
What I'd like to do is to list all the data, but let users change only
those owned, while showing the rest for reading.
This means tha
any hint on this issue?
Thanks, Sergio
On May 29, 12:51 am, "Sergio A." wrote:
> Dear all,
>
> Is it possible to select the template to be applied to an admin form
> based on the logged user?
> In particular, I've two cases:
>
> - if super user, a certain
Dear all,
Is it possible to select the template to be applied to an admin form
based on the logged user?
In particular, I've two cases:
- if super user, a certain template should be used
- if not a super user, but the owner of the data, then another
template should be used
- if not a super user,
t 5:34 PM, Sergio A.
> > wrote:
>
> >> the issue seems not to be totally solved by the patch.
>
> >> If I have two classes A and B
> >> class A has a field being a foreign key to a B class field
> >> in the admin, when I add an A element, I see the
the issue seems not to be totally solved by the patch.
If I have two classes A and B
class A has a field being a foreign key to a B class field
in the admin, when I add an A element, I see the '+' button on the
foreign key field to B even though I do not have the rights to create
a B element.
Th
9 matches
Mail list logo