Ok, I've just figured out, by using the get_form modelAdmin method.
Here's my solution in case someone find it helpful:
class EventAdmin(admin.ModelAdmin):
list_display = ('title', 'description')
search_fields = ('title', 'description')
inlines = [OccurrenceInline]
def get_form(self, request, obj=None, **kwargs):
self.exclude = []
# group name: Moderator
custgroup = Group.objects.get(name="Moderator")
if custgroup in request.user.groups.all():
self.exclude.append('creator')
return super(EventAdmin, self).get_form(request, obj, **kwargs)
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.