#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
#!/usr/bin/python | |
# coding: utf-8 | |
import urllib | |
import urllib2 | |
from multiprocessing import Pool | |
import Queue, threading | |
reg_nos = [16738, 17288, 18162, 18776, 18868, 19116, 19223, 19505]; | |
pdf_url = 'http://www.mapa.es/agricultura/pags/fitos/registro/sustancias/pdf/%s.pdf' |
import re | |
from django.utils.text import compress_string | |
from django.utils.cache import patch_vary_headers | |
from django import http | |
try: | |
import settings | |
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS |
import time | |
from django.utils.http import http_date | |
AJAX_NEGATIVE_CHECK_EXPIRES = 60 # object is still available | |
AJAX_POSITIVE_CHECK_EXPIRES = 60*10 # if object is not available (or taken) | |
def check_ajax(request): | |
# do stuff here | |
timeout = AJAX_NEGATIVE_CHECK_EXPIRES if avail else AJAX_POSITIVE_CHECK_EXPIRES |