コード例 #1
0
ファイル: views.py プロジェクト: Sindhu-Chinnaswamy31/p5
def builtin(request):
    if request.method == "POST":
        form = forms.SampleForm(request.POST, request.FILES)
        if form.is_valid():
            First_Name = form.cleaned_data.get('First_Name')
            Last_Name = form.cleaned_data.get('Last_Name')
            Email = form.cleaned_data.get('Email')
            PhoneNumber = form.cleaned_data.get('PhoneNumber')
            Password = form.cleaned_data.get('Password')
            birth_day = form.cleaned_data.get('birth_day')
            birth_month = form.cleaned_data.get('birth_month')
            birth_year = form.cleaned_data.get('birth_year')
            Gender = form.cleaned_data.get('Gender')
            Prog_Languages = form.cleaned_data.get('Prog_Languages')
            Languages = form.cleaned_data.get('Languages')
            Image = form.cleaned_data.get('Image')
            store_Image(Image)
            data = form.cleaned_data
            return render(request, "display_data.html", context=data)
    form = forms.SampleForm()
    return render(request, "builtin.html", {'form': form})


#forms is a file or a library
#in forms Form is a class so we inherit from forms.Form
コード例 #2
0
ファイル: views.py プロジェクト: SHAHANAZ75/p9
def builtinforms(request):
    if request.method == "POST":
        form = forms.SampleForm(
            request.POST, request.FILES
        )  #im creating a form instance with the data filled the all the firlds will get th
        #the specified value
        if form.is_valid():
            #cleaned_data is varible in form instance that holds the dictonary containing the data that we
            #have filled
            first_name = form.cleaned_data.get('first_name')
            last_name = form.cleaned_data.get('last_name')
            email = form.cleaned_data.get('email')
            phno = form.cleaned_data.get('phno')
            pwd = form.cleaned_data.get('pwd')
            birth_day = form.cleaned_data.get('birth_day')
            birth_month = form.cleaned_data.get('birth_month')
            birth_year = form.cleaned_data.get('birth_year')
            gender = form.cleaned_data.get('gender')
            image = form.cleaned_data.get('image')
            #store_image(image)
            data = form.cleaned_data
            return render(request, "display_data.html", context=data)
    form = forms.SampleForm()
    return render(request, 'builtin.html', {'form': form})


#forms is a file or a library
#in forms Form is a class so we inherit from forms.Form
コード例 #3
0
ファイル: views.py プロジェクト: Suneel023/Class16
def builtinforms(request):

    if request.method == "POST":

        # Creating a form instance with the data filled in all fields will get the specified value
        form = forms.SampleForm(request.POST)

        if form.is_valid():

            # cleaned_data is variable in form instance that holds the dictionary containing the data
            # that we have filled
            first_name = form.cleaned_data.get('first_name')
            last_name = form.cleaned_data.get('last_name')
            email = form.cleaned_data.get('email')
            phno = form.cleaned_data.get('phno')
            pwd = form.cleaned_data.get('pwd')
            birth_day = form.cleaned_data.get('birth_day')
            birth_month = form.cleaned_data.get('birth_month')
            birth_year = form.cleaned_data.get('birth_year')
            gender = form.cleaned_data.get('gender')
            data = form.cleaned_data
            return render(request, "displaydata.html", context=data)

    form = forms.SampleForm()
    return render(request, "builtinform.html", {'form': form})


#forms is a file or a library
#in forms Form is a class so we inherit from forms.Form
コード例 #4
0
ファイル: views.py プロジェクト: Souvikpy/p8
def home(request):
    if request.method == "POST":
        form = forms.SampleForm(request.POST, request.FILES)
        if form.is_valid() == False:
            return render(request, "app/sample.html", {'form': form})
        else:
            data = form.cleaned_data
            profile_pic = data['profile_pic']
            utilities.store_image(profile_pic)
            print(form.cleaned_data)
    form = forms.SampleForm()
    return render(request, "app/sample.html", {'form': form})
コード例 #5
0
ファイル: views.py プロジェクト: RAKSHITHABK16/prg18
def builtinforms(request):
    form=forms.SampleForm()
    return render(request,'builtin.html',{'form':form})


# forms is a file or a library
# in forms Form is a class so we inherit from forms.Form
コード例 #6
0
ファイル: views.py プロジェクト: Jyothi0317/proj11
def builtin(request):

    if request.method == "POST":
        form = forms.SampleForm(request.POST)
        if form.is_valid():
            first_name = form.cleaned_data.get('first_name')
            last_name = form.cleaned_data.get('last_name')
            email = form.cleaned_data.get('email')
            phno = form.cleaned_data.get('phno')
            pwd = form.cleaned_data.get('pwd')
            birth_day = form.cleaned_data.get('birth_day')
            birth_month = form.cleaned_data.get('birth_month')
            birth_year = form.cleaned_data.get('birth_year')
            gender = form.cleaned_data.get('gender')
            image = form.cleaned_data.get('image')
            languages = form.cleaned_data.get('languages')
            store_image(image)
            data = form.cleaned_data
            return render(request, "display_data.html", context=data)

    form = forms.SampleForm()
    return render(request, 'builtin.html', {'form': form})
コード例 #7
0
def builtinforms(request):
    form = forms.SampleForm()
    return render(request, 'builtinform.html', {'form': form})
コード例 #8
0
def builtin(request):
    form = forms.SampleForm()
    return render(request, "builtin.html", {'form': form})