예제 #1
0
def post_detail(request, pid):
    post = Post.get(pid=pid)
    post.composers = post.get_composers()
    first_composer = post.composers[0]
    first_composer.posts = get_posts_by_cid(first_composer.cid, 6)
    return render(request, 'post.html', locals())
예제 #2
0
def oneuser(request, cid):
    composer = Composer.objects.get(cid=cid)
    composer.posts = get_posts_by_cid(cid, 2)
    return render(request, 'oneuser.html', locals())
예제 #3
0
def homepage(request, cid):
    composer = Composer.objects.get(cid=cid)
    cr_list = Copyright.objects.filter(cid=cid).all()
    composer.posts = get_posts_by_cid(cid)
    composer.rest_posts = composer.posts[1:]
    return render(request, 'homepage.html', locals())
예제 #4
0
def homepage(request, cid):
    composer = Composer.objects.get(cid=cid)
    composer.posts = get_posts_by_cid(cid)
    composer.rest_posts = composer.posts[1:]
    return render(request, 'homepage.html', locals())
예제 #5
0
def oneuser(request, cid):
    composer = Composer.objects.get(cid=cid)
    cr_list = Copyright.objects.filter(cid=cid)
    posts = get_posts_by_cid(cid)
    return render(request, 'oneuser.html', locals())