from django.http import HttpResponse,HttpResponseRedirect
from django.template import loader
from django.shortcuts import get_object_or_404, render
from django.urls import reverse
from django.views import generic
from .models import Post



def index(request):
    post_list = Post.objects.all()
    template = loader.get_template('zen/index.html')
    context = {
        'post_list': post_list,
    }
    return HttpResponse(template.render(context, request))
    
def detail(request, post_id):
    post = get_object_or_404(Post, pk=post_id)
    return render(request, 'zen/detail.html', {'post': post})

def fun(request):
    return render(request, 'zen/fun.html')

def home(request):
    return render(request, 'zen/home.html')


e45dee359960c3f65bc3fc7c7e722ddc5bff02b2
<mask token>


def detail(request, post_id):
    post = get_object_or_404(Post, pk=post_id)
    return render(request, 'zen/detail.html', {'post': post})


<mask token>


def home(request):
    return render(request, 'zen/home.html')

<mask token>


def detail(request, post_id):
    post = get_object_or_404(Post, pk=post_id)
    return render(request, 'zen/detail.html', {'post': post})


def fun(request):
    return render(request, 'zen/fun.html')


def home(request):
    return render(request, 'zen/home.html')

<mask token>


def index(request):
    post_list = Post.objects.all()
    template = loader.get_template('zen/index.html')
    context = {'post_list': post_list}
    return HttpResponse(template.render(context, request))


def detail(request, post_id):
    post = get_object_or_404(Post, pk=post_id)
    return render(request, 'zen/detail.html', {'post': post})


def fun(request):
    return render(request, 'zen/fun.html')


def home(request):
    return render(request, 'zen/home.html')

from django.http import HttpResponse, HttpResponseRedirect
from django.template import loader
from django.shortcuts import get_object_or_404, render
from django.urls import reverse
from django.views import generic
from .models import Post


def index(request):
    post_list = Post.objects.all()
    template = loader.get_template('zen/index.html')
    context = {'post_list': post_list}
    return HttpResponse(template.render(context, request))


def detail(request, post_id):
    post = get_object_or_404(Post, pk=post_id)
    return render(request, 'zen/detail.html', {'post': post})


def fun(request):
    return render(request, 'zen/fun.html')


def home(request):
    return render(request, 'zen/home.html')

from django.http import HttpResponse,HttpResponseRedirect
from django.template import loader
from django.shortcuts import get_object_or_404, render
from django.urls import reverse
from django.views import generic
from .models import Post



def index(request):
    post_list = Post.objects.all()
    template = loader.get_template('zen/index.html')
    context = {
        'post_list': post_list,
    }
    return HttpResponse(template.render(context, request))
    
def detail(request, post_id):
    post = get_object_or_404(Post, pk=post_id)
    return render(request, 'zen/detail.html', {'post': post})

def fun(request):
    return render(request, 'zen/fun.html')

def home(request):
    return render(request, 'zen/home.html')

