login_required render_to discussion create html def topic_create reque

1
2
3
4
5
6
7
8
@login_required
@render_to('discussion/create.html')
def topic_create(request, group_slug):
group = get_object_or_404(UserGroup, slug=group_slug)
if not group.can_post(request.user):
raise Http403(_("You can't post comments in this group!"))
form = process_form(request, forms.TopicCreateForm, request.user, group)
return {'group': group, 'form': form}