Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Python beginner question - trying to understand return statement

def register():
    form = SignupForm(request.form)
    if request.method == 'POST' and form.validate():
        create_user = ({'username' : form.username.data, 'email' : form.email.data,
                            'password': form.password.data})
        flash('Thanks for registering')
        return create_user, redirect(url_for('loggedin.html'))
    return render_template('get-started.html', form=form)
Comment

Python beginner question - trying to understand return statement

def register():
    form = SignupForm(request.form)
    if request.method == 'POST' and form.validate():
        create_user = ({'username' : form.username.data, 'email' : form.email.data,
                            'password': form.password.data})
        flash('Thanks for registering')
        return create_user, redirect(url_for('loggedin.html'))
    return render_template('get-started.html', form=form)
Comment

PREVIOUS NEXT
Code Example
Python :: cuenta atras segundero python 
Python :: python logical operators code in grepper 
Python :: python class reflect method of member instance 
Python :: Express + Jade : Ensuring url paths are correct via controllers, orphaned links 
Python :: penis command discord.py 
Python :: Retry function for sending data 
Python :: Like strings (and all other built-in sequence type), lists can be indexed and sliced: 
Python :: self.stdout.write django 
Python :: merging results from model.predict() prediction with original pandas dataframe 
Python :: ring Insert Items in list 
Python :: ring Using Self.Attribute and Self.Method 
Python :: ring check if a Ring function is defined or not 
Python :: python run unix command 
Python :: how to dynamically append value in a list in python 
Python :: salamelecus 
Python :: 0 
Python :: zero error 
Python :: matplotlib bring plot to front in plots with twin axis 
Python :: How to check whether a nested hash element exists in python 
Python :: fibonacci numbers in lamda python 
Python :: plot true values vs actucal vales 
Python :: Shelve Data Storage 
Python :: code help 
Python :: loop only to the 6th element python 
Python :: http response template 
Python :: reset all weights tensorflow 
Python :: return positon of ele in list python 
Python :: sensing keyboard shortcuts using python 
Python :: writer.append_data(image) means 
Python :: meaning of self keyword in user defined function 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =