def save self text self cleaned_data text name self cleaned_data name

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
def save(self):
text = self.cleaned_data['text']
name = self.cleaned_data['name']
def getfilectx(repo, memctx, path):
return context.memfilectx(path, text, False, False, False)
user = self.user.username
msg = 'Automatic wiki commit'
ctx = context.memctx(self.repo, ('tip', None), msg, (name, ), getfilectx, user)
self.repo.commitctx(ctx)