class ActivityAdmin(ModelAdmin):
list_display = ('subject', 'hours', 'owner')
exclude = ['owner']
def save_model(self, request, obj, form, change):
"""
Given a model instance save it to the database.
"""
obj.owner = request.user
obj.save()
admin.site.register(Activity, ActivityAdmin)