On Thursday 27 April 2006 16:27, Joseph Kocherhans wrote:

> > The idea is that the user can only delete/edit/etc their own
> > postings - anything else is denied. (This is obviously not for all
> > users, there need to be admins, etc who can edit everyones files).
> > The only way I can think of is setting up permission groups in
> > Users and maybe overwriting delete()? I haven't tried it yet, was
> > hoping someone with more mojo could shed some light.
>
> This should help, at least somewhat:
> http://lukeplant.me.uk/blog.php?id=1107301634

Also, another hack I have used is to selectively override parts of the 
admin using the url configuration, by using regexes that match URLs 
that would otherwise go straight to an admin view, and putting them 
before the main 'admin' regex:


urlpatterns = patterns('',
    (r'^admin/myapp/mymodel/add/$', 'my.special.wrapper.for.add_stage'),
    (r'^admin/myapp/mymodel/([^/]+)/$', 
'my.special.wrapper.for.change_stage'),
    (r'^admin/', include('django.contrib.admin.urls')),
...



'my.special.wrapper' might wrap an existing admin view, or even 
duplicate large parts of it if necessary.

Luke

-- 
"I married Miss Right, I just didn't know her first name was 'Always'"

Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to