Exemplo n.º 1
0
def saveas(url):
    old_page = current_wiki.get_or_404(url)
    form = URLForm(obj=old_page)
    if form.validate_on_submit():
        return redirect(url_for(
            'wiki.copy', oldurl=form.clean_url(url), newurl=form.clean_url(form.url.data)
        ))
    return render_template('saveas.html', form=form)
Exemplo n.º 2
0
def create():
    form = URLForm()
    if form.validate_on_submit():
        url=form.clean_url(form.url.data)
	
        #get current user's name and current date when page is created
        #then append it to the creators.json file
        ########################################
        creator_module.add_to_json(url)
		########################################
        
        return redirect(url_for('wiki.edit', url=form.clean_url(form.url.data)))
    return render_template('create.html', form=form)
Exemplo n.º 3
0
def create():
    form = URLForm()
    if form.validate_on_submit():
        return redirect(url_for('wiki.edit',
                                url=form.clean_url(form.url.data)))
    return render_template('create.html', form=form)
Exemplo n.º 4
0
def create():
    form = URLForm()
    if form.validate_on_submit():
        return redirect(url_for(
            'wiki.edit', url=form.clean_url(form.url.data)))
    return render_template('create.html', form=form)