# Path: www/maposmatic/gisdb.py
# _DB = None
#         _DB = psycopg2.connect("dbname='%s' user='%s' host='%s' password='%s' port='%s'" %
#                                 (www.settings.GIS_DATABASE_NAME,
#                                  www.settings.GIS_DATABASE_USER,
#                                  www.settings.GIS_DATABASE_HOST,
#                                  www.settings.GIS_DATABASE_PASSWORD,
#                                  www.settings.GIS_DATABASE_PORT))
#         _DB = None
# def get():
# 
# Path: www/maposmatic/forms.py
# class MapSearchForm(forms.Form):
# class MapRenderingJobForm(forms.ModelForm):
#     class Meta:
# class MapPaperSizeForm(forms.Form):
# class MapRecreateForm(forms.Form):
# class MapCancelForm(forms.Form):
#     MODES = (('admin', _('Administrative boundary')),
#              ('bbox', _('Bounding box')))
#     ORIENTATION = (('portrait', _('Portrait')),
#                    ('landscape', _('Landscape')))
#     def __init__(self, *args, **kwargs):
#         def _build_papersize_description(p):
#     def clean(self):
#     def _check_osm_id(self, osm_id):
#     def clean(self):
#     def clean(self):


import django
import django.utils.translation
import feedparser
import datetime
import www.settings
import psycopg2
from django.core.urlresolvers import reverse
from models import MapRenderingJob
from www.maposmatic import gisdb
from www.maposmatic import forms

        return last_update[0]
    except:
        pass
    finally:
        # Close the DB cursor if necessary
        if cursor is not None and not cursor.closed:
            cursor.close()

    return None

def all(request):
    # Do not add the useless overhead of parsing blog entries when generating
    # the rss feed
    if (django.VERSION[1] >= 4 and request.path == reverse('rss-feed')) or \
       (django.VERSION[1] < 4 and request.path == reverse('rss-feed', args=['maps'])):
        return {}

    l = django.utils.translation.get_language()
    if www.settings.PAYPAL_LANGUAGES.has_key(l):
        paypal_lang_code = www.settings.PAYPAL_LANGUAGES[l][0]
        paypal_country_code = www.settings.PAYPAL_LANGUAGES[l][1]
    else:
        paypal_lang_code = "en_US"
        paypal_country_code = "US"

    daemon_running = www.settings.is_daemon_running()
    gis_lastupdate = get_osm_database_last_update()
    gis_lag_ok = (gis_lastupdate
        and datetime.datetime.utcnow() - gis_lastupdate < datetime.timedelta(minutes=10)

# Path: www/maposmatic/gisdb.py
# _DB = None
#         _DB = psycopg2.connect("dbname='%s' user='%s' host='%s' password='%s' port='%s'" %
#                                 (www.settings.GIS_DATABASE_NAME,
#                                  www.settings.GIS_DATABASE_USER,
#                                  www.settings.GIS_DATABASE_HOST,
#                                  www.settings.GIS_DATABASE_PASSWORD,
#                                  www.settings.GIS_DATABASE_PORT))
#         _DB = None
# def get():
# 
# Path: www/maposmatic/forms.py
# class MapSearchForm(forms.Form):
# class MapRenderingJobForm(forms.ModelForm):
#     class Meta:
# class MapPaperSizeForm(forms.Form):
# class MapRecreateForm(forms.Form):
# class MapCancelForm(forms.Form):
#     MODES = (('admin', _('Administrative boundary')),
#              ('bbox', _('Bounding box')))
#     ORIENTATION = (('portrait', _('Portrait')),
#                    ('landscape', _('Landscape')))
#     def __init__(self, *args, **kwargs):
#         def _build_papersize_description(p):
#     def clean(self):
#     def _check_osm_id(self, osm_id):
#     def clean(self):
#     def clean(self):


# Path: www/maposmatic/context_processors.py
import django
import django.utils.translation
import feedparser
import datetime
import www.settings
import psycopg2
from django.core.urlresolvers import reverse
from models import MapRenderingJob
from www.maposmatic import gisdb
from www.maposmatic import forms


        return last_update[0]
    except:
        pass
    finally:
        # Close the DB cursor if necessary
        if cursor is not None and not cursor.closed:
            cursor.close()

    return None

def all(request):
    # Do not add the useless overhead of parsing blog entries when generating
    # the rss feed
    if (django.VERSION[1] >= 4 and request.path == reverse('rss-feed')) or \
       (django.VERSION[1] < 4 and request.path == reverse('rss-feed', args=['maps'])):
        return {}

    l = django.utils.translation.get_language()
    if www.settings.PAYPAL_LANGUAGES.has_key(l):
        paypal_lang_code = www.settings.PAYPAL_LANGUAGES[l][0]
        paypal_country_code = www.settings.PAYPAL_LANGUAGES[l][1]
    else:
        paypal_lang_code = "en_US"
        paypal_country_code = "US"

    daemon_running = www.settings.is_daemon_running()
    gis_lastupdate = get_osm_database_last_update()
    gis_lag_ok = (gis_lastupdate
        and datetime.datetime.utcnow() - gis_lastupdate < datetime.timedelta(minutes=10)

        or False)