diff options
Diffstat (limited to 'gstudio/views/pageadd.py')
-rw-r--r-- | gstudio/views/pageadd.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gstudio/views/pageadd.py b/gstudio/views/pageadd.py index d51017c..1537fc7 100644 --- a/gstudio/views/pageadd.py +++ b/gstudio/views/pageadd.py @@ -29,11 +29,23 @@ def pageadd(request): # if not request.POST.get('org1', ''): # errors.append('Enter a page.') if not errors: - title=unicode(request.POST['subject']) + title=request.POST['subject'] # content=request.POST['page'] content_org=unicode(request.POST['org1']) idusr=request.POST['idusr'] - pageId = create_wikipage(title,int(idusr),content_org) + usr = request.POST.get("usr",'') + editable= request.POST.get("edit","") + # print content_org,"content" + + if editable=='edited': + + #if id_no: + edit_section(idusr,content_org,usr) + # elif id_no1: + # edit_section(id_no1,rep) + + + pageId = create_wikipage(title,int(idusr),content_org,usr) if pageId : return HttpResponseRedirect('/gstudio/page/gnowsys-page/'+ str(pageId)) variables = RequestContext(request,{'errors' : errors, 'pageId' : pageId}) |