Exemplo n.º 1
0
def facebookAJAX(request):
    if request.method == 'POST':
        term = request.POST["term"]
        index = str(term).rfind('/')
        pageid = str(term)[index:]
        page = wshelper.getfb(pageid)
        template = loader.get_template('modules/facebookAJAX.html')
        context = Context({'facebookPage': page})
        page.Url = term

        return HttpResponse(template.render(context))

    else:
        return HttpResponseForbidden()
Exemplo n.º 2
0
def taskFacebookPage(*args, **kwargs):
    index = str(args[0]).rfind('/')
    pageid = str(args[0])[index:]
    page = wshelper.getfb(pageid)
    page.Url = str(args[0])
    return page