# Path: vpw/vpr_api.py
# def vpr_create_person(**kwargs):
#     result = vpr_request("POST", "persons/", data={
#         "fullname": kwargs.get("fullname"),
#         "user_id": kwargs.get("user_id"),
#         "first_name": kwargs.get("first_name"),
#         "last_name": kwargs.get("last_name"),
#         "email": kwargs.get("email"),
#         # "title": kwargs.get("title"),
#         # "homepage": kwargs.get("homepage"),
#         # "affiliation": kwargs.get("affiliation"),
#         # "affiliation_url": kwargs.get("affiliation_url"),
#         # "national": kwargs.get("national"),
#         # "biography": kwargs.get("biography"),
#         # "client_id": kwargs.get("client_id"),
#     })
# 
#     return result


import vpw
from vpw.vpr_api import vpr_create_person

__author__ = 'huyvq'


# Declare Signs
def user_activated_callback(sender, user, request, **kwargs):
    try:
        author = vpw.models.Author.objects.get(user=user)
    except vpw.models.Author.DoesNotExist:
        # create person on vpr

# Path: vpw/vpr_api.py
# def vpr_create_person(**kwargs):
#     result = vpr_request("POST", "persons/", data={
#         "fullname": kwargs.get("fullname"),
#         "user_id": kwargs.get("user_id"),
#         "first_name": kwargs.get("first_name"),
#         "last_name": kwargs.get("last_name"),
#         "email": kwargs.get("email"),
#         # "title": kwargs.get("title"),
#         # "homepage": kwargs.get("homepage"),
#         # "affiliation": kwargs.get("affiliation"),
#         # "affiliation_url": kwargs.get("affiliation_url"),
#         # "national": kwargs.get("national"),
#         # "biography": kwargs.get("biography"),
#         # "client_id": kwargs.get("client_id"),
#     })
# 
#     return result


# Path: vpw/receiver.py
import vpw
from vpw.vpr_api import vpr_create_person


__author__ = 'huyvq'


# Declare Signs
def user_activated_callback(sender, user, request, **kwargs):
    try:
        author = vpw.models.Author.objects.get(user=user)
    except vpw.models.Author.DoesNotExist:
        # create person on vpr

        params = dict()