code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
"Implementation of tzinfo classes for use with datetime.datetime."
import time
from datetime import timedelta, tzinfo
from django.utils.encoding import smart_unicode, smart_str, DEFAULT_LOCALE_ENCODING
# Python's doc say: "A tzinfo subclass must have an __init__() method that can
# be called with no arguments". Fixe... | [
[
8,
0,
0.0102,
0.0102,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0306,
0.0102,
0,
0.66,
0.2,
654,
0,
1,
0,
0,
654,
0,
0
],
[
1,
0,
0.0408,
0.0102,
0,
0.66,
... | [
"\"Implementation of tzinfo classes for use with datetime.datetime.\"",
"import time",
"from datetime import timedelta, tzinfo",
"from django.utils.encoding import smart_unicode, smart_str, DEFAULT_LOCALE_ENCODING",
"class FixedOffset(tzinfo):\n \"Fixed offset in minutes east from UTC.\"\n def __init_... |
import decimal
import datetime
from django.conf import settings
from django.utils import dateformat, numberformat, datetime_safe
from django.utils.importlib import import_module
from django.utils.encoding import smart_str
from django.utils.functional import lazy
from django.utils.safestring import mark_safe
from djang... | [
[
1,
0,
0.0053,
0.0053,
0,
0.66,
0,
349,
0,
1,
0,
0,
349,
0,
0
],
[
1,
0,
0.0105,
0.0053,
0,
0.66,
0.0476,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0211,
0.0053,
0,
... | [
"import decimal",
"import datetime",
"from django.conf import settings",
"from django.utils import dateformat, numberformat, datetime_safe",
"from django.utils.importlib import import_module",
"from django.utils.encoding import smart_str",
"from django.utils.functional import lazy",
"from django.utils... |
"""
Functions for reversing a regular expression (used in reverse URL resolving).
Used internally by Django and not intended for external use.
This is not, and is not intended to be, a complete reg-exp decompiler. It
should be good enough for a large class of URLS, however.
"""
# Mapping of an escape character to a r... | [
[
8,
0,
0.0118,
0.0207,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0518,
0.0355,
0,
0.66,
0.1,
775,
0,
0,
0,
0,
0,
6,
0
],
[
3,
0,
0.0814,
0.0178,
0,
0.66,
... | [
"\"\"\"\nFunctions for reversing a regular expression (used in reverse URL resolving).\nUsed internally by Django and not intended for external use.\n\nThis is not, and is not intended to be, a complete reg-exp decompiler. It\nshould be good enough for a large class of URLS, however.\n\"\"\"",
"ESCAPE_MAPPINGS = ... |
import HTMLParser as _HTMLParser
import re
import sys
current_version = sys.version_info
use_workaround = (
(current_version < (2, 7, 3)) or
(current_version >= (3, 0) and current_version < (3, 2, 3))
)
if not use_workaround:
HTMLParser = _HTMLParser.HTMLParser
else:
class HTMLParser(_HTMLParser.HTML... | [
[
1,
0,
0.0093,
0.0093,
0,
0.66,
0,
217,
0,
1,
0,
0,
217,
0,
0
],
[
1,
0,
0.0185,
0.0093,
0,
0.66,
0.2,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0278,
0.0093,
0,
0.6... | [
"import HTMLParser as _HTMLParser",
"import re",
"import sys",
"current_version = sys.version_info",
"use_workaround = (\n (current_version < (2, 7, 3)) or\n (current_version >= (3, 0) and current_version < (3, 2, 3))\n)",
"if not use_workaround:\n HTMLParser = _HTMLParser.HTMLParser\nelse:\n ... |
import re
import unicodedata
import warnings
from gzip import GzipFile
from htmlentitydefs import name2codepoint
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django.utils.encoding import force_unicode
from django.utils.functional import allow_lazy, SimpleLazyObjec... | [
[
1,
0,
0.0026,
0.0026,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0052,
0.0026,
0,
0.66,
0.0238,
759,
0,
1,
0,
0,
759,
0,
0
],
[
1,
0,
0.0079,
0.0026,
0,
... | [
"import re",
"import unicodedata",
"import warnings",
"from gzip import GzipFile",
"from htmlentitydefs import name2codepoint",
"try:\n from cStringIO import StringIO\nexcept ImportError:\n from StringIO import StringIO",
" from cStringIO import StringIO",
" from StringIO import StringIO",... |
import os
import stat
from os.path import join, normcase, normpath, abspath, isabs, sep
from django.utils.encoding import force_unicode
try:
WindowsError = WindowsError
except NameError:
class WindowsError(Exception):
pass
# Define our own abspath function that can handle joining
# unicode paths to a... | [
[
1,
0,
0.0135,
0.0135,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.027,
0.0135,
0,
0.66,
0.1429,
48,
0,
1,
0,
0,
48,
0,
0
],
[
1,
0,
0.0405,
0.0135,
0,
0.6... | [
"import os",
"import stat",
"from os.path import join, normcase, normpath, abspath, isabs, sep",
"from django.utils.encoding import force_unicode",
"try:\n WindowsError = WindowsError\nexcept NameError:\n class WindowsError(Exception):\n pass",
" WindowsError = WindowsError",
" class ... |
import logging
import traceback
from django.conf import settings
from django.core import mail
from django.views.debug import ExceptionReporter, get_exception_reporter_filter
# Make sure a NullHandler is available
# This was added in Python 2.7/3.2
try:
from logging import NullHandler
except ImportError:
class... | [
[
1,
0,
0.0095,
0.0095,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.019,
0.0095,
0,
0.66,
0.0833,
423,
0,
1,
0,
0,
423,
0,
0
],
[
1,
0,
0.0381,
0.0095,
0,
0... | [
"import logging",
"import traceback",
"from django.conf import settings",
"from django.core import mail",
"from django.views.debug import ExceptionReporter, get_exception_reporter_filter",
"try:\n from logging import NullHandler\nexcept ImportError:\n class NullHandler(logging.Handler):\n def... |
"""Implementation of JSONEncoder
"""
import re
c_encode_basestring_ascii = None
c_make_encoder = None
ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]')
ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])')
HAS_UTF8 = re.compile(r'[\x80-\xff]')
ESCAPE_DCT = {
'\\': '\\\\',
'"': '\\"',
'\b': '\\b',
'\f': '\\f',
... | [
[
8,
0,
0.0035,
0.0047,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.007,
0.0023,
0,
0.66,
0.0667,
540,
0,
1,
0,
0,
540,
0,
0
],
[
14,
0,
0.0117,
0.0023,
0,
0.66... | [
"\"\"\"Implementation of JSONEncoder\n\"\"\"",
"import re",
"c_encode_basestring_ascii = None",
"c_make_encoder = None",
"ESCAPE = re.compile(r'[\\x00-\\x1f\\\\\"\\b\\f\\n\\r\\t]')",
"ESCAPE_ASCII = re.compile(r'([\\\\\"]|[^\\ -~])')",
"HAS_UTF8 = re.compile(r'[\\x80-\\xff]')",
"ESCAPE_DCT = {\n '\... |
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... | [
[
8,
0,
0.1416,
0.2805,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2975,
0.0028,
0,
0.66,
0.2,
162,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.3031,
0.0028,
0,
0.66,
... | [
"r\"\"\"JSON (JavaScript Object Notation) <http://json.org> is a subset of\nJavaScript syntax (ECMA-262 3rd edition) used as a lightweight data\ninterchange format.\n\n:mod:`simplejson` exposes an API familiar to users of the standard library\n:mod:`marshal` and :mod:`pickle` modules. It is the externally maintaine... |
"""JSON token scanner
"""
import re
try:
from simplejson._speedups import make_scanner as c_make_scanner
except ImportError:
c_make_scanner = None
__all__ = ['make_scanner']
NUMBER_RE = re.compile(
r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?',
(re.VERBOSE | re.MULTILINE | re.DOTALL))
def py_make_scan... | [
[
8,
0,
0.0231,
0.0308,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0462,
0.0154,
0,
0.66,
0.1667,
540,
0,
1,
0,
0,
540,
0,
0
],
[
7,
0,
0.0846,
0.0615,
0,
0.66... | [
"\"\"\"JSON token scanner\n\"\"\"",
"import re",
"try:\n from simplejson._speedups import make_scanner as c_make_scanner\nexcept ImportError:\n c_make_scanner = None",
" from simplejson._speedups import make_scanner as c_make_scanner",
" c_make_scanner = None",
"__all__ = ['make_scanner']",
... |
"""
A class for storing a tree graph. Primarily used for filter constructs in the
ORM.
"""
import copy
class Node(object):
"""
A single internal node in the tree graph. A Node should be viewed as a
connection (the root) with the children being either leaf nodes or other
Node instances.
"""
# S... | [
[
8,
0,
0.0163,
0.0261,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0392,
0.0065,
0,
0.66,
0.5,
739,
0,
1,
0,
0,
739,
0,
0
],
[
3,
0,
0.5229,
0.9477,
0,
0.66,
... | [
"\"\"\"\nA class for storing a tree graph. Primarily used for filter constructs in the\nORM.\n\"\"\"",
"import copy",
"class Node(object):\n \"\"\"\n A single internal node in the tree graph. A Node should be viewed as a\n connection (the root) with the children being either leaf nodes or other\n No... |
"""
Providing iterator functions that are not in all version of Python we support.
Where possible, we try to use the system-native version and only fall back to
these implementations if necessary.
"""
import __builtin__
import itertools
import warnings
# Fallback for Python 2.5
def product(*args, **kwds):
"""
... | [
[
8,
0,
0.0667,
0.1111,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1556,
0.0222,
0,
0.66,
0.125,
364,
0,
1,
0,
0,
364,
0,
0
],
[
1,
0,
0.1778,
0.0222,
0,
0.66,... | [
"\"\"\"\nProviding iterator functions that are not in all version of Python we support.\nWhere possible, we try to use the system-native version and only fall back to\nthese implementations if necessary.\n\"\"\"",
"import __builtin__",
"import itertools",
"import warnings",
"def product(*args, **kwds):\n ... |
import django
import re
def get_svn_revision(path=None):
"""
Returns the SVN revision in the form SVN-XXXX,
where XXXX is the revision number.
Returns SVN-unknown if anything goes wrong, such as an unexpected
format of internal SVN files.
If path is provided, it should be a directory whose SV... | [
[
1,
0,
0.0244,
0.0244,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0488,
0.0244,
0,
0.66,
0.5,
540,
0,
1,
0,
0,
540,
0,
0
],
[
2,
0,
0.5488,
0.9268,
0,
0.6... | [
"import django",
"import re",
"def get_svn_revision(path=None):\n \"\"\"\n Returns the SVN revision in the form SVN-XXXX,\n where XXXX is the revision number.\n\n Returns SVN-unknown if anything goes wrong, such as an unexpected\n format of internal SVN files.",
" \"\"\"\n Returns the SVN... |
from django.conf import settings
from django.utils.safestring import mark_safe
def format(number, decimal_sep, decimal_pos=None, grouping=0, thousand_sep='',
force_grouping=False):
"""
Gets a number (as a number or string), and returns it as a string,
using formats defined as arguments:
* ... | [
[
1,
0,
0.02,
0.02,
0,
0.66,
0,
128,
0,
1,
0,
0,
128,
0,
0
],
[
1,
0,
0.04,
0.02,
0,
0.66,
0.5,
375,
0,
1,
0,
0,
375,
0,
0
],
[
2,
0,
0.54,
0.9,
0,
0.66,
1,
... | [
"from django.conf import settings",
"from django.utils.safestring import mark_safe",
"def format(number, decimal_sep, decimal_pos=None, grouping=0, thousand_sep='',\n force_grouping=False):\n \"\"\"\n Gets a number (as a number or string), and returns it as a string,\n using formats defined a... |
"""Utilities for writing code that runs on Python 2 and 3"""
import operator
import sys
import types
__author__ = "Benjamin Peterson <benjamin@python.org>"
__version__ = "1.2.0"
# True if we are running on Python 3.
PY3 = sys.version_info[0] == 3
if PY3:
string_types = str,
integer_types = int,
class_t... | [
[
8,
0,
0.0026,
0.0026,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0079,
0.0026,
0,
0.66,
0.025,
616,
0,
1,
0,
0,
616,
0,
0
],
[
1,
0,
0.0105,
0.0026,
0,
0.66,... | [
"\"\"\"Utilities for writing code that runs on Python 2 and 3\"\"\"",
"import operator",
"import sys",
"import types",
"__author__ = \"Benjamin Peterson <benjamin@python.org>\"",
"__version__ = \"1.2.0\"",
"PY3 = sys.version_info[0] == 3",
"if PY3:\n string_types = str,\n integer_types = int,\n ... |
"""
Based on "python-archive" -- http://pypi.python.org/pypi/python-archive/
Copyright (c) 2010 Gary Wilson Jr. <gary.wilson@gmail.com> and contributers.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the So... | [
[
8,
0,
0.0603,
0.1156,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1206,
0.005,
0,
0.66,
0.0714,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.1256,
0.005,
0,
0.66,
... | [
"\"\"\"\nBased on \"python-archive\" -- http://pypi.python.org/pypi/python-archive/\n\nCopyright (c) 2010 Gary Wilson Jr. <gary.wilson@gmail.com> and contributers.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"),... |
"""Timezone helper functions.
This module uses pytz when it's available and fallbacks when it isn't.
"""
from datetime import datetime, timedelta, tzinfo
from threading import local
import time as _time
try:
import pytz
except ImportError:
pytz = None
from django.conf import settings
__all__ = [
'utc',... | [
[
8,
0,
0.0089,
0.0142,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0213,
0.0035,
0,
0.66,
0.037,
426,
0,
3,
0,
0,
426,
0,
0
],
[
1,
0,
0.0248,
0.0035,
0,
0.66,... | [
"\"\"\"Timezone helper functions.\n\nThis module uses pytz when it's available and fallbacks when it isn't.\n\"\"\"",
"from datetime import datetime, timedelta, tzinfo",
"from threading import local",
"import time as _time",
"try:\n import pytz\nexcept ImportError:\n pytz = None",
" import pytz",... |
"""HTML utilities suitable for global use."""
import re
import string
import urllib
import urlparse
from django.utils.safestring import SafeData, mark_safe
from django.utils.encoding import smart_str, force_unicode
from django.utils.functional import allow_lazy
from django.utils.text import normalize_newlines
# Conf... | [
[
8,
0,
0.0043,
0.0043,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.013,
0.0043,
0,
0.66,
0.0233,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0174,
0.0043,
0,
0.66,... | [
"\"\"\"HTML utilities suitable for global use.\"\"\"",
"import re",
"import string",
"import urllib",
"import urlparse",
"from django.utils.safestring import SafeData, mark_safe",
"from django.utils.encoding import smart_str, force_unicode",
"from django.utils.functional import allow_lazy",
"from dj... |
"""
Django's standard crypto functions and utilities.
"""
import hmac
import struct
import hashlib
import binascii
import operator
import time
# Use the system PRNG if possible
import random
try:
random = random.SystemRandom()
using_sysrandom = True
except NotImplementedError:
import warnings
warnings... | [
[
8,
0,
0.0127,
0.019,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0316,
0.0063,
0,
0.66,
0.0556,
993,
0,
1,
0,
0,
993,
0,
0
],
[
1,
0,
0.038,
0.0063,
0,
0.66,
... | [
"\"\"\"\nDjango's standard crypto functions and utilities.\n\"\"\"",
"import hmac",
"import struct",
"import hashlib",
"import binascii",
"import operator",
"import time",
"import random",
"try:\n random = random.SystemRandom()\n using_sysrandom = True\nexcept NotImplementedError:\n import ... |
# This code was mostly based on ipaddr-py
# Copyright 2007 Google Inc. http://code.google.com/p/ipaddr-py/
# Licensed under the Apache License, Version 2.0 (the "License").
from django.core.exceptions import ValidationError
def clean_ipv6_address(ip_str, unpack_ipv4=False,
error_message="This is not a valid IP... | [
[
1,
0,
0.015,
0.0037,
0,
0.66,
0,
160,
0,
1,
0,
0,
160,
0,
0
],
[
2,
0,
0.1704,
0.2996,
0,
0.66,
0.1667,
569,
0,
3,
1,
0,
0,
0,
12
],
[
8,
1,
0.0637,
0.0712,
1,
0.... | [
"from django.core.exceptions import ValidationError",
"def clean_ipv6_address(ip_str, unpack_ipv4=False,\n error_message=\"This is not a valid IPv6 address\"):\n \"\"\"\n Cleans a IPv6 address string.\n\n Validity is checked by calling is_valid_ipv6_address() - if an\n invalid address is passed... |
# Taken from Python 2.7 with permission from/by the original author.
import sys
def _resolve_name(name, package, level):
"""Return the absolute name of the module to be imported."""
if not hasattr(package, 'rindex'):
raise ValueError("'package' not set to a string")
dot = len(package)
for x in ... | [
[
1,
0,
0.0556,
0.0278,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
2,
0,
0.2639,
0.3333,
0,
0.66,
0.5,
132,
0,
3,
1,
0,
0,
0,
6
],
[
8,
1,
0.1389,
0.0278,
1,
0.09,... | [
"import sys",
"def _resolve_name(name, package, level):\n \"\"\"Return the absolute name of the module to be imported.\"\"\"\n if not hasattr(package, 'rindex'):\n raise ValueError(\"'package' not set to a string\")\n dot = len(package)\n for x in xrange(level, 1, -1):\n try:\n ... |
"""Functions to parse datetime objects."""
# We're using regular expressions rather than time.strptime because:
# - They provide both validation and parsing.
# - They're more flexible for datetimes.
# - The date/datetime/time constructors produce friendlier error messages.
import datetime
import re
from django.utils.... | [
[
8,
0,
0.0118,
0.0118,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0941,
0.0118,
0,
0.66,
0.1,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.1059,
0.0118,
0,
0.66,
... | [
"\"\"\"Functions to parse datetime objects.\"\"\"",
"import datetime",
"import re",
"from django.utils.timezone import utc",
"from django.utils.tzinfo import FixedOffset",
"date_re = re.compile(\n r'(?P<year>\\d{4})-(?P<month>\\d{1,2})-(?P<day>\\d{1,2})$'\n)",
"datetime_re = re.compile(\n r'(?P<ye... |
"""
Fixes Python 2.4's failure to deepcopy unbound functions.
"""
import copy
import types
import warnings
warnings.warn("django.utils.copycompat is deprecated; use the native copy module instead",
PendingDeprecationWarning)
# Monkeypatch copy's deepcopy registry to handle functions correctly.
if (hasa... | [
[
8,
0,
0.1111,
0.1667,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2778,
0.0556,
0,
0.66,
0.1667,
739,
0,
1,
0,
0,
739,
0,
0
],
[
1,
0,
0.3333,
0.0556,
0,
0.66... | [
"\"\"\"\nFixes Python 2.4's failure to deepcopy unbound functions.\n\"\"\"",
"import copy",
"import types",
"import warnings",
"warnings.warn(\"django.utils.copycompat is deprecated; use the native copy module instead\",\n PendingDeprecationWarning)",
"if (hasattr(copy, '_deepcopy_dispatch') ... |
"""
The md5 and sha modules are deprecated since Python 2.5, replaced by the
hashlib module containing both hash algorithms. Here, we provide a common
interface to the md5 and sha constructors, depending on system version.
"""
import warnings
warnings.warn("django.utils.hashcompat is deprecated; use hashlib instead",
... | [
[
8,
0,
0.2,
0.3333,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.4667,
0.0667,
0,
0.66,
0.1429,
358,
0,
1,
0,
0,
358,
0,
0
],
[
8,
0,
0.5667,
0.1333,
0,
0.66,
... | [
"\"\"\"\nThe md5 and sha modules are deprecated since Python 2.5, replaced by the\nhashlib module containing both hash algorithms. Here, we provide a common\ninterface to the md5 and sha constructors, depending on system version.\n\"\"\"",
"import warnings",
"warnings.warn(\"django.utils.hashcompat is deprecate... |
import copy
from types import GeneratorType
class MergeDict(object):
"""
A simple class for creating new "virtual" dictionaries that actually look
up values in more than one dictionary, passed in the constructor.
If a key appears in more than one of the given dictionaries, only the
first occurrenc... | [
[
1,
0,
0.002,
0.002,
0,
0.66,
0,
739,
0,
1,
0,
0,
739,
0,
0
],
[
1,
0,
0.0039,
0.002,
0,
0.66,
0.125,
209,
0,
1,
0,
0,
209,
0,
0
],
[
3,
0,
0.0994,
0.185,
0,
0.66,... | [
"import copy",
"from types import GeneratorType",
"class MergeDict(object):\n \"\"\"\n A simple class for creating new \"virtual\" dictionaries that actually look\n up values in more than one dictionary, passed in the constructor.\n\n If a key appears in more than one of the given dictionaries, only... |
"""
Syndication feed generation library -- used for generating RSS, etc.
Sample usage:
>>> from django.utils import feedgenerator
>>> feed = feedgenerator.Rss201rev2Feed(
... title=u"Poynter E-Media Tidbits",
... link=u"http://www.poynter.org/column.asp?id=31",
... description=u"A group Weblog by the shar... | [
[
8,
0,
0.0328,
0.063,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0682,
0.0026,
0,
0.66,
0.0625,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0709,
0.0026,
0,
0.66,... | [
"\"\"\"\nSyndication feed generation library -- used for generating RSS, etc.\n\nSample usage:\n\n>>> from django.utils import feedgenerator\n>>> feed = feedgenerator.Rss201rev2Feed(\n... title=u\"Poynter E-Media Tidbits\",",
"import datetime",
"import urlparse",
"from django.utils.xmlutils import Simpler... |
# Python's datetime strftime doesn't handle dates before 1900.
# These classes override date and datetime to support the formatting of a date
# through its full "proleptic Gregorian" date range.
#
# Based on code submitted to comp.lang.python by Andrew Dalke
#
# >>> datetime_safe.date(1850, 8, 2).strftime("%Y/%m/%d was... | [
[
1,
0,
0.1124,
0.0112,
0,
0.66,
0,
426,
0,
2,
0,
0,
426,
0,
0
],
[
1,
0,
0.1236,
0.0112,
0,
0.66,
0.1111,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.1348,
0.0112,
0,
... | [
"from datetime import date as real_date, datetime as real_datetime",
"import re",
"import time",
"class date(real_date):\n def strftime(self, fmt):\n return strftime(self, fmt)",
" def strftime(self, fmt):\n return strftime(self, fmt)",
" return strftime(self, fmt)",
"class da... |
"""Translation helper functions."""
import locale
import os
import re
import sys
import gettext as gettext_module
from threading import local
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django.utils.importlib import import_module
from django.utils.safestring imp... | [
[
8,
0,
0.0017,
0.0017,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.005,
0.0017,
0,
0.66,
0.02,
884,
0,
1,
0,
0,
884,
0,
0
],
[
1,
0,
0.0066,
0.0017,
0,
0.66,
... | [
"\"\"\"Translation helper functions.\"\"\"",
"import locale",
"import os",
"import re",
"import sys",
"import gettext as gettext_module",
"from threading import local",
"try:\n from cStringIO import StringIO\nexcept ImportError:\n from StringIO import StringIO",
" from cStringIO import Stri... |
# These are versions of the functions in django.utils.translation.trans_real
# that don't actually do anything. This is purely for performance, so that
# settings.USE_I18N = False can use this module rather than trans_real.py.
from django.conf import settings
from django.utils.encoding import force_unicode
from django... | [
[
1,
0,
0.0794,
0.0159,
0,
0.66,
0,
128,
0,
1,
0,
0,
128,
0,
0
],
[
1,
0,
0.0952,
0.0159,
0,
0.66,
0.0526,
96,
0,
1,
0,
0,
96,
0,
0
],
[
1,
0,
0.1111,
0.0159,
0,
0.... | [
"from django.conf import settings",
"from django.utils.encoding import force_unicode",
"from django.utils.safestring import mark_safe, SafeData",
"def ngettext(singular, plural, number):\n if number == 1: return singular\n return plural",
" if number == 1: return singular",
" if number == 1: r... |
"""
Internationalization support.
"""
import warnings
from os import path
from django.utils.encoding import force_unicode
from django.utils.functional import lazy
from django.utils.importlib import import_module
__all__ = [
'activate', 'deactivate', 'override', 'deactivate_all',
'get_language', 'get_languag... | [
[
8,
0,
0.0121,
0.0182,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0242,
0.0061,
0,
0.66,
0.0278,
358,
0,
1,
0,
0,
358,
0,
0
],
[
1,
0,
0.0303,
0.0061,
0,
0.66... | [
"\"\"\"\nInternationalization support.\n\"\"\"",
"import warnings",
"from os import path",
"from django.utils.encoding import force_unicode",
"from django.utils.functional import lazy",
"from django.utils.importlib import import_module",
"__all__ = [\n 'activate', 'deactivate', 'override', 'deactivat... |
"""
This module contains helper functions for controlling caching. It does so by
managing the "Vary" header of responses. It includes functions to patch the
header of response objects directly and decorators that change functions to do
that header-patching themselves.
For information on the Vary header, see:
http... | [
[
8,
0,
0.0377,
0.0714,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0794,
0.004,
0,
0.66,
0.0435,
154,
0,
1,
0,
0,
154,
0,
0
],
[
1,
0,
0.0833,
0.004,
0,
0.66,
... | [
"\"\"\"\nThis module contains helper functions for controlling caching. It does so by\nmanaging the \"Vary\" header of responses. It includes functions to patch the\nheader of response objects directly and decorators that change functions to do\nthat header-patching themselves.\n\nFor information on the Vary header... |
from django.conf import settings
from django.contrib.sites.models import get_current_site
from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist
from django.http import HttpResponse, Http404
from django.template import loader, TemplateDoesNotExist, RequestContext
from django.utils import feedgenera... | [
[
1,
0,
0.0054,
0.0054,
0,
0.66,
0,
128,
0,
1,
0,
0,
128,
0,
0
],
[
1,
0,
0.0108,
0.0054,
0,
0.66,
0.0909,
890,
0,
1,
0,
0,
890,
0,
0
],
[
1,
0,
0.0161,
0.0054,
0,
... | [
"from django.conf import settings",
"from django.contrib.sites.models import get_current_site",
"from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist",
"from django.http import HttpResponse, Http404",
"from django.template import loader, TemplateDoesNotExist, RequestContext",
"from ... |
"""
Czech-specific form helpers
"""
from __future__ import absolute_import
import re
from django.contrib.localflavor.cz.cz_regions import REGION_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Select, RegexField, Field
from django.utils... | [
[
8,
0,
0.0134,
0.0201,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0336,
0.0067,
0,
0.66,
0.0769,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.047,
0.0067,
0,
0.66,... | [
"\"\"\"\nCzech-specific form helpers\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django.contrib.localflavor.cz.cz_regions import REGION_CHOICES",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields import Sel... |
"""
Czech regions, translations get from http://www.crwflags.com/fotw/Flags/cz-re.html
"""
from django.utils.translation import ugettext_lazy as _
REGION_CHOICES = (
('PR', _('Prague')),
('CE', _('Central Bohemian Region')),
('SO', _('South Bohemian Region')),
('PI', _('Pilsen Region')),
('CA', _(... | [
[
8,
0,
0.0909,
0.1364,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2273,
0.0455,
0,
0.66,
0.5,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.6591,
0.7273,
0,
0.66,
... | [
"\"\"\"\nCzech regions, translations get from http://www.crwflags.com/fotw/Flags/cz-re.html\n\"\"\"",
"from django.utils.translation import ugettext_lazy as _",
"REGION_CHOICES = (\n ('PR', _('Prague')),\n ('CE', _('Central Bohemian Region')),\n ('SO', _('South Bohemian Region')),\n ('PI', _('Pilsen... |
"""
India-specific Form helpers.
"""
from __future__ import absolute_import
import re
from django.contrib.localflavor.in_.in_states import STATES_NORMALIZED, STATE_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, CharF... | [
[
8,
0,
0.0174,
0.0261,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0435,
0.0087,
0,
0.66,
0.0769,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0609,
0.0087,
0,
0.66... | [
"\"\"\"\nIndia-specific Form helpers.\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django.contrib.localflavor.in_.in_states import STATES_NORMALIZED, STATE_CHOICES",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.form... |
"""
A mapping of state misspellings/abbreviations to normalized abbreviations, and
an alphabetical list of states for use as `choices` in a formfield.
This exists in this standalone file so that it's only imported into memory
when explicitly needed.
"""
STATE_CHOICES = (
('KA', 'Karnataka'),
('AP', 'Andhra Pr... | [
[
8,
0,
0.0301,
0.0526,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2105,
0.2932,
0,
0.66,
0.5,
633,
0,
0,
0,
0,
0,
8,
0
],
[
14,
0,
0.6842,
0.6391,
0,
0.66,
... | [
"\"\"\"\nA mapping of state misspellings/abbreviations to normalized abbreviations, and\nan alphabetical list of states for use as `choices` in a formfield.\n\nThis exists in this standalone file so that it's only imported into memory\nwhen explicitly needed.\n\"\"\"",
"STATE_CHOICES = (\n ('KA', 'Karnataka'),... |
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'H:i:s'
DATETIME_FORMAT = 'j. F Y H:i:s'
YEAR_MONTH... | [
[
14,
0,
0.1628,
0.0233,
0,
0.66,
0,
843,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.186,
0.0233,
0,
0.66,
0.0769,
662,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.2093,
0.0233,
0,
0.... | [
"DATE_FORMAT = 'j. F Y'",
"TIME_FORMAT = 'H:i:s'",
"DATETIME_FORMAT = 'j. F Y H:i:s'",
"YEAR_MONTH_FORMAT = 'F Y'",
"MONTH_DAY_FORMAT = 'j. F'",
"SHORT_DATE_FORMAT = 'd.m.Y'",
"SHORT_DATETIME_FORMAT = 'd.m.Y H:i:s'",
"FIRST_DAY_OF_WEEK = 1 # Monday",
"DATE_INPUT_FORMATS = (\n '%d.%m.%Y', '%d.%m.%... |
"""
NL-specific Form helpers
"""
from __future__ import absolute_import
import re
from django.contrib.localflavor.nl.nl_provinces import PROVINCE_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, Select
from django.utils.encoding i... | [
[
8,
0,
0.0192,
0.0288,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0481,
0.0096,
0,
0.66,
0.0667,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0673,
0.0096,
0,
0.66... | [
"\"\"\"\nNL-specific Form helpers\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django.contrib.localflavor.nl.nl_provinces import PROVINCE_CHOICES",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields import Fi... |
from django.utils.translation import ugettext_lazy as _
PROVINCE_CHOICES = (
('DR', _('Drenthe')),
('FL', _('Flevoland')),
('FR', _('Friesland')),
('GL', _('Gelderland')),
('GR', _('Groningen')),
('LB', _('Limburg')),
('NB', _('Noord-Brabant')),
('NH', _('Noord-Holland')),
('OV', _(... | [
[
1,
0,
0.0625,
0.0625,
0,
0.66,
0,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.5938,
0.875,
0,
0.66,
1,
540,
0,
0,
0,
0,
0,
8,
12
]
] | [
"from django.utils.translation import ugettext_lazy as _",
"PROVINCE_CHOICES = (\n ('DR', _('Drenthe')),\n ('FL', _('Flevoland')),\n ('FR', _('Friesland')),\n ('GL', _('Gelderland')),\n ('GR', _('Groningen')),\n ('LB', _('Limburg')),\n ('NB', _('Noord-Brabant')),"
] |
from __future__ import absolute_import
import datetime
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import RegexField, Select
from django.utils.translation import ugettext_lazy as _
from django.contrib.localflavor.mk.mk_choices import MK_MUNICIPALI... | [
[
1,
0,
0.0099,
0.0099,
0,
0.66,
0,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0297,
0.0099,
0,
0.66,
0.1111,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0495,
0.0099,
0,
... | [
"from __future__ import absolute_import",
"import datetime",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields import RegexField, Select",
"from django.utils.translation import ugettext_lazy as _",
"from django.contrib.localflavor.mk... |
# -*- coding: utf-8 -*-
"""
Macedonian municipalities per the reorganization from 2004.
"""
from django.utils.translation import ugettext_lazy as _
MK_MUNICIPALITIES = (
('AD', _(u'Aerodrom')),
('AR', _(u'Aračinovo')),
('BR', _(u'Berovo')),
('TL', _(u'Bitola')),
('BG', _(u'Bogdanci')),
('VJ', _... | [
[
8,
0,
0.0326,
0.0326,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0543,
0.0109,
0,
0.66,
0.5,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.538,
0.9348,
0,
0.66,
... | [
"\"\"\"\nMacedonian municipalities per the reorganization from 2004.\n\"\"\"",
"from django.utils.translation import ugettext_lazy as _",
"MK_MUNICIPALITIES = (\n ('AD', _(u'Aerodrom')),\n ('AR', _(u'Aračinovo')),\n ('BR', _(u'Berovo')),\n ('TL', _(u'Bitola')),\n ('BG', _(u'Bogdanci')),\n ('VJ... |
from django.db.models.fields import CharField
from django.utils.translation import ugettext_lazy as _
from django.contrib.localflavor.mk.mk_choices import MK_MUNICIPALITIES
from django.contrib.localflavor.mk.forms import (UMCNField as UMCNFormField,
MKIdentityCardNumberField as MKIdentityCardNumberFormField)
cla... | [
[
1,
0,
0.0227,
0.0227,
0,
0.66,
0,
5,
0,
1,
0,
0,
5,
0,
0
],
[
1,
0,
0.0455,
0.0227,
0,
0.66,
0.1667,
389,
0,
1,
0,
0,
389,
0,
0
],
[
1,
0,
0.0909,
0.0227,
0,
0.66... | [
"from django.db.models.fields import CharField",
"from django.utils.translation import ugettext_lazy as _",
"from django.contrib.localflavor.mk.mk_choices import MK_MUNICIPALITIES",
"from django.contrib.localflavor.mk.forms import (UMCNField as UMCNFormField,\n MKIdentityCardNumberField as MKIdentityCardNu... |
"""
Iceland specific form helpers.
"""
from __future__ import absolute_import
from django.contrib.localflavor.is_.is_postalcodes import IS_POSTALCODES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import RegexField
from django.forms.widgets import Se... | [
[
8,
0,
0.0233,
0.0349,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0581,
0.0116,
0,
0.66,
0.0909,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0814,
0.0116,
0,
0.66... | [
"\"\"\"\nIceland specific form helpers.\n\"\"\"",
"from __future__ import absolute_import",
"from django.contrib.localflavor.is_.is_postalcodes import IS_POSTALCODES",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields import RegexField... |
# -*- coding: utf-8 -*-
IS_POSTALCODES = (
('101', u'101 Reykjavík'),
('103', u'103 Reykjavík'),
('104', u'104 Reykjavík'),
('105', u'105 Reykjavík'),
('107', u'107 Reykjavík'),
('108', u'108 Reykjavík'),
('109', u'109 Reykjavík'),
('110', u'110 Reykjavík'),
('111', u'111 Reykjavík'... | [
[
14,
0,
0.5099,
0.9868,
0,
0.66,
0,
247,
0,
0,
0,
0,
0,
8,
0
]
] | [
"IS_POSTALCODES = (\n ('101', u'101 Reykjavík'),\n ('103', u'103 Reykjavík'),\n ('104', u'104 Reykjavík'),\n ('105', u'105 Reykjavík'),\n ('107', u'107 Reykjavík'),\n ('108', u'108 Reykjavík'),\n ('109', u'109 Reykjavík'),"
] |
# -*- coding: utf-8 -*-
"""
Swedish specific Form helpers
"""
from __future__ import absolute_import
import re
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.core.validators import EMPTY_VALUES
from django.contrib.localflavor.se.se_counties import COUNTY_CHOICES
from djan... | [
[
8,
0,
0.0186,
0.0186,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0311,
0.0062,
0,
0.66,
0.0714,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0435,
0.0062,
0,
0.66... | [
"\"\"\"\nSwedish specific Form helpers\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django import forms",
"from django.utils.translation import ugettext_lazy as _",
"from django.core.validators import EMPTY_VALUES",
"from django.contrib.localflavor.se.se_counties import COUNTY_... |
# -*- coding: utf-8 -*-
"""
An alphabetical list of Swedish counties, sorted by codes.
http://en.wikipedia.org/wiki/Counties_of_Sweden
This exists in this standalone file so that it's only imported into memory
when explicitly needed.
"""
from django.utils.translation import ugettext_lazy as _
COUNTY_CHOICES = (
... | [
[
8,
0,
0.1667,
0.25,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3333,
0.0278,
0,
0.66,
0.5,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.6944,
0.6389,
0,
0.66,
... | [
"\"\"\"\nAn alphabetical list of Swedish counties, sorted by codes.\n\nhttp://en.wikipedia.org/wiki/Counties_of_Sweden\n\nThis exists in this standalone file so that it's only imported into memory\nwhen explicitly needed.",
"from django.utils.translation import ugettext_lazy as _",
"COUNTY_CHOICES = (\n ('AB... |
import datetime
def id_number_checksum(gd):
"""
Calculates a Swedish ID number checksum, using the
"Luhn"-algoritm
"""
n = s = 0
for c in (gd['year'] + gd['month'] + gd['day'] + gd['serial']):
tmp = ((n % 2) and 1 or 2) * int(c)
if tmp > 9:
tmp = sum([int(i) for i i... | [
[
1,
0,
0.012,
0.012,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
2,
0,
0.1446,
0.2289,
0,
0.66,
0.2,
764,
0,
1,
1,
0,
0,
0,
4
],
[
8,
1,
0.0663,
0.0482,
1,
0.46,
... | [
"import datetime",
"def id_number_checksum(gd):\n \"\"\"\n Calculates a Swedish ID number checksum, using the\n \"Luhn\"-algoritm\n \"\"\"\n n = s = 0\n for c in (gd['year'] + gd['month'] + gd['day'] + gd['serial']):\n tmp = ((n % 2) and 1 or 2) * int(c)",
" \"\"\"\n Calculates a ... |
"""
IT-specific Form helpers
"""
from __future__ import absolute_import
import re
from django.contrib.localflavor.it.it_province import PROVINCE_CHOICES
from django.contrib.localflavor.it.it_region import REGION_CHOICES
from django.contrib.localflavor.it.util import ssn_check_digit, vat_number_check_digit
from djang... | [
[
8,
0,
0.0227,
0.0341,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0568,
0.0114,
0,
0.66,
0.0667,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0795,
0.0114,
0,
0.66... | [
"\"\"\"\nIT-specific Form helpers\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django.contrib.localflavor.it.it_province import PROVINCE_CHOICES",
"from django.contrib.localflavor.it.it_region import REGION_CHOICES",
"from django.contrib.localflavor.it.util import ssn_check_digit... |
# -*- coding: utf-8 -*
REGION_CHOICES = (
('ABR', 'Abruzzo'),
('BAS', 'Basilicata'),
('CAL', 'Calabria'),
('CAM', 'Campania'),
('EMR', 'Emilia-Romagna'),
('FVG', 'Friuli-Venezia Giulia'),
('LAZ', 'Lazio'),
('LIG', 'Liguria'),
('LOM', 'Lombardia'),
('MAR', 'Marche'),
('MOL', ... | [
[
14,
0,
0.5625,
0.9167,
0,
0.66,
0,
868,
0,
0,
0,
0,
0,
8,
0
]
] | [
"REGION_CHOICES = (\n ('ABR', 'Abruzzo'),\n ('BAS', 'Basilicata'),\n ('CAL', 'Calabria'),\n ('CAM', 'Campania'),\n ('EMR', 'Emilia-Romagna'),\n ('FVG', 'Friuli-Venezia Giulia'),\n ('LAZ', 'Lazio'),"
] |
from django.utils.encoding import smart_str, smart_unicode
def ssn_check_digit(value):
"Calculate Italian social security number check digit."
ssn_even_chars = {
'0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8,
'9': 9, 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': ... | [
[
1,
0,
0.0227,
0.0227,
0,
0.66,
0,
96,
0,
2,
0,
0,
96,
0,
0
],
[
2,
0,
0.4091,
0.7045,
0,
0.66,
0.5,
910,
0,
1,
1,
0,
0,
0,
5
],
[
8,
1,
0.0909,
0.0227,
1,
0.45,
... | [
"from django.utils.encoding import smart_str, smart_unicode",
"def ssn_check_digit(value):\n \"Calculate Italian social security number check digit.\"\n ssn_even_chars = {\n '0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8,\n '9': 9, 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4... |
# -*- coding: utf-8 -*
PROVINCE_CHOICES = (
('AG', 'Agrigento'),
('AL', 'Alessandria'),
('AN', 'Ancona'),
('AO', 'Aosta'),
('AR', 'Arezzo'),
('AP', 'Ascoli Piceno'),
('AT', 'Asti'),
('AV', 'Avellino'),
('BA', 'Bari'),
('BT', 'Barletta-Andria-Trani'), # active starting from 2009
... | [
[
14,
0,
0.5132,
0.9825,
0,
0.66,
0,
540,
0,
0,
0,
0,
0,
8,
0
]
] | [
"PROVINCE_CHOICES = (\n ('AG', 'Agrigento'),\n ('AL', 'Alessandria'),\n ('AN', 'Ancona'),\n ('AO', 'Aosta'),\n ('AR', 'Arezzo'),\n ('AP', 'Ascoli Piceno'),\n ('AT', 'Asti'),"
] |
"""
GB-specific Form helpers
"""
from __future__ import absolute_import
import re
from django.contrib.localflavor.gb.gb_regions import GB_NATIONS_CHOICES, GB_REGION_CHOICES
from django.forms.fields import CharField, Select
from django.forms import ValidationError
from django.utils.translation import ugettext_lazy as... | [
[
8,
0,
0.0364,
0.0545,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0909,
0.0182,
0,
0.66,
0.1111,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.1273,
0.0182,
0,
0.66... | [
"\"\"\"\nGB-specific Form helpers\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django.contrib.localflavor.gb.gb_regions import GB_NATIONS_CHOICES, GB_REGION_CHOICES",
"from django.forms.fields import CharField, Select",
"from django.forms import ValidationError",
"from django.u... |
"""
Sources:
English regions: http://www.statistics.gov.uk/geography/downloads/31_10_01_REGION_names_and_codes_12_00.xls
Northern Ireland regions: http://en.wikipedia.org/wiki/List_of_Irish_counties_by_area
Welsh regions: http://en.wikipedia.org/wiki/Preserved_counties_of_Wales
Scottish regions: http://... | [
[
8,
0,
0.0412,
0.0722,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0825,
0.0103,
0,
0.66,
0.1429,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.3196,
0.4433,
0,
0.6... | [
"\"\"\"\nSources:\n English regions: http://www.statistics.gov.uk/geography/downloads/31_10_01_REGION_names_and_codes_12_00.xls\n Northern Ireland regions: http://en.wikipedia.org/wiki/List_of_Irish_counties_by_area\n Welsh regions: http://en.wikipedia.org/wiki/Preserved_counties_of_Wales\n Scottish reg... |
"""
JP-specific Form helpers
"""
from __future__ import absolute_import
from django.contrib.localflavor.jp.jp_prefectures import JP_PREFECTURES
from django.forms.fields import RegexField, Select
from django.utils.translation import ugettext_lazy as _
class JPPostalCodeField(RegexField):
"""
A form field tha... | [
[
8,
0,
0.0513,
0.0769,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1282,
0.0256,
0,
0.66,
0.1667,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.1795,
0.0256,
0,
0.66... | [
"\"\"\"\nJP-specific Form helpers\n\"\"\"",
"from __future__ import absolute_import",
"from django.contrib.localflavor.jp.jp_prefectures import JP_PREFECTURES",
"from django.forms.fields import RegexField, Select",
"from django.utils.translation import ugettext_lazy as _",
"class JPPostalCodeField(RegexFi... |
from django.utils.translation import ugettext_lazy
JP_PREFECTURES = (
('hokkaido', ugettext_lazy('Hokkaido'),),
('aomori', ugettext_lazy('Aomori'),),
('iwate', ugettext_lazy('Iwate'),),
('miyagi', ugettext_lazy('Miyagi'),),
('akita', ugettext_lazy('Akita'),),
('yamagata', ugettext_lazy('Yamagat... | [
[
1,
0,
0.0196,
0.0196,
0,
0.66,
0,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.5294,
0.9608,
0,
0.66,
1,
74,
0,
0,
0,
0,
0,
8,
47
]
] | [
"from django.utils.translation import ugettext_lazy",
"JP_PREFECTURES = (\n ('hokkaido', ugettext_lazy('Hokkaido'),),\n ('aomori', ugettext_lazy('Aomori'),),\n ('iwate', ugettext_lazy('Iwate'),),\n ('miyagi', ugettext_lazy('Miyagi'),),\n ('akita', ugettext_lazy('Akita'),),\n ('yamagata', ugettex... |
"""
Chile specific form helpers.
"""
from __future__ import absolute_import
from django.contrib.localflavor.cl.cl_regions import REGION_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import RegexField, Select
from django.utils.translation impo... | [
[
8,
0,
0.0206,
0.0309,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0515,
0.0103,
0,
0.66,
0.1111,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0722,
0.0103,
0,
0.66... | [
"\"\"\"\nChile specific form helpers.\n\"\"\"",
"from __future__ import absolute_import",
"from django.contrib.localflavor.cl.cl_regions import REGION_CHOICES",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields import RegexField, Selec... |
# -*- coding: utf-8 -*-
"""
A list of Chilean regions as `choices` in a formfield.
This exists in this standalone file so that it's only imported into memory
when explicitly needed.
"""
REGION_CHOICES = (
('RM', u'Región Metropolitana de Santiago'),
('I', u'Región de Tarapacá'),
('II', u'Región de Ant... | [
[
8,
0,
0.18,
0.24,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.68,
0.68,
0,
0.66,
1,
868,
0,
0,
0,
0,
0,
8,
0
]
] | [
"\"\"\"\nA list of Chilean regions as `choices` in a formfield.\n\nThis exists in this standalone file so that it's only imported into memory\nwhen explicitly needed.\n\"\"\"",
"REGION_CHOICES = (\n ('RM', u'Región Metropolitana de Santiago'),\n ('I', u'Región de Tarapacá'),\n ('II', u'Región de Anto... |
"""
AT-specific Form helpers
"""
import re
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, Select
from django.utils.translation import ugettext_lazy as _
re_ssn = re.compile(r'^\d{4} \d{6}')
class ATZipCodeField(RegexField)... | [
[
8,
0,
0.029,
0.0435,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0725,
0.0145,
0,
0.66,
0.1111,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.1014,
0.0145,
0,
0.66,... | [
"\"\"\"\nAT-specific Form helpers\n\"\"\"",
"import re",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields import Field, RegexField, Select",
"from django.utils.translation import ugettext_lazy as _",
"re_ssn = re.compile(r'^\\d{4} \... |
# -*- coding: utf-8 -*
from django.utils.translation import ugettext_lazy as _
STATE_CHOICES = (
('BL', _('Burgenland')),
('KA', _('Carinthia')),
('NO', _('Lower Austria')),
('OO', _('Upper Austria')),
('SA', _('Salzburg')),
('ST', _('Styria')),
('TI', _('Tyrol')),
('VO', _('Vorarlberg'... | [
[
1,
0,
0.1429,
0.0714,
0,
0.66,
0,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.6429,
0.7857,
0,
0.66,
1,
633,
0,
0,
0,
0,
0,
8,
9
]
] | [
"from django.utils.translation import ugettext_lazy as _",
"STATE_CHOICES = (\n ('BL', _('Burgenland')),\n ('KA', _('Carinthia')),\n ('NO', _('Lower Austria')),\n ('OO', _('Upper Austria')),\n ('SA', _('Salzburg')),\n ('ST', _('Styria')),\n ('TI', _('Tyrol')),"
] |
"""
DE-specific Form helpers
"""
from __future__ import absolute_import
import re
from django.contrib.localflavor.de.de_states import STATE_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, Select
from django.utils.tran... | [
[
8,
0,
0.0227,
0.0341,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0568,
0.0114,
0,
0.66,
0.0909,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0795,
0.0114,
0,
0.66... | [
"\"\"\"\nDE-specific Form helpers\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django.contrib.localflavor.de.de_states import STATE_CHOICES",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields import Field, R... |
# -*- coding: utf-8 -*
from django.utils.translation import ugettext_lazy as _
STATE_CHOICES = (
('BW', _('Baden-Wuerttemberg')),
('BY', _('Bavaria')),
('BE', _('Berlin')),
('BB', _('Brandenburg')),
('HB', _('Bremen')),
('HH', _('Hamburg')),
('HE', _('Hessen')),
('MV', _('Mecklenburg-We... | [
[
1,
0,
0.0952,
0.0476,
0,
0.66,
0,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.5952,
0.8571,
0,
0.66,
1,
633,
0,
0,
0,
0,
0,
8,
16
]
] | [
"from django.utils.translation import ugettext_lazy as _",
"STATE_CHOICES = (\n ('BW', _('Baden-Wuerttemberg')),\n ('BY', _('Bavaria')),\n ('BE', _('Berlin')),\n ('BB', _('Brandenburg')),\n ('HB', _('Bremen')),\n ('HH', _('Hamburg')),\n ('HE', _('Hessen')),"
] |
"""
Australian-specific Form helpers
"""
from __future__ import absolute_import
import re
from django.contrib.localflavor.au.au_states import STATE_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, Select
from django.ut... | [
[
8,
0,
0.0333,
0.05,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0833,
0.0167,
0,
0.66,
0.0833,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.1167,
0.0167,
0,
0.66,
... | [
"\"\"\"\nAustralian-specific Form helpers\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django.contrib.localflavor.au.au_states import STATE_CHOICES",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields import ... |
from django.utils.translation import ugettext_lazy as _
from django.db.models.fields import CharField
from django.contrib.localflavor.au.au_states import STATE_CHOICES
from django.contrib.localflavor.au import forms
class AUStateField(CharField):
description = _("Australian State")
def __init__(self, *args,... | [
[
1,
0,
0.0233,
0.0233,
0,
0.66,
0,
389,
0,
1,
0,
0,
389,
0,
0
],
[
1,
0,
0.0465,
0.0233,
0,
0.66,
0.1667,
5,
0,
1,
0,
0,
5,
0,
0
],
[
1,
0,
0.093,
0.0233,
0,
0.66,... | [
"from django.utils.translation import ugettext_lazy as _",
"from django.db.models.fields import CharField",
"from django.contrib.localflavor.au.au_states import STATE_CHOICES",
"from django.contrib.localflavor.au import forms",
"class AUStateField(CharField):\n\n description = _(\"Australian State\")\n\n... |
"""
An alphabetical list of states for use as `choices` in a formfield.
This exists in this standalone file so that it's only imported into memory
when explicitly needed.
"""
STATE_CHOICES = (
('ACT', 'Australian Capital Territory'),
('NSW', 'New South Wales'),
('NT', 'Northern Territory'),
('QLD', 'Q... | [
[
8,
0,
0.2059,
0.3529,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.7353,
0.5882,
0,
0.66,
1,
633,
0,
0,
0,
0,
0,
8,
0
]
] | [
"\"\"\"\nAn alphabetical list of states for use as `choices` in a formfield.\n\nThis exists in this standalone file so that it's only imported into memory\nwhen explicitly needed.\n\"\"\"",
"STATE_CHOICES = (\n ('ACT', 'Australian Capital Territory'),\n ('NSW', 'New South Wales'),\n ('NT', 'Northern Terr... |
"""
PT-specific Form helpers
"""
import re
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField
from django.utils.encoding import smart_unicode
from django.utils.translation import ugettext_lazy as _
phone_digits_re = re.compile(r'^... | [
[
8,
0,
0.0417,
0.0625,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0833,
0.0208,
0,
0.66,
0.1111,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.125,
0.0208,
0,
0.66,... | [
"\"\"\"\nPT-specific Form helpers\n\"\"\"",
"import re",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields import Field, RegexField",
"from django.utils.encoding import smart_unicode",
"from django.utils.translation import ugettext_l... |
# -*- coding: utf-8 -*-
"""
HR-specific Form helpers
"""
from __future__ import absolute_import
import re
from django.contrib.localflavor.hr.hr_choices import (
HR_LICENSE_PLATE_PREFIX_CHOICES, HR_COUNTY_CHOICES,
HR_PHONE_NUMBER_PREFIX_CHOICES)
from django.core.validators import EMPTY_VALUES
from django.forms... | [
[
8,
0,
0.0107,
0.0107,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0179,
0.0036,
0,
0.66,
0.0455,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.025,
0.0036,
0,
0.66,... | [
"\"\"\"\nHR-specific Form helpers\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django.contrib.localflavor.hr.hr_choices import (\n HR_LICENSE_PLATE_PREFIX_CHOICES, HR_COUNTY_CHOICES,\n HR_PHONE_NUMBER_PREFIX_CHOICES)",
"from django.core.validators import EMPTY_VALUES",
"fro... |
# -*- coding: utf-8 -*-
"""
Sources:
Croatian Counties: http://en.wikipedia.org/wiki/ISO_3166-2:HR
Croatia doesn't have official abbreviations for counties.
The ones provided are in common use.
"""
from django.utils.translation import ugettext_lazy as _
HR_COUNTY_CHOICES = (
('GZG', _('Grad Zagreb')),... | [
[
8,
0,
0.0455,
0.0636,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0818,
0.0091,
0,
0.66,
0.1667,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.2,
0.2091,
0,
0.66,
... | [
"\"\"\"\nSources:\n Croatian Counties: http://en.wikipedia.org/wiki/ISO_3166-2:HR\n\n Croatia doesn't have official abbreviations for counties.\n The ones provided are in common use.\n\"\"\"",
"from django.utils.translation import ugettext_lazy as _",
"HR_COUNTY_CHOICES = (\n ('GZG', _('Grad Zagreb'... |
# -*- coding: utf-8 -*-
"""
AR-specific Form helpers.
"""
from __future__ import absolute_import
from django.contrib.localflavor.ar.ar_provinces import PROVINCE_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import RegexField, CharField, Selec... | [
[
8,
0,
0.0256,
0.0256,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0513,
0.0085,
0,
0.66,
0.1,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0684,
0.0085,
0,
0.66,
... | [
"\"\"\"\nAR-specific Form helpers.\n\"\"\"",
"from __future__ import absolute_import",
"from django.contrib.localflavor.ar.ar_provinces import PROVINCE_CHOICES",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields import RegexField, Char... |
# -*- coding: utf-8 -*-
"""
A list of Argentinean provinces and autonomous cities as `choices` in a
formfield. From
http://www.argentina.gov.ar/argentina/portal/paginas.dhtml?pagina=425
This exists in this standalone file so that it's only imported into memory
when explicitly needed.
"""
PROVINCE_CHOICES = (
('B'... | [
[
8,
0,
0.1528,
0.2222,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6528,
0.7222,
0,
0.66,
1,
540,
0,
0,
0,
0,
0,
8,
0
]
] | [
"\"\"\"\nA list of Argentinean provinces and autonomous cities as `choices` in a\nformfield. From\nhttp://www.argentina.gov.ar/argentina/portal/paginas.dhtml?pagina=425\n\nThis exists in this standalone file so that it's only imported into memory\nwhen explicitly needed.\n\"\"\"",
"PROVINCE_CHOICES = (\n ('B',... |
# -*- coding: utf-8 -*-
"""
BR-specific Form helpers
"""
from __future__ import absolute_import
import re
from django.contrib.localflavor.br.br_states import STATE_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, CharF... | [
[
8,
0,
0.0181,
0.0181,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0361,
0.006,
0,
0.66,
0.0625,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0482,
0.006,
0,
0.66,
... | [
"\"\"\"\nBR-specific Form helpers\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django.contrib.localflavor.br.br_states import STATE_CHOICES",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields import Field, R... |
# -*- coding: utf-8 -*-
"""
An alphabetical list of Brazilian states for use as `choices` in a formfield.
This exists in this standalone file so that it's only imported into memory
when explicitly needed.
"""
STATE_CHOICES = (
('AC', 'Acre'),
('AL', 'Alagoas'),
('AP', u'Amapá'),
('AM', 'Amazonas'),
... | [
[
8,
0,
0.1216,
0.1622,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6216,
0.7838,
0,
0.66,
1,
633,
0,
0,
0,
0,
0,
8,
0
]
] | [
"\"\"\"\nAn alphabetical list of Brazilian states for use as `choices` in a formfield.\n\nThis exists in this standalone file so that it's only imported into memory\nwhen explicitly needed.\n\"\"\"",
"STATE_CHOICES = (\n ('AC', 'Acre'),\n ('AL', 'Alagoas'),\n ('AP', u'Amapá'),\n ('AM', 'Amazonas'),\n ... |
"""
Slovak-specific form helpers
"""
from __future__ import absolute_import
from django.contrib.localflavor.sk.sk_districts import DISTRICT_CHOICES
from django.contrib.localflavor.sk.sk_regions import REGION_CHOICES
from django.forms.fields import Select, RegexField
from django.utils.translation import ugettext_lazy ... | [
[
8,
0,
0.0435,
0.0652,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1087,
0.0217,
0,
0.66,
0.125,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.1522,
0.0217,
0,
0.66,... | [
"\"\"\"\nSlovak-specific form helpers\n\"\"\"",
"from __future__ import absolute_import",
"from django.contrib.localflavor.sk.sk_districts import DISTRICT_CHOICES",
"from django.contrib.localflavor.sk.sk_regions import REGION_CHOICES",
"from django.forms.fields import Select, RegexField",
"from django.uti... |
"""
Slovak districts according to http://sk.wikipedia.org/wiki/Administrat%C3%ADvne_%C4%8Dlenenie_Slovenska
"""
from django.utils.translation import ugettext_lazy as _
DISTRICT_CHOICES = (
('BB', _('Banska Bystrica')),
('BS', _('Banska Stiavnica')),
('BJ', _('Bardejov')),
('BN', _('Banovce nad Bebravo... | [
[
8,
0,
0.023,
0.0345,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0575,
0.0115,
0,
0.66,
0.5,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.5402,
0.931,
0,
0.66,
... | [
"\"\"\"\nSlovak districts according to http://sk.wikipedia.org/wiki/Administrat%C3%ADvne_%C4%8Dlenenie_Slovenska\n\"\"\"",
"from django.utils.translation import ugettext_lazy as _",
"DISTRICT_CHOICES = (\n ('BB', _('Banska Bystrica')),\n ('BS', _('Banska Stiavnica')),\n ('BJ', _('Bardejov')),\n ('BN... |
"""
Slovak regions according to http://sk.wikipedia.org/wiki/Administrat%C3%ADvne_%C4%8Dlenenie_Slovenska
"""
from django.utils.translation import ugettext_lazy as _
REGION_CHOICES = (
('BB', _('Banska Bystrica region')),
('BA', _('Bratislava region')),
('KE', _('Kosice region')),
('NR', _('Nitra regi... | [
[
8,
0,
0.125,
0.1875,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3125,
0.0625,
0,
0.66,
0.5,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.7188,
0.625,
0,
0.66,
... | [
"\"\"\"\nSlovak regions according to http://sk.wikipedia.org/wiki/Administrat%C3%ADvne_%C4%8Dlenenie_Slovenska\n\"\"\"",
"from django.utils.translation import ugettext_lazy as _",
"REGION_CHOICES = (\n ('BB', _('Banska Bystrica region')),\n ('BA', _('Bratislava region')),\n ('KE', _('Kosice region')),\... |
# -*- coding: utf-8 -*-
"""
A list of Mexican states for use as `choices` in a formfield.
This exists in this standalone file so that it's only imported into memory
when explicitly needed.
"""
from django.utils.translation import ugettext_lazy as _
# All 31 states, plus the `Distrito Federal`.
STATE_CHOICES = (
... | [
[
8,
0,
0.1,
0.1333,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2,
0.0222,
0,
0.66,
0.5,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.6333,
0.7556,
0,
0.66,
1,... | [
"\"\"\"\nA list of Mexican states for use as `choices` in a formfield.\n\nThis exists in this standalone file so that it's only imported into memory\nwhen explicitly needed.\n\"\"\"",
"from django.utils.translation import ugettext_lazy as _",
"STATE_CHOICES = (\n ('AGU', _(u'Aguascalientes')),\n ('BCN', _... |
from django.utils.translation import ugettext_lazy as _
from django.db.models.fields import CharField
from django.contrib.localflavor.mx.mx_states import STATE_CHOICES
from django.contrib.localflavor.mx.forms import (MXRFCField as MXRFCFormField,
MXZipCodeField as MXZipCodeFormField, MXCURPField as MXCURPFormField... | [
[
1,
0,
0.0143,
0.0143,
0,
0.66,
0,
389,
0,
1,
0,
0,
389,
0,
0
],
[
1,
0,
0.0286,
0.0143,
0,
0.66,
0.1429,
5,
0,
1,
0,
0,
5,
0,
0
],
[
1,
0,
0.0571,
0.0143,
0,
0.66... | [
"from django.utils.translation import ugettext_lazy as _",
"from django.db.models.fields import CharField",
"from django.contrib.localflavor.mx.mx_states import STATE_CHOICES",
"from django.contrib.localflavor.mx.forms import (MXRFCField as MXRFCFormField,\n MXZipCodeField as MXZipCodeFormField, MXCURPFiel... |
"""
Russian-specific forms helpers
"""
from __future__ import absolute_import
import re
from django.contrib.localflavor.ru.ru_regions import RU_COUNTY_CHOICES, RU_REGIONS_CHOICES
from django.forms.fields import RegexField, Select
from django.utils.translation import ugettext_lazy as _
phone_digits_re = re.compile(r... | [
[
8,
0,
0.0299,
0.0448,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0597,
0.0149,
0,
0.66,
0.0909,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0896,
0.0149,
0,
0.66... | [
"\"\"\"\nRussian-specific forms helpers\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django.contrib.localflavor.ru.ru_regions import RU_COUNTY_CHOICES, RU_REGIONS_CHOICES",
"from django.forms.fields import RegexField, Select",
"from django.utils.translation import ugettext_lazy a... |
# -*- encoding: utf-8 -*-
"""
Sources:
http://ru.wikipedia.org/wiki/Коды_субъектов_Российской_Федерации
http://ru.wikipedia.org/wiki/Федеральные_округа_Российской_Федерации
"""
from django.utils.translation import ugettext_lazy as _
RU_COUNTY_CHOICES = (
("Central Federal County", _("Central Federal County... | [
[
8,
0,
0.0385,
0.0481,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0673,
0.0096,
0,
0.66,
0.3333,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.1298,
0.0962,
0,
0.6... | [
"\"\"\"\nSources:\n http://ru.wikipedia.org/wiki/Коды_субъектов_Российской_Федерации\n http://ru.wikipedia.org/wiki/Федеральные_округа_Российской_Федерации\n\"\"\"",
"from django.utils.translation import ugettext_lazy as _",
"RU_COUNTY_CHOICES = (\n (\"Central Federal County\", _(\"Central Federal Coun... |
# -*- coding: utf-8 -*-
"""
Chinese-specific form helpers
"""
from __future__ import absolute_import
import re
from django.contrib.localflavor.cn.cn_provinces import CN_PROVINCE_CHOICES
from django.forms import ValidationError
from django.forms.fields import CharField, RegexField, Select
from django.utils.translatio... | [
[
8,
0,
0.0187,
0.014,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.028,
0.0047,
0,
0.66,
0.0588,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0374,
0.0047,
0,
0.66,
... | [
"\"\"\"\nChinese-specific form helpers\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django.contrib.localflavor.cn.cn_provinces import CN_PROVINCE_CHOICES",
"from django.forms import ValidationError",
"from django.forms.fields import CharField, RegexField, Select",
"from django.... |
# -*- coding: utf-8 -*-
"""
An alphabetical list of provinces for use as `choices` in a formfield.
Reference:
http://en.wikipedia.org/wiki/ISO_3166-2:CN
http://en.wikipedia.org/wiki/Province_%28China%29
http://en.wikipedia.org/wiki/Direct-controlled_municipality
http://en.wikipedia.org/wiki/Autonomous_regions_of_Chin... | [
[
8,
0,
0.1429,
0.1837,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6429,
0.7347,
0,
0.66,
1,
773,
0,
0,
0,
0,
0,
8,
0
]
] | [
"\"\"\"\nAn alphabetical list of provinces for use as `choices` in a formfield.\n\nReference:\nhttp://en.wikipedia.org/wiki/ISO_3166-2:CN\nhttp://en.wikipedia.org/wiki/Province_%28China%29\nhttp://en.wikipedia.org/wiki/Direct-controlled_municipality\nhttp://en.wikipedia.org/wiki/Autonomous_regions_of_China",
"CN_... |
# -*- coding: utf-8 -*-
"""
Spanish-specific Form helpers
"""
from __future__ import absolute_import
import re
from django.contrib.localflavor.es.es_provinces import PROVINCE_CHOICES
from django.contrib.localflavor.es.es_regions import REGION_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms ... | [
[
8,
0,
0.0159,
0.0159,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0317,
0.0053,
0,
0.66,
0.0667,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0423,
0.0053,
0,
0.66... | [
"\"\"\"\nSpanish-specific Form helpers\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django.contrib.localflavor.es.es_provinces import PROVINCE_CHOICES",
"from django.contrib.localflavor.es.es_regions import REGION_CHOICES",
"from django.core.validators import EMPTY_VALUES",
"fr... |
# -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
REGION_CHOICES = (
('AN', _('Andalusia')),
('AR', _('Aragon')),
('O', _('Principality of Asturias')),
('IB', _('Balearic Islands')),
('PV', _('Basque Country')),
('CN', _('Canary Islands')),
('S', _('Cantabria')... | [
[
1,
0,
0.087,
0.0435,
0,
0.66,
0,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.5652,
0.8261,
0,
0.66,
1,
868,
0,
0,
0,
0,
0,
8,
17
]
] | [
"from django.utils.translation import ugettext_lazy as _",
"REGION_CHOICES = (\n ('AN', _('Andalusia')),\n ('AR', _('Aragon')),\n ('O', _('Principality of Asturias')),\n ('IB', _('Balearic Islands')),\n ('PV', _('Basque Country')),\n ('CN', _('Canary Islands')),\n ('S', _('Cantabria')),"
] |
# -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
PROVINCE_CHOICES = (
('01', _('Arava')),
('02', _('Albacete')),
('03', _('Alacant')),
('04', _('Almeria')),
('05', _('Avila')),
('06', _('Badajoz')),
('07', _('Illes Balears')),
('08', _('Barcelona')),
(... | [
[
1,
0,
0.0345,
0.0172,
0,
0.66,
0,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.5259,
0.931,
0,
0.66,
1,
540,
0,
0,
0,
0,
0,
8,
52
]
] | [
"from django.utils.translation import ugettext_lazy as _",
"PROVINCE_CHOICES = (\n ('01', _('Arava')),\n ('02', _('Albacete')),\n ('03', _('Alacant')),\n ('04', _('Almeria')),\n ('05', _('Avila')),\n ('06', _('Badajoz')),\n ('07', _('Illes Balears')),"
] |
"""
Israeli-specific form helpers
"""
import re
from django.core.exceptions import ValidationError
from django.core.validators import EMPTY_VALUES
from django.forms.fields import RegexField, Field, EMPTY_VALUES
from django.utils.checksums import luhn
from django.utils.translation import ugettext_lazy as _
# Israeli I... | [
[
8,
0,
0.0303,
0.0455,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0606,
0.0152,
0,
0.66,
0.1111,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0909,
0.0152,
0,
0.66... | [
"\"\"\"\nIsraeli-specific form helpers\n\"\"\"",
"import re",
"from django.core.exceptions import ValidationError",
"from django.core.validators import EMPTY_VALUES",
"from django.forms.fields import RegexField, Field, EMPTY_VALUES",
"from django.utils.checksums import luhn",
"from django.utils.translat... |
"""
FR-specific Form helpers
"""
from __future__ import absolute_import
import re
from django.contrib.localflavor.fr.fr_department import DEPARTMENT_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, Select
from django.ut... | [
[
8,
0,
0.037,
0.0556,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0741,
0.0185,
0,
0.66,
0.0833,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.1111,
0.0185,
0,
0.66,... | [
"\"\"\"\nFR-specific Form helpers\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django.contrib.localflavor.fr.fr_department import DEPARTMENT_CHOICES",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields import... |
# -*- coding: utf-8 -*-
# See the "Code officiel géographique" on the INSEE website <www.insee.fr>.
DEPARTMENT_CHOICES = (
# Metropolitan departments
('01', u'01 - Ain'),
('02', u'02 - Aisne'),
('03', u'03 - Allier'),
('04', u'04 - Alpes-de-Haute-Provence'),
('05', u'05 - Hautes-Alpes'),
(... | [
[
14,
0,
0.5214,
0.9658,
0,
0.66,
0,
545,
0,
0,
0,
0,
0,
8,
0
]
] | [
"DEPARTMENT_CHOICES = (\n # Metropolitan departments\n ('01', u'01 - Ain'),\n ('02', u'02 - Aisne'),\n ('03', u'03 - Allier'),\n ('04', u'04 - Alpes-de-Haute-Provence'),\n ('05', u'05 - Hautes-Alpes'),\n ('06', u'06 - Alpes-Maritimes'),"
] |
"""
Ecuador-specific form helpers.
"""
from __future__ import absolute_import
from django.contrib.localflavor.ec.ec_provinces import PROVINCE_CHOICES
from django.forms.fields import Select
class ECProvinceSelect(Select):
"""
A Select widget that uses a list of Ecuador provinces as its choices.
"""
de... | [
[
8,
0,
0.1333,
0.2,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3333,
0.0667,
0,
0.66,
0.25,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.4667,
0.0667,
0,
0.66,
... | [
"\"\"\"\nEcuador-specific form helpers.\n\"\"\"",
"from __future__ import absolute_import",
"from django.contrib.localflavor.ec.ec_provinces import PROVINCE_CHOICES",
"from django.forms.fields import Select",
"class ECProvinceSelect(Select):\n \"\"\"\n A Select widget that uses a list of Ecuador provi... |
# -*- coding: utf-8 -*-
"""
A list of Ecuador departaments as `choices` in a
formfield.
This exists in this standalone file so that it's only
imported into memory when explicitly needed.
"""
PROVINCE_CHOICES = (
('A', u'Azuay'),
('B', u'Bolívar'),
('F', u'Cañar'),
('C', u'Carchi'),
('H', u'Chimbor... | [
[
8,
0,
0.1429,
0.2,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6429,
0.7429,
0,
0.66,
1,
540,
0,
0,
0,
0,
0,
8,
0
]
] | [
"\"\"\"\nA list of Ecuador departaments as `choices` in a\nformfield.\n\nThis exists in this standalone file so that it's only\nimported into memory when explicitly needed.\n\"\"\"",
"PROVINCE_CHOICES = (\n ('A', u'Azuay'),\n ('B', u'Bolívar'),\n ('F', u'Cañar'),\n ('C', u'Carchi'),\n ('H', u'Chimb... |
"""
South Africa-specific Form helpers
"""
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import CharField, RegexField
from django.utils.checksums import luhn
from django.utils.translation import gettext as _
import re
from datetime import date
id_re ... | [
[
8,
0,
0.0333,
0.05,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0833,
0.0167,
0,
0.66,
0.1,
899,
0,
1,
0,
0,
899,
0,
0
],
[
1,
0,
0.1,
0.0167,
0,
0.66,
0.... | [
"\"\"\"\nSouth Africa-specific Form helpers\n\"\"\"",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields import CharField, RegexField",
"from django.utils.checksums import luhn",
"from django.utils.translation import gettext as _",
"i... |
from django.utils.translation import gettext_lazy as _
PROVINCE_CHOICES = (
('EC', _('Eastern Cape')),
('FS', _('Free State')),
('GP', _('Gauteng')),
('KN', _('KwaZulu-Natal')),
('LP', _('Limpopo')),
('MP', _('Mpumalanga')),
('NC', _('Northern Cape')),
('NW', _('North West')),
('WC'... | [
[
1,
0,
0.0769,
0.0769,
0,
0.66,
0,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.6154,
0.8462,
0,
0.66,
1,
540,
0,
0,
0,
0,
0,
8,
9
]
] | [
"from django.utils.translation import gettext_lazy as _",
"PROVINCE_CHOICES = (\n ('EC', _('Eastern Cape')),\n ('FS', _('Free State')),\n ('GP', _('Gauteng')),\n ('KN', _('KwaZulu-Natal')),\n ('LP', _('Limpopo')),\n ('MP', _('Mpumalanga')),\n ('NC', _('Northern Cape')),"
] |
"""
Belgium-specific Form helpers
"""
from __future__ import absolute_import
from django.contrib.localflavor.be.be_provinces import PROVINCE_CHOICES
from django.contrib.localflavor.be.be_regions import REGION_CHOICES
from django.forms.fields import RegexField, Select
from django.utils.translation import ugettext_lazy... | [
[
8,
0,
0.0282,
0.0423,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0704,
0.0141,
0,
0.66,
0.1111,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0986,
0.0141,
0,
0.66... | [
"\"\"\"\nBelgium-specific Form helpers\n\"\"\"",
"from __future__ import absolute_import",
"from django.contrib.localflavor.be.be_provinces import PROVINCE_CHOICES",
"from django.contrib.localflavor.be.be_regions import REGION_CHOICES",
"from django.forms.fields import RegexField, Select",
"from django.ut... |
from django.utils.translation import ugettext_lazy as _
# ISO codes
PROVINCE_CHOICES = (
('VAN', _('Antwerp')),
('BRU', _('Brussels')),
('VOV', _('East Flanders')),
('VBR', _('Flemish Brabant')),
('WHT', _('Hainaut')),
('WLG', _('Liege')),
('VLI', _('Limburg')),
('WLX', _('Luxembourg'))... | [
[
1,
0,
0.0625,
0.0625,
0,
0.66,
0,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.625,
0.8125,
0,
0.66,
1,
540,
0,
0,
0,
0,
0,
8,
11
]
] | [
"from django.utils.translation import ugettext_lazy as _",
"PROVINCE_CHOICES = (\n ('VAN', _('Antwerp')),\n ('BRU', _('Brussels')),\n ('VOV', _('East Flanders')),\n ('VBR', _('Flemish Brabant')),\n ('WHT', _('Hainaut')),\n ('WLG', _('Liege')),\n ('VLI', _('Limburg')),"
] |
from django.utils.translation import ugettext_lazy as _
# ISO codes
REGION_CHOICES = (
('BRU', _('Brussels Capital Region')),
('VLG', _('Flemish Region')),
('WAL', _('Wallonia'))
)
| [
[
1,
0,
0.125,
0.125,
0,
0.66,
0,
389,
0,
1,
0,
0,
389,
0,
0
],
[
14,
0,
0.75,
0.625,
0,
0.66,
1,
868,
0,
0,
0,
0,
0,
8,
3
]
] | [
"from django.utils.translation import ugettext_lazy as _",
"REGION_CHOICES = (\n ('BRU', _('Brussels Capital Region')),\n ('VLG', _('Flemish Region')),\n ('WAL', _('Wallonia'))\n)"
] |
from django.contrib.localflavor.gb import forms
import warnings
warnings.warn(
'The "UK" prefix for United Kingdom has been deprecated in favour of the '
'GB code. Please use the new GB-prefixed names.', PendingDeprecationWarning)
UKPostcodeField = forms.GBPostcodeField
UKCountySelect = forms.GBCountySelect
U... | [
[
1,
0,
0.1,
0.1,
0,
0.66,
0,
708,
0,
1,
0,
0,
708,
0,
0
],
[
1,
0,
0.3,
0.1,
0,
0.66,
0.2,
358,
0,
1,
0,
0,
358,
0,
0
],
[
8,
0,
0.5,
0.3,
0,
0.66,
0.4,
96... | [
"from django.contrib.localflavor.gb import forms",
"import warnings",
"warnings.warn(\n 'The \"UK\" prefix for United Kingdom has been deprecated in favour of the '\n 'GB code. Please use the new GB-prefixed names.', PendingDeprecationWarning)",
"UKPostcodeField = forms.GBPostcodeField",
"UKCountySele... |
from django.contrib.localflavor.gb.gb_regions import (
ENGLAND_REGION_CHOICES, NORTHERN_IRELAND_REGION_CHOICES,
WALES_REGION_CHOICES, SCOTTISH_REGION_CHOICES, GB_NATIONS_CHOICES,
GB_REGION_CHOICES)
import warnings
warnings.warn(
'The "UK" prefix for United Kingdom has been deprecated in favour of the '... | [
[
1,
0,
0.2083,
0.3333,
0,
0.66,
0,
205,
0,
6,
0,
0,
205,
0,
0
],
[
1,
0,
0.5,
0.0833,
0,
0.66,
0.25,
358,
0,
1,
0,
0,
358,
0,
0
],
[
8,
0,
0.6667,
0.25,
0,
0.66,
... | [
"from django.contrib.localflavor.gb.gb_regions import (\n ENGLAND_REGION_CHOICES, NORTHERN_IRELAND_REGION_CHOICES,\n WALES_REGION_CHOICES, SCOTTISH_REGION_CHOICES, GB_NATIONS_CHOICES,\n GB_REGION_CHOICES)",
"import warnings",
"warnings.warn(\n 'The \"UK\" prefix for United Kingdom has been deprecate... |
# -*- coding: utf-8 -*-
"""
An alphabetical list of Finnish municipalities for use as `choices` in a
formfield.
This exists in this standalone file so that it's only imported into memory
when explicitly needed.
"""
MUNICIPALITY_CHOICES = (
('akaa', u"Akaa"),
('alajarvi', u"Alajärvi"),
('alavieska', u"Alav... | [
[
8,
0,
0.0142,
0.0198,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.5142,
0.9745,
0,
0.66,
1,
881,
0,
0,
0,
0,
0,
8,
0
]
] | [
"\"\"\"\nAn alphabetical list of Finnish municipalities for use as `choices` in a\nformfield.\n\nThis exists in this standalone file so that it's only imported into memory\nwhen explicitly needed.\n\"\"\"",
"MUNICIPALITY_CHOICES = (\n ('akaa', u\"Akaa\"),\n ('alajarvi', u\"Alajärvi\"),\n ('alavieska', u\... |
"""
FI-specific Form helpers
"""
from __future__ import absolute_import
import re
from django.contrib.localflavor.fi.fi_municipalities import MUNICIPALITY_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, Select
from dj... | [
[
8,
0,
0.0364,
0.0545,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0909,
0.0182,
0,
0.66,
0.1,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.1273,
0.0182,
0,
0.66,
... | [
"\"\"\"\nFI-specific Form helpers\n\"\"\"",
"from __future__ import absolute_import",
"import re",
"from django.contrib.localflavor.fi.fi_municipalities import MUNICIPALITY_CHOICES",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields ... |
"""
Kuwait-specific Form helpers
"""
import re
from datetime import date
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field
from django.utils.translation import gettext as _
id_re = re.compile(r'^(?P<initial>\d{1})(?P<yy>\d\d)(?P<mm>\d\d)(?P<... | [
[
8,
0,
0.0317,
0.0476,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0635,
0.0159,
0,
0.66,
0.125,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0794,
0.0159,
0,
0.66,... | [
"\"\"\"\nKuwait-specific Form helpers\n\"\"\"",
"import re",
"from datetime import date",
"from django.core.validators import EMPTY_VALUES",
"from django.forms import ValidationError",
"from django.forms.fields import Field",
"from django.utils.translation import gettext as _",
"id_re = re.compile(r'^... |
from django import forms
DEFAULT_DATE_INPUT_FORMATS = (
'%Y-%m-%d', '%d/%m/%Y', '%d/%m/%y', # '2006-10-25', '25/10/2006', '25/10/06'
'%b %d %Y', '%b %d, %Y', # 'Oct 25 2006', 'Oct 25, 2006'
'%d %b %Y', '%d %b, %Y', # '25 Oct 2006', '25 Oct, 2006'
'%B %d %Y', '%B %d, %Y', ... | [
[
1,
0,
0.0208,
0.0208,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
14,
0,
0.125,
0.1458,
0,
0.66,
0.2,
243,
0,
0,
0,
0,
0,
8,
0
],
[
14,
0,
0.3333,
0.2292,
0,
0.66... | [
"from django import forms",
"DEFAULT_DATE_INPUT_FORMATS = (\n '%Y-%m-%d', '%d/%m/%Y', '%d/%m/%y', # '2006-10-25', '25/10/2006', '25/10/06'\n '%b %d %Y', '%b %d, %Y', # 'Oct 25 2006', 'Oct 25, 2006'\n '%d %b %Y', '%d %b, %Y', # '25 Oct 2006', '25 Oct, 2006'\n '%B %d %Y', '%B %d, %... |
"""
UK-specific Form helpers
"""
from __future__ import absolute_import
from django.contrib.localflavor.ie.ie_counties import IE_COUNTY_CHOICES
from django.forms.fields import Select
class IECountySelect(Select):
"""
A Select widget that uses a list of Irish Counties as its choices.
"""
def __init__... | [
[
8,
0,
0.125,
0.1875,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3125,
0.0625,
0,
0.66,
0.25,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.4375,
0.0625,
0,
0.66,
... | [
"\"\"\"\nUK-specific Form helpers\n\"\"\"",
"from __future__ import absolute_import",
"from django.contrib.localflavor.ie.ie_counties import IE_COUNTY_CHOICES",
"from django.forms.fields import Select",
"class IECountySelect(Select):\n \"\"\"\n A Select widget that uses a list of Irish Counties as its... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.