version-based mobile app upgrade

This commit is contained in:
wajeeha-khalid
2016-02-16 13:55:03 +05:00
parent a52cafcc9e
commit 86e954f642
20 changed files with 687 additions and 88 deletions

View File

@@ -29,7 +29,7 @@ def is_request_from_mobile_app(request):
user_agent = request.META.get('HTTP_USER_AGENT')
if user_agent:
for user_agent_regex in settings.MOBILE_APP_USER_AGENT_REGEXES:
if re.match(user_agent_regex, user_agent):
if re.search(user_agent_regex, user_agent):
return True
return False