예제 #1
0
def project(request, id):
  project = Project.objects.get(pk=id)

  if 'members_' + str(project.id) not in request.session:
    members = build_member_data(project, request.session['access_token'])
    request.session['members_' + str(project.id)] = members

  return render_to_response('project/project.html', { 'project': project}, RequestContext(request))
예제 #2
0
def project(request, id):
    project = Project.objects.get(pk=id)

    if 'members_' + str(project.id) not in request.session:
        members = build_member_data(project, request.session['access_token'])
        request.session['members_' + str(project.id)] = members

    return render_to_response('project/project.html', {'project': project},
                              RequestContext(request))
예제 #3
0
def project_create(request):
  if request.method == 'POST':
    ln_user = get_linkedin_user(request)
    name = request.POST['name']
    #skills = extract_skills_from_user_string(request.POST['skills'])
    #project = Project(name=name, skills_set=skills, creator = ln_user)
    project = Project(name=name, creator = ln_user)
    project.save()

    """ prepare object with connections and skills """
    members = build_member_data(project, request.session['access_token'])
    request.session['members_' + str(project.id)] = members

    return redirect('web.views.project', project.id)
  return render_to_response('project/create.html', {}, RequestContext(request))
예제 #4
0
def project_create(request):
    if request.method == 'POST':
        ln_user = get_linkedin_user(request)
        name = request.POST['name']
        #skills = extract_skills_from_user_string(request.POST['skills'])
        #project = Project(name=name, skills_set=skills, creator = ln_user)
        project = Project(name=name, creator=ln_user)
        project.save()
        """ prepare object with connections and skills """
        members = build_member_data(project, request.session['access_token'])
        request.session['members_' + str(project.id)] = members

        return redirect('web.views.project', project.id)
    return render_to_response('project/create.html', {},
                              RequestContext(request))