![]() |
2010-05-22
, 16:41
|
|
Posts: 518 |
Thanked: 334 times |
Joined on Mar 2010
@ italy
|
#81
|
![]() |
2010-05-22
, 17:55
|
Posts: 55 |
Thanked: 9 times |
Joined on May 2010
|
#82
|
![]() |
2010-05-22
, 18:02
|
|
Posts: 288 |
Thanked: 113 times |
Joined on Dec 2009
@ Germany
|
#83
|
hi guys, i love that app! i want to setup with vodafone it, can u tell me how can i do thios? thank u soo much!!! lovely app!!!
![]() |
2010-05-22
, 18:22
|
|
Posts: 518 |
Thanked: 334 times |
Joined on Mar 2010
@ italy
|
#84
|
![]() |
2010-05-22
, 19:48
|
|
Posts: 288 |
Thanked: 113 times |
Joined on Dec 2009
@ Germany
|
#85
|
i just want to edit your script... i made 80% of work but it says only german numbers ;(
def num_regexp(self, num): # Get rid of everything except num = re.sub(r'[^(0-9)|\+]', '', num) # handle a couple of number formats (only mobile numbers allowed) if re.search(r'^\+316\d{8}$', num): # ITU format, +31 is the Netherlands num = number[3:] return True, num, 'Valid Number' elif re.search(r'^06\d{8}$', num): # local dialing format num = number[1:] return True, num, 'Valid Number' else: return False, num, 'Only Dutch mobile phone numbers allowed'
The Following User Says Thank You to blubbi For This Useful Post: | ||
![]() |
2010-05-23
, 12:55
|
|
Posts: 518 |
Thanked: 334 times |
Joined on Mar 2010
@ italy
|
#86
|
Some more details please.
Who says only German numbers?
There isn't even the word German in the code.
If you mean "Only Dutch mobile phone numbers allowed"
You have to edit the regular expressions to match those allowed by your host and take care of the format of the numbers.
Here's some information about regexp:
http://docs.python.org/library/re.html
This is the Code I am talking about.
CheersCode:def num_regexp(self, num): # Get rid of everything except num = re.sub(r'[^(0-9)|\+]', '', num) # handle a couple of number formats (only mobile numbers allowed) if re.search(r'^\+316\d{8}$', num): # ITU format, +31 is the Netherlands num = number[3:] return True, num, 'Valid Number' elif re.search(r'^06\d{8}$', num): # local dialing format num = number[1:] return True, num, 'Valid Number' else: return False, num, 'Only Dutch mobile phone numbers allowed'
Bjoern
![]() |
2010-05-23
, 12:59
|
|
Posts: 518 |
Thanked: 334 times |
Joined on Mar 2010
@ italy
|
#87
|
in details... i have to change the local dialing... vodafone numbers start like +39 (area code) 3 .... what i have to edit? sorry but i'm totally noob bout py thank and more thank for your great work u made a gorgeus app!
def num_regexp(self, num):
# Get rid of everything except
num = re.sub(r'[^(0-9)|\+]', '', num)
# handle a couple of number formats (only mobile numbers allowed)
if re.search(r'^\+393\d{8}$', num): # ITU format, +39 is the Italy
num = number[3:]
return True, num, 'Valid Number'
elif re.search(r'^03\d{8}$', num): # local dialing format
num = number[1:]
return True, num, 'Valid Number'
else:
return False, num, 'Only Italian numbers are allowed'
![]() |
2010-05-23
, 13:29
|
|
Posts: 288 |
Thanked: 113 times |
Joined on Dec 2009
@ Germany
|
#88
|
The Following User Says Thank You to blubbi For This Useful Post: | ||
![]() |
2010-05-23
, 13:59
|
|
Posts: 518 |
Thanked: 334 times |
Joined on Mar 2010
@ italy
|
#89
|
![]() |
2010-05-26
, 12:03
|
Posts: 729 |
Thanked: 155 times |
Joined on Dec 2009
|
#90
|