title: Django Object Log error: name 'register' is not defined
body: <p>Im have a Django application and Im adding Django log Object to it, Im following this documentation <a href="https://code.osuosl.org/projects/django-object-log/wiki/Usage#Registering-Action-Types" rel="nofollow">https://code.osuosl.org/projects/django-object-log/wiki/Usage#Registering-Action-Types</a></p>
  
  <p>I'm in the part of (Caching Data Automatically) in the documentation which is an example of how to add build cashe and register: </p>
  
  <pre><code>def build_cache(user, obj1, obj2, obj3, data):
       return {'foo':obj.foo}
  
   register('MY_EVENT', 'template.html', build_cache)
  
   def my_view(request, pk):
       """ example view that retrieves an object by its pk """ 
       obj = SomeModel.objects.get(pk=pk)
       log('MY_EVENT', request.user, obj) 
  </code></pre>
  
  <p>Now my code looks like this when adding the above part:</p>
  
  <pre><code>from models import *
  from django.template import Context, loader, RequestContext
  from django.shortcuts import render_to_response , get_object_or_404
  from django.http import HttpResponseRedirect, HttpResponse, Http404
  from django.core.urlresolvers import reverse
  from django.shortcuts import redirect
  from django.views.decorators.csrf import csrf_protect
  from django.core.mail import EmailMessage
  #from django.contrib.formtools.tests.wizard.forms import request
  
  from object_log.models import LogAction
  from object_log.models import LogItem
  
  register('MY_EVENT', 'template.html', build_cache)  
  
  def build_cache(user, obj1, obj2, obj3, data):
       return {'foo':obj.foo}
  
  
  
  LogAction.objects.register('MY_EVENT','path/to/my/template.html')
  LogAction.objects.register('MY_EVENT','path/to/my/template.html')
  
   # store log_action for faster access
  log = LogItem.objects.log_action
  
  
  
  def create_task(request):
      #Employer.objects.filter(pk=request.session[user_id])
      employer_id = request.user.id #Take the employer in the current session
  
      getcategory = request.POST['cat_dd']
      getsubcategory = request.POST['subcat_dd']
      getname = request.POST['task_name']
      getdesc = request.POST['task_desc']
      getcountry = request.POST['country_dd']
      getcity = request.POST['task_city']
      getaddress = request.POST['task_address']
      getstatus = request.POST['status_dd']
      if (employer_id == NULL or getcategory == "Please select a category" or getsubcategory == "Please select a subcategory" or getname == "" or getdesc == "Write a short description about your task.." or getcountry == "(please select a country)" or getcity == "" or getaddress == "" or getstatus == ""):
          return render_to_response('createTask.html',RequestContext(request))
      else:
          t = Task.objects.create(employer = employer_id, category = getcategory, subcategory = getsubcategory, name = getname, description = getdesc, country = getcountry, city = getcity, address = getaddress, status = getstatus, contractor = NULL)
          t.save()
          return render_to_response('task.html',RequestContext(request))
  
  def edit_task(request, task_id):
      t = get_object_or_404(Task, pk=task_id)
      t.category = request.POST['cat_dd']
      t.subcategory = request.POST['subcat_dd']
      t.name = request.POST['task_name']
      t.description = request.POST['task_desc']
      t.country = request.POST['country_dd']
      t.city = request.POST['task_city']
      t.address = request.POST['task_address']
      t.status = request.POST['status_dd']
  
      log('MY_EVENT', request.user, t,data={'foo':obj.foo})
  
      if (employer_id == NULL or getcategory == "Please select a category" or getsubcategory == "Please select a subcategory" or getname == "" or getdesc == "Write a short description about your task.." or getcountry == "(please select a country)" or getcity == "" or getaddress == "" or getstatus == ""):
          return render_to_response('editTask.html',RequestContext(request))
      else:
          t = Task.objects.create(employer = employer_id, category = getcategory, subcategory = getsubcategory, name = getname, description = getdesc, country = getcountry, city = getcity, address = getaddress, status = getstatus, contractor = NULL)
          t.save()
          #log('MY_EVENT', request.user, obj, data={'foo':obj.foo}) 
          return render_to_response('task.html',RequestContext(request))
  </code></pre>
  
  <p>But I got an error name <code>'register' is not defined</code></p>
  
  <p>Is there any solution for the error??</p>