Ejemplo n.º 1
0
def index(request):
    projects = None
    page_type = "home"

    if request.user.is_authenticated():
        projects = get_projects(user=request.user)

    return render_to_response('index.html', {
        'projects': projects,
        'page_type': page_type,
    }, context_instance = template.RequestContext(request))
 def render(self, context):
     # Store project list in template context.
     context['projects'] = get_projects(context['request'].user)
     return ''