Issue #2 resolved

Missing get_visitor function in visitor_utils

Jesse Heitler
created an issue

/django-visitor/visitor/visitor_utils.py", line 79, in get_visitor_from_request return get_visitor(request.COOKIES[constants.COOKIE_VISITOR_KEY]) NameError: global name 'get_visitor' is not defined

And the code should be:

def get_visitor(visitor_key): """ Get the visitor object from the database. """ return Visitor.objects.find_visitor(visitor_key)

And line 64 (update_visitor) should probably be changed to call get_visitor() too to keep things DRY.

Comments (3)

  1. ken cochrane repo owner

    Thank you for bringing that to my attention. This has been fixed, and a new version has been uploaded to pypi.

    In the future, feel free to submit a pull request, it will make it easier to resolve these issues quicker.

    Thanks, Ken

  2. Log in to comment