Ticket #65 (closed enhancement: fixed)

Opened 13 months ago

Last modified 18 hours ago

Multiblog support

Reported by: igorekk Owned by:
Priority: major Milestone:
Component: blog Version:
Keywords: Cc:


Step 1. Change blog.views module

def post_list(request, userid="0", *args, **kwargs):
    """Post listing. Only shows posts that are older than now()"""
    uid = int(userid)
    if uid==0:
        kwargs['queryset'] = Post.objects.exclude(date__gt=dt.now())
        kwargs['queryset'] = Post.objects.filter(author__id=uid).exclude(date__gt=dt.now())
    return object_list(request, *args, **kwargs)

Step 2. Add to urls_local.py

    url(r'^userblogs/(?P<userid>\w+)/$', 'blog.views.post_list', name="show_blog"),         

Now we can access posts from any user by /userblogs/{{ user.id }}

1. theme template for create/edit post.
2. permission for allow post creation.

Change History

Note: See TracTickets for help on using tickets.