site.py 337 Bytes
Newer Older
Skia's avatar
Skia committed
1 2 3 4 5 6
from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponse
from django.db import models

def index(request, context=None):
    if context == None:
Skia's avatar
Skia committed
7
        return render(request, "core/index.jinja", {'title': 'Bienvenue!'})
Skia's avatar
Skia committed
8
    else:
Skia's avatar
Skia committed
9
        return render(request, "core/index.jinja", context)
Skia's avatar
Skia committed
10