I wanted to add the ID of the current user (request.user.id) into an object automatically. So I was looking for a way to change the behavior of the default admin-interface for that object.
My solution now is to extend the add-view of that object. I changed the urlpatterns to include (r'^admin/web/veranstaltungen/add/$', 'ay.apps.web.views.add_Veranstaltung') and then implemented def add_Veranstaltung(request): import django.contrib.admin.views.main as main if request.POST: c = request.POST.copy() c['autor'] = request.user.id request.POST = c return main.add_stage(request, app_label='web', module_name='veranstaltungen') 'autor' is the attribute referencing auth.users. The corresponding line in the model is autor = meta.ForeignKey(auth.User, blank=True, verbose_name='Autor') This works fine. BUT I'd rather have the field not displayed at all, i.e. set "editable=False" in the model. THEN the default AddManipulator (?) does not consider the autor-field, though, i.e. the value is missing from the generated SQL (if my 'research' is correct). So I am looking for a way that makes it possible for me to set "editable=False" and still get the value into the SQL. Could anyone help me out here? Maybe there is already some other, better solution? best regards Steffen