File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ def dashboard(request):
31
31
@login_required
32
32
def profile (request ):
33
33
if request .method == "POST" :
34
- city = request .POST [ 'city' ]
35
- contact_no = request .POST [ 'contact_no' ]
34
+ city = request .POST . get ( 'city' )
35
+ contact_no = request .POST . get ( 'contact_no' )
36
36
Profile .objects .create (user = request .user , city = city , contact_no = contact_no )
37
37
return HttpResponseRedirect ("/profiles" )
38
38
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ <h2 class="text-center">Edit Profile</h2>
42
42
< div class ="form-group ">
43
43
< label for ="contact " class ="col-lg-4 control-label "> Contact :</ label >
44
44
< div class ="col-lg-8 ">
45
- < input autofocus ="autofocus " name ="contact_no " placeholder ="Enter Your Contact No: " type ="text " pattern ="/(7|8|9) \d{9}/ ">
45
+ < input autofocus ="autofocus " name ="contact_no " placeholder ="Enter Your Contact No: " type ="text " pattern ="\d{10} ">
46
46
</ div >
47
47
</ div >
48
48
< div class ="form-group ">
You can’t perform that action at this time.
0 commit comments