title: Adding a Log entry for an action by a user in a Django App
body: <p>I need to create a log entry for changes made by a user to the database via the views in my django application. </p>
  
  <p>I have enabled the django-admin module and I can retrieve the logs of the changes made using the admin interface like this:</p>
  
  <pre><code>from django.contrib.admin.models import LogEntry
  from django.contrib.contenttypes.models import ContentType
  
  recentActions = LogEntry.objects.all()
  
  for each in recentActions:
      print 'Action:', each.action_flag.__str__()
      print 'Message:', each.object_repr
      print 'Table:', ContentType.objects.get(id = each.content_type_id).name
  </code></pre>
  
  <p>I want to create similar log entries for actions done by other users using the views in my django application. How do I do this ? </p>