code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
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, unicode_literals 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...
[ [ 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, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0896, 0.0149, 0, 0.66...
[ "\"\"\"\nRussian-specific forms helpers\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "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 impo...
# -*- 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, unicode_literals 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 djang...
[ [ 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, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0374, 0.0047, 0, 0.66, ...
[ "\"\"\"\nChinese-specific form helpers\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "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...
# -*- 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 ], [ 1, 0, 0.2449, 0.0204, 0, 0.66, 0.5, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.6429, 0.7347, 0, 0.66, ...
[ "\"\"\"\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", "fro...
# -*- coding: utf-8 -*- """ Spanish-specific Form helpers """ from __future__ import absolute_import, unicode_literals 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 ...
[ [ 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, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0423, 0.0053, 0, 0.66...
[ "\"\"\"\nSpanish-specific Form helpers\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "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 EM...
# -*- 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', _('Araba')), ('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', _('Araba')),\n ('02', _('Albacete')),\n ('03', _('Alacant')),\n ('04', _('Almeria')),\n ('05', _('Avila')),\n ('06', _('Badajoz')),\n ('07', _('Illes Balears'))," ]
""" Israeli-specific form helpers """ from __future__ import unicode_literals 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.translatio...
[ [ 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.1, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0746, 0.0149, 0, 0.66, ...
[ "\"\"\"\nIsraeli-specific form helpers\n\"\"\"", "from __future__ import unicode_literals", "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.checksum...
""" FR-specific Form helpers """ from __future__ import absolute_import, unicode_literals 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 CharField, RegexField,...
[ [ 8, 0, 0.0351, 0.0526, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0702, 0.0175, 0, 0.66, 0.0833, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1053, 0.0175, 0, 0.66...
[ "\"\"\"\nFR-specific Form helpers\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "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.f...
# -*- coding: utf-8 -*- # See the "Code officiel géographique" on the INSEE website <www.insee.fr>. from __future__ import unicode_literals DEPARTMENT_CHOICES = ( # Metropolitan departments ('01', '01 - Ain'), ('02', '02 - Aisne'), ('03', '03 - Allier'), ('04', '04 - Alpes-de-Haute-Provence'), ...
[ [ 1, 0, 0.0339, 0.0085, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.5254, 0.9576, 0, 0.66, 1, 545, 0, 0, 0, 0, 0, 8, 0 ] ]
[ "from __future__ import unicode_literals", "DEPARTMENT_CHOICES = (\n # Metropolitan departments\n ('01', '01 - Ain'),\n ('02', '02 - Aisne'),\n ('03', '03 - Allier'),\n ('04', '04 - Alpes-de-Haute-Provence'),\n ('05', '05 - Hautes-Alpes'),\n ('06', '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. """ from __future__ import unicode_literals PROVINCE_CHOICES = ( ('A', 'Azuay'), ('B', 'Bolívar'), ('F', 'Cañar'), ...
[ [ 8, 0, 0.1389, 0.1944, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.25, 0.0278, 0, 0.66, 0.5, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.6528, 0.7222, 0, 0.66, ...
[ "\"\"\"\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\"\"\"", "from __future__ import unicode_literals", "PROVINCE_CHOICES = (\n ('A', 'Azuay'),\n ('B', 'Bolívar'),\n ('F', 'Cañar'),...
""" South Africa-specific Form helpers """ from __future__ import unicode_literals 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 _ imp...
[ [ 8, 0, 0.0328, 0.0492, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0656, 0.0164, 0, 0.66, 0.0909, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0984, 0.0164, 0, 0.66...
[ "\"\"\"\nSouth Africa-specific Form helpers\n\"\"\"", "from __future__ import unicode_literals", "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...
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.', DeprecationWarning) UKPostcodeField = forms.GBPostcodeField UKCountySelect = forms.GBCountySelect UKNation...
[ [ 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.', DeprecationWarning)", "UKPostcodeField = forms.GBPostcodeField", "UKCountySelect = fo...
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. """ from __future__ import unicode_literals MUNICIPALITY_CHOICES = ( ('akaa', "Akaa"), ('alajarvi'...
[ [ 8, 0, 0.0141, 0.0197, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0282, 0.0028, 0, 0.66, 0.5, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.5169, 0.969, 0, 0.66, ...
[ "\"\"\"\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\"\"\"", "from __future__ import unicode_literals", "MUNICIPALITY_CHOICES = (\n ('akaa', \"Akaa\"),\n ('alaj...
""" FI-specific Form helpers """ from __future__ import absolute_import, unicode_literals 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, RegexFie...
[ [ 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, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1273, 0.0182, 0, 0.66, ...
[ "\"\"\"\nFI-specific Form helpers\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "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 dj...
""" Kuwait-specific Form helpers """ from __future__ import unicode_literals 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<i...
[ [ 8, 0, 0.0308, 0.0462, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0615, 0.0154, 0, 0.66, 0.1111, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0923, 0.0154, 0, 0.66...
[ "\"\"\"\nKuwait-specific Form helpers\n\"\"\"", "from __future__ import unicode_literals", "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 im...
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...
""" Sources: Irish Counties: http://en.wikipedia.org/wiki/Counties_of_Ireland """ from django.utils.translation import ugettext_lazy as _ IE_COUNTY_CHOICES = ( ('antrim', _('Antrim')), ('armagh', _('Armagh')), ('carlow', _('Carlow')), ('cavan', _('Cavan')), ('clare', _('Clare')), ('cork...
[ [ 8, 0, 0.0625, 0.1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.125, 0.025, 0, 0.66, 0.5, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 14, 0, 0.5875, 0.85, 0, 0.66, 1, ...
[ "\"\"\"\nSources:\n Irish Counties: http://en.wikipedia.org/wiki/Counties_of_Ireland \n\"\"\"", "from django.utils.translation import ugettext_lazy as _", "IE_COUNTY_CHOICES = (\n ('antrim', _('Antrim')),\n ('armagh', _('Armagh')),\n ('carlow', _('Carlow')),\n ('cavan', _('Cavan')),\n ('cla...
""" Slovenian specific form helpers. """ from __future__ import absolute_import, unicode_literals import datetime import re from django.contrib.localflavor.si.si_postalcodes import SI_POSTALCODES_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields...
[ [ 8, 0, 0.0121, 0.0182, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0303, 0.0061, 0, 0.66, 0.0769, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0424, 0.0061, 0, 0.66...
[ "\"\"\"\nSlovenian specific form helpers.\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "import datetime", "import re", "from django.contrib.localflavor.si.si_postalcodes import SI_POSTALCODES_CHOICES", "from django.core.validators import EMPTY_VALUES", "from django.forms import ...
# *-* coding: utf-8 *-* from __future__ import unicode_literals SI_POSTALCODES = [ (1000, 'Ljubljana'), (1215, 'Medvode'), (1216, 'Smlednik'), (1217, 'Vodice'), (1218, 'Komenda'), (1219, 'Laze v Tuhinju'), (1221, 'Motnik'), (1222, 'Trojane'), (1223, 'Blagovica'), (1225, 'Lukovic...
[ [ 1, 0, 0.0043, 0.0021, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.5021, 0.9894, 0, 0.66, 0.5, 500, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 1, 0.0021, 0, 0.66, ...
[ "from __future__ import unicode_literals", "SI_POSTALCODES = [\n (1000, 'Ljubljana'),\n (1215, 'Medvode'),\n (1216, 'Smlednik'),\n (1217, 'Vodice'),\n (1218, 'Komenda'),\n (1219, 'Laze v Tuhinju'),\n (1221, 'Motnik'),", "SI_POSTALCODES_CHOICES = sorted(SI_POSTALCODES, key=lambda k: k[1])" ]
# -*- coding: utf-8 -*- """ Romanian specific form helpers. """ from __future__ import absolute_import, unicode_literals import datetime from django.contrib.localflavor.ro.ro_counties import COUNTIES_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError, Field, RegexField, S...
[ [ 8, 0, 0.0146, 0.0146, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0244, 0.0049, 0, 0.66, 0.0769, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0341, 0.0049, 0, 0.66...
[ "\"\"\"\nRomanian specific form helpers.\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "import datetime", "from django.contrib.localflavor.ro.ro_counties import COUNTIES_CHOICES", "from django.core.validators import EMPTY_VALUES", "from django.forms import ValidationError, Field, R...
# -*- coding: utf-8 -*- """ A list of Romanian counties as `choices` in a formfield. This exists as a standalone file so that it's only imported into memory when explicitly needed. """ from __future__ import unicode_literals COUNTIES_CHOICES = ( ('AB', 'Alba'), ('AR', 'Arad'), ('AG', 'Argeş'), ('BC', ...
[ [ 8, 0, 0.0849, 0.1132, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1509, 0.0189, 0, 0.66, 0.5, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.5943, 0.8302, 0, 0.66, ...
[ "\"\"\"\nA list of Romanian counties as `choices` in a formfield.\n\nThis exists as a standalone file so that it's only imported into memory when\nexplicitly needed.\n\"\"\"", "from __future__ import unicode_literals", "COUNTIES_CHOICES = (\n ('AB', 'Alba'),\n ('AR', 'Arad'),\n ('AG', 'Argeş'),\n ('...
""" Polish-specific form helpers """ from __future__ import absolute_import, unicode_literals import re from django.contrib.localflavor.pl.pl_administrativeunits import ADMINISTRATIVE_UNIT_CHOICES from django.contrib.localflavor.pl.pl_voivodeships import VOIVODESHIP_CHOICES from django.core.validators import EMPTY_V...
[ [ 8, 0, 0.0092, 0.0138, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0229, 0.0046, 0, 0.66, 0.0667, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0321, 0.0046, 0, 0.66...
[ "\"\"\"\nPolish-specific form helpers\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "import re", "from django.contrib.localflavor.pl.pl_administrativeunits import ADMINISTRATIVE_UNIT_CHOICES", "from django.contrib.localflavor.pl.pl_voivodeships import VOIVODESHIP_CHOICES", "from dj...
""" Polish voivodeship as in http://en.wikipedia.org/wiki/Poland#Administrative_division """ from django.utils.translation import ugettext_lazy as _ VOIVODESHIP_CHOICES = ( ('lower_silesia', _('Lower Silesia')), ('kuyavia-pomerania', _('Kuyavia-Pomerania')), ('lublin', _('Lublin')), ('lubusz', _('Lubu...
[ [ 8, 0, 0.0833, 0.125, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2083, 0.0417, 0, 0.66, 0.5, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 14, 0, 0.6458, 0.75, 0, 0.66, ...
[ "\"\"\"\nPolish voivodeship as in http://en.wikipedia.org/wiki/Poland#Administrative_division\n\"\"\"", "from django.utils.translation import ugettext_lazy as _", "VOIVODESHIP_CHOICES = (\n ('lower_silesia', _('Lower Silesia')),\n ('kuyavia-pomerania', _('Kuyavia-Pomerania')),\n ('lublin', _('Lublin'))...
# -*- coding: utf-8 -*- """ Polish administrative units as in http://pl.wikipedia.org/wiki/Podzia%C5%82_administracyjny_Polski """ from __future__ import unicode_literals ADMINISTRATIVE_UNIT_CHOICES = ( ('wroclaw', 'Wrocław'), ('jeleniagora', 'Jelenia Góra'), ('legnica', 'Legnica'), ('boleslawiecki', ...
[ [ 8, 0, 0.0078, 0.0078, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.013, 0.0026, 0, 0.66, 0.5, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.5091, 0.9793, 0, 0.66, ...
[ "\"\"\"\nPolish administrative units as in http://pl.wikipedia.org/wiki/Podzia%C5%82_administracyjny_Polski\n\"\"\"", "from __future__ import unicode_literals", "ADMINISTRATIVE_UNIT_CHOICES = (\n ('wroclaw', 'Wrocław'),\n ('jeleniagora', 'Jelenia Góra'),\n ('legnica', 'Legnica'),\n ('boleslawiecki',...
""" PY-specific Form helpers. """ from __future__ import absolute_import from django.contrib.localflavor.py.py_department import DEPARTMENT_CHOICES, DEPARTMENT_ROMAN_CHOICES from django.forms.fields import Select class PyDepartmentSelect(Select): """ A Select widget with a list of Paraguayan departments as ...
[ [ 8, 0, 0.0833, 0.125, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2083, 0.0417, 0, 0.66, 0.2, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.2917, 0.0417, 0, 0.66, ...
[ "\"\"\"\nPY-specific Form helpers.\n\"\"\"", "from __future__ import absolute_import", "from django.contrib.localflavor.py.py_department import DEPARTMENT_CHOICES, DEPARTMENT_ROMAN_CHOICES", "from django.forms.fields import Select", "class PyDepartmentSelect(Select):\n \"\"\"\n A Select widget with a ...
# -*- coding: utf-8 -*- # http://www.statoids.com/upy.html from __future__ import unicode_literals DEPARTMENT_CHOICES = ( ('AG', 'Alto Paraguay'), ('AA', 'Alto Paraná'), ('AM', 'Amambay'), ('AS', 'Asunción'), ('BQ', 'Boquerón'), ('CG', 'Caaguazú'), ('CZ', 'Caazapá'), ('CY', 'Canindeyú'...
[ [ 1, 0, 0.087, 0.0217, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.337, 0.4348, 0, 0.66, 0.5, 545, 0, 0, 0, 0, 0, 8, 0 ], [ 14, 0, 0.7935, 0.4348, 0, 0.66,...
[ "from __future__ import unicode_literals", "DEPARTMENT_CHOICES = (\n ('AG', 'Alto Paraguay'),\n ('AA', 'Alto Paraná'),\n ('AM', 'Amambay'),\n ('AS', 'Asunción'),\n ('BQ', 'Boquerón'),\n ('CG', 'Caaguazú'),\n ('CZ', 'Caazapá'),", "DEPARTMENT_ROMAN_CHOICES = (\n ('CN', 'I Concepción'),\n ...
""" Hong Kong specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.core.validators import EMPTY_VALUES from django.forms import CharField from django.forms import ValidationError from django.utils.encoding import smart_text from django.utils.translation import ugett...
[ [ 8, 0, 0.0282, 0.0423, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0563, 0.0141, 0, 0.66, 0.0833, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0845, 0.0141, 0, 0.66...
[ "\"\"\"\nHong Kong specific Form helpers\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "import re", "from django.core.validators import EMPTY_VALUES", "from django.forms import CharField", "from django.forms import ValidationError", "from django.utils.encoding import smart_text",...
import warnings warnings.warn("django.contrib.localflavor is deprecated. " "Use the separate django-localflavor package instead.", DeprecationWarning)
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 8, 0, 0.8, 0.6, 0, 0.66, 1, 960, 3, 2, 0, 0, 0, 0, 1 ] ]
[ "import warnings", "warnings.warn(\"django.contrib.localflavor is deprecated. \"\n \"Use the separate django-localflavor package instead.\",\n DeprecationWarning)" ]
# -*- coding: utf-8 -*- """ UY-specific form helpers. """ from __future__ import absolute_import, unicode_literals from django.core.validators import EMPTY_VALUES from django.forms.fields import Select, RegexField from django.forms import ValidationError from django.utils.translation import ugettext_lazy as _ from dj...
[ [ 8, 0, 0.0492, 0.0492, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0984, 0.0164, 0, 0.66, 0.125, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1311, 0.0164, 0, 0.66,...
[ "\"\"\"\nUY-specific form helpers.\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "from django.core.validators import EMPTY_VALUES", "from django.forms.fields import Select, RegexField", "from django.forms import ValidationError", "from django.utils.translation import ugettext_lazy ...
# -*- coding: utf-8 -*- """A list of Urguayan departaments as `choices` in a formfield.""" from __future__ import unicode_literals DEPARTAMENT_CHOICES = ( ('G', 'Artigas'), ('A', 'Canelones'), ('E', 'Cerro Largo'), ('L', 'Colonia'), ('Q', 'Durazno'), ('N', 'Flores'), ('O', 'Florida'), (...
[ [ 8, 0, 0.08, 0.04, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.12, 0.04, 0, 0.66, 0.5, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.6, 0.84, 0, 0.66, 1, 16...
[ "\"\"\"A list of Urguayan departaments as `choices` in a formfield.\"\"\"", "from __future__ import unicode_literals", "DEPARTAMENT_CHOICES = (\n ('G', 'Artigas'),\n ('A', 'Canelones'),\n ('E', 'Cerro Largo'),\n ('L', 'Colonia'),\n ('Q', 'Durazno'),\n ('N', 'Flores'),\n ('O', 'Florida')," ]
# -*- coding: utf-8 -*- def get_validation_digit(number): """ Calculates the validation digit for the given number. """ sum = 0 dvs = [4, 3, 6, 7, 8, 9, 2] number = str(number) for i in range(0, len(number)): sum = (int(number[-1 - i]) * dvs[i] + sum) % 10 return (10-sum) % 10
[ [ 2, 0, 0.625, 0.8333, 0, 0.66, 0, 198, 0, 1, 1, 0, 0, 0, 4 ], [ 8, 1, 0.3333, 0.0833, 1, 0.86, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 1, 0.4167, 0.0833, 1, 0.86, 0...
[ "def get_validation_digit(number):\n \"\"\" Calculates the validation digit for the given number. \"\"\"\n sum = 0\n dvs = [4, 3, 6, 7, 8, 9, 2]\n number = str(number)\n\n for i in range(0, len(number)):\n sum = (int(number[-1 - i]) * dvs[i] + sum) % 10", " \"\"\" Calculates the validatio...
# -*- coding: utf-8 -*- """ PE-specific Form helpers. """ from __future__ import absolute_import, unicode_literals from django.contrib.localflavor.pe.pe_region import REGION_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField, Cha...
[ [ 8, 0, 0.04, 0.04, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.08, 0.0133, 0, 0.66, 0.1111, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1067, 0.0133, 0, 0.66, ...
[ "\"\"\"\nPE-specific Form helpers.\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "from django.contrib.localflavor.pe.pe_region import REGION_CHOICES", "from django.core.validators import EMPTY_VALUES", "from django.forms import ValidationError", "from django.forms.fields import Reg...
# -*- coding: utf-8 -*- """ A list of Peru regions as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ from __future__ import unicode_literals REGION_CHOICES = ( ('AMA', 'Amazonas'), ('ANC', 'Ancash'), ('APU', 'Apurímac'), ...
[ [ 8, 0, 0.125, 0.1667, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2222, 0.0278, 0, 0.66, 0.5, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.6389, 0.75, 0, 0.66, ...
[ "\"\"\"\nA list of Peru 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\"\"\"", "from __future__ import unicode_literals", "REGION_CHOICES = (\n ('AMA', 'Amazonas'),\n ('ANC', 'Ancash'),\n ('APU', 'Apurímac'),...
""" USA-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select, CharField from django.utils.encoding import smart_text from django.u...
[ [ 8, 0, 0.0159, 0.0238, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0397, 0.0079, 0, 0.66, 0.0667, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0556, 0.0079, 0, 0.66...
[ "\"\"\"\nUSA-specific Form helpers\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "import re", "from django.core.validators import EMPTY_VALUES", "from django.forms import ValidationError", "from django.forms.fields import Field, RegexField, Select, CharField", "from django.utils....
from django.utils.translation import ugettext_lazy as _ from django.db.models.fields import CharField from django.contrib.localflavor.us.us_states import STATE_CHOICES from django.contrib.localflavor.us.us_states import USPS_CHOICES class USStateField(CharField): description = _("U.S. state (two uppercase letters...
[ [ 1, 0, 0.0278, 0.0278, 0, 0.66, 0, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 1, 0, 0.0556, 0.0278, 0, 0.66, 0.1667, 5, 0, 1, 0, 0, 5, 0, 0 ], [ 1, 0, 0.0833, 0.0278, 0, 0.66...
[ "from django.utils.translation import ugettext_lazy as _", "from django.db.models.fields import CharField", "from django.contrib.localflavor.us.us_states import STATE_CHOICES", "from django.contrib.localflavor.us.us_states import USPS_CHOICES", "class USStateField(CharField):\n\n description = _(\"U.S. s...
""" A mapping of state misspellings/abbreviations to normalized abbreviations, and alphabetical lists of US states, territories, military mail regions and non-US states to which the US provides postal service. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ # The...
[ [ 8, 0, 0.0153, 0.0276, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1135, 0.1564, 0, 0.66, 0.1111, 526, 0, 0, 0, 0, 0, 8, 0 ], [ 14, 0, 0.2791, 0.1626, 0, 0.66...
[ "\"\"\"\nA mapping of state misspellings/abbreviations to normalized\nabbreviations, and alphabetical lists of US states, territories,\nmilitary mail regions and non-US states to which the US provides\npostal service.\n\nThis exists in this standalone file so that it's only imported into memory\nwhen explicitly nee...
""" ID-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re import time from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, Select from django.utils.translation import ugettext_lazy as _ from django.ut...
[ [ 8, 0, 0.0092, 0.0138, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.023, 0.0046, 0, 0.66, 0.0556, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0323, 0.0046, 0, 0.66,...
[ "\"\"\"\nID-specific Form helpers\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "import re", "import time", "from django.core.validators import EMPTY_VALUES", "from django.forms import ValidationError", "from django.forms.fields import Field, Select", "from django.utils.transla...
import warnings from django.utils.translation import ugettext_lazy as _ # Reference: http://id.wikipedia.org/wiki/Daftar_provinsi_Indonesia # Indonesia does not have an official Province code standard. # I decided to use unambiguous and consistent (some are common) 3-letter codes. warnings.warn( 'There have been...
[ [ 1, 0, 0.0093, 0.0093, 0, 0.66, 0, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 1, 0, 0.0187, 0.0093, 0, 0.66, 0.25, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 8, 0, 0.0981, 0.0374, 0, 0....
[ "import warnings", "from django.utils.translation import ugettext_lazy as _", "warnings.warn(\n 'There have been recent changes to the ID localflavor. See the release notes for details',\n RuntimeWarning\n)", "PROVINCE_CHOICES = (\n ('ACE', _('Aceh')),\n ('BLI', _('Bali')),\n ('BTN', _('Banten'...
""" Canada-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, CharField, Select from django.utils.encoding import smart_text from django.utils.tran...
[ [ 8, 0, 0.0135, 0.0203, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0338, 0.0068, 0, 0.66, 0.0714, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0473, 0.0068, 0, 0.66...
[ "\"\"\"\nCanada-specific Form helpers\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "import re", "from django.core.validators import EMPTY_VALUES", "from django.forms import ValidationError", "from django.forms.fields import Field, CharField, Select", "from django.utils.encoding ...
""" An alphabetical list of provinces and territories for use as `choices` in a formfield., and a mapping of province misspellings/abbreviations to normalized abbreviations Source: http://www.canada.gc.ca/othergov/prov_e.html This exists in this standalone file so that it's only imported into memory when explici...
[ [ 8, 0, 0.0873, 0.1587, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3016, 0.2381, 0, 0.66, 0.5, 540, 0, 0, 0, 0, 0, 8, 0 ], [ 14, 0, 0.7222, 0.5714, 0, 0.66, ...
[ "\"\"\" \nAn alphabetical list of provinces and territories for use as `choices` \nin a formfield., and a mapping of province misspellings/abbreviations to \nnormalized abbreviations\n\nSource: http://www.canada.gc.ca/othergov/prov_e.html \n\nThis exists in this standalone file so that it's only imported into memor...
""" Swiss-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.contrib.localflavor.ch.ch_states import STATE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select f...
[ [ 8, 0, 0.0164, 0.0246, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.041, 0.0082, 0, 0.66, 0.0714, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0574, 0.0082, 0, 0.66,...
[ "\"\"\"\nSwiss-specific Form helpers\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "import re", "from django.contrib.localflavor.ch.ch_states import STATE_CHOICES", "from django.core.validators import EMPTY_VALUES", "from django.forms import ValidationError", "from django.forms.f...
# -*- coding: utf-8 -* from django.utils.translation import ugettext_lazy as _ STATE_CHOICES = ( ('AG', _('Aargau')), ('AI', _('Appenzell Innerrhoden')), ('AR', _('Appenzell Ausserrhoden')), ('BS', _('Basel-Stadt')), ('BL', _('Basel-Land')), ('BE', _('Berne')), ('FR', _('Fribourg')), ('...
[ [ 1, 0, 0.0645, 0.0323, 0, 0.66, 0, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 14, 0, 0.5645, 0.9032, 0, 0.66, 1, 633, 0, 0, 0, 0, 0, 8, 26 ] ]
[ "from django.utils.translation import ugettext_lazy as _", "STATE_CHOICES = (\n ('AG', _('Aargau')),\n ('AI', _('Appenzell Innerrhoden')),\n ('AR', _('Appenzell Ausserrhoden')),\n ('BS', _('Basel-Stadt')),\n ('BL', _('Basel-Land')),\n ('BE', _('Berne')),\n ('FR', _('Fribourg'))," ]
""" Norwegian-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re import datetime from django.contrib.localflavor.no.no_municipalities import MUNICIPALITY_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields...
[ [ 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.0909, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0805, 0.0115, 0, 0.66,...
[ "\"\"\"\nNorwegian-specific Form helpers\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "import re", "import datetime", "from django.contrib.localflavor.no.no_municipalities import MUNICIPALITY_CHOICES", "from django.core.validators import EMPTY_VALUES", "from django.forms import ...
# -*- coding: utf-8 -*- """ An alphabetical list of Norwegian municipalities (fylker) fro use as `choices` in a formfield. This exists in this standalone file so that it's on ly imported into memory when explicitly needed. """ from __future__ import unicode_literals MUNICIPALITY_CHOICES = ( ('akershus', 'Akershus...
[ [ 8, 0, 0.1515, 0.2121, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2727, 0.0303, 0, 0.66, 0.5, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.6667, 0.697, 0, 0.66, ...
[ "\"\"\"\nAn alphabetical list of Norwegian municipalities (fylker) fro use as `choices`\nin a formfield.\n\nThis exists in this standalone file so that it's on ly imported into memory\nwhen explicitly needed.\n\"\"\"", "from __future__ import unicode_literals", "MUNICIPALITY_CHOICES = (\n ('akershus', 'Akers...
""" Colombian-specific form helpers. """ from __future__ import absolute_import from django.contrib.localflavor.co.co_departments import DEPARTMENT_CHOICES from django.forms.fields import Select class CODepartmentSelect(Select): """ A Select widget that uses a list of Colombian states as its choices. ""...
[ [ 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, ...
[ "\"\"\"\nColombian-specific form helpers.\n\"\"\"", "from __future__ import absolute_import", "from django.contrib.localflavor.co.co_departments import DEPARTMENT_CHOICES", "from django.forms.fields import Select", "class CODepartmentSelect(Select):\n \"\"\"\n A Select widget that uses a list of Colom...
# -*- coding: utf-8 -*- """ A list of Colombian departaments as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ from __future__ import unicode_literals DEPARTMENT_CHOICES = ( ('AMA', 'Amazonas'), ('ANT', 'Antioquia'), ('ARA',...
[ [ 8, 0, 0.1111, 0.1556, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2, 0.0222, 0, 0.66, 0.5, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.6222, 0.7778, 0, 0.66, ...
[ "\"\"\"\nA list of Colombian 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\"\"\"", "from __future__ import unicode_literals", "DEPARTMENT_CHOICES = (\n ('AMA', 'Amazonas'),\n ('ANT', 'Antioquia'),\n ('...
""" TR-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.contrib.localflavor.tr.tr_provinces import PROVINCE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Selec...
[ [ 8, 0, 0.0211, 0.0316, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0526, 0.0105, 0, 0.66, 0.0769, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0737, 0.0105, 0, 0.66...
[ "\"\"\"\nTR-specific Form helpers\n\"\"\"", "from __future__ import absolute_import, unicode_literals", "import re", "from django.contrib.localflavor.tr.tr_provinces import PROVINCE_CHOICES", "from django.core.validators import EMPTY_VALUES", "from django.forms import ValidationError", "from django.form...
# -*- coding: utf-8 -*- """ This exists in this standalone file so that it's only imported into memory when explicitly needed. """ from __future__ import unicode_literals PROVINCE_CHOICES = ( ('01', ('Adana')), ('02', ('Adıyaman')), ('03', ('Afyonkarahisar')), ('04', ('Ağrı')), ('68', ('Aksaray')),...
[ [ 8, 0, 0.0389, 0.0444, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0667, 0.0111, 0, 0.66, 0.5, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.5444, 0.9222, 0, 0.66, ...
[ "\"\"\"\nThis exists in this standalone file so that it's only imported into memory\nwhen explicitly needed.\n\"\"\"", "from __future__ import unicode_literals", "PROVINCE_CHOICES = (\n ('01', ('Adana')),\n ('02', ('Adıyaman')),\n ('03', ('Afyonkarahisar')),\n ('04', ('Ağrı')),\n ('68', ('Aksaray...
from __future__ import unicode_literals import hashlib import os import posixpath import re try: from urllib.parse import unquote, urlsplit, urlunsplit, urldefrag except ImportError: # Python 2 from urllib import unquote from urlparse import urlsplit, urlunsplit, urldefrag from django.conf import setti...
[ [ 1, 0, 0.0032, 0.0032, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0065, 0.0032, 0, 0.66, 0.0455, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 1, 0, 0.0097, 0.0032, 0, ...
[ "from __future__ import unicode_literals", "import hashlib", "import os", "import posixpath", "import re", "try:\n from urllib.parse import unquote, urlsplit, urlunsplit, urldefrag\nexcept ImportError: # Python 2\n from urllib import unquote\n from urlparse import urlsplit, urlunsplit, urldef...
try: from urllib.parse import urlparse from urllib.request import url2pathname except ImportError: # Python 2 from urllib import url2pathname from urlparse import urlparse from django.conf import settings from django.core.handlers.base import get_path_info from django.core.handlers.wsgi import WSGI...
[ [ 7, 0, 0.0479, 0.0822, 0, 0.66, 0, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.0274, 0.0137, 1, 0.98, 0, 630, 0, 1, 0, 0, 630, 0, 0 ], [ 1, 1, 0.0411, 0.0137, 1, 0.98, ...
[ "try:\n from urllib.parse import urlparse\n from urllib.request import url2pathname\nexcept ImportError: # Python 2\n from urllib import url2pathname\n from urlparse import urlparse", " from urllib.parse import urlparse", " from urllib.request import url2pathname", " from urllib impor...
import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.storage import default_storage, Storage, FileSystemStorage from django.utils.datastructures import SortedDict from django.utils.functional import empty, memoize, LazyObject from django.utils.importl...
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0072, 0.0036, 0, 0.66, 0.05, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0109, 0.0036, 0, 0....
[ "import os", "from django.conf import settings", "from django.core.exceptions import ImproperlyConfigured", "from django.core.files.storage import default_storage, Storage, FileSystemStorage", "from django.utils.datastructures import SortedDict", "from django.utils.functional import empty, memoize, LazyOb...
from django.conf import settings from django.conf.urls.static import static urlpatterns = [] def staticfiles_urlpatterns(prefix=None): """ Helper function to return a URL pattern for serving static files. """ if prefix is None: prefix = settings.STATIC_URL return static(prefix, view='djang...
[ [ 1, 0, 0.0625, 0.0625, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.125, 0.0625, 0, 0.66, 0.25, 937, 0, 1, 0, 0, 937, 0, 0 ], [ 14, 0, 0.25, 0.0625, 0, 0.66...
[ "from django.conf import settings", "from django.conf.urls.static import static", "urlpatterns = []", "def staticfiles_urlpatterns(prefix=None):\n \"\"\"\n Helper function to return a URL pattern for serving static files.\n \"\"\"\n if prefix is None:\n prefix = settings.STATIC_URL\n ret...
from django import template from django.templatetags.static import StaticNode from django.contrib.staticfiles.storage import staticfiles_storage register = template.Library() class StaticFilesNode(StaticNode): def url(self, context): path = self.path.resolve(context) return staticfiles_storage.u...
[ [ 1, 0, 0.027, 0.027, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.0541, 0.027, 0, 0.66, 0.1667, 986, 0, 1, 0, 0, 986, 0, 0 ], [ 1, 0, 0.0811, 0.027, 0, 0.66...
[ "from django import template", "from django.templatetags.static import StaticNode", "from django.contrib.staticfiles.storage import staticfiles_storage", "register = template.Library()", "class StaticFilesNode(StaticNode):\n\n def url(self, context):\n path = self.path.resolve(context)\n re...
import os import fnmatch from django.conf import settings from django.core.exceptions import ImproperlyConfigured def matches_patterns(path, patterns=None): """ Return True or False depending on whether the ``path`` should be ignored (if it matches any pattern in ``ignore_patterns``). """ if patter...
[ [ 1, 0, 0.0175, 0.0175, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0351, 0.0175, 0, 0.66, 0.1667, 626, 0, 1, 0, 0, 626, 0, 0 ], [ 1, 0, 0.0526, 0.0175, 0, ...
[ "import os", "import fnmatch", "from django.conf import settings", "from django.core.exceptions import ImproperlyConfigured", "def matches_patterns(path, patterns=None):\n \"\"\"\n Return True or False depending on whether the ``path`` should be\n ignored (if it matches any pattern in ``ignore_patt...
from __future__ import unicode_literals import os from optparse import make_option from django.core.management.base import LabelCommand from django.utils.encoding import smart_text from django.contrib.staticfiles import finders class Command(LabelCommand): help = "Finds the absolute paths for the given static fi...
[ [ 1, 0, 0.0323, 0.0323, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0968, 0.0323, 0, 0.66, 0.1667, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.129, 0.0323, 0, 0...
[ "from __future__ import unicode_literals", "import os", "from optparse import make_option", "from django.core.management.base import LabelCommand", "from django.utils.encoding import smart_text", "from django.contrib.staticfiles import finders", "class Command(LabelCommand):\n help = \"Finds the abso...
from __future__ import unicode_literals import os import sys from optparse import make_option from django.core.files.storage import FileSystemStorage from django.core.management.base import CommandError, NoArgsCommand from django.utils.encoding import smart_text from django.utils.datastructures import SortedDict from...
[ [ 1, 0, 0.0033, 0.0033, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0099, 0.0033, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0132, 0.0033, 0, 0.6...
[ "from __future__ import unicode_literals", "import os", "import sys", "from optparse import make_option", "from django.core.files.storage import FileSystemStorage", "from django.core.management.base import CommandError, NoArgsCommand", "from django.utils.encoding import smart_text", "from django.utils...
from optparse import make_option from django.conf import settings from django.core.management.commands.runserver import Command as RunserverCommand from django.contrib.staticfiles.handlers import StaticFilesHandler class Command(RunserverCommand): option_list = RunserverCommand.option_list + ( make_optio...
[ [ 1, 0, 0.0345, 0.0345, 0, 0.66, 0, 323, 0, 1, 0, 0, 323, 0, 0 ], [ 1, 0, 0.1034, 0.0345, 0, 0.66, 0.25, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.1379, 0.0345, 0, 0....
[ "from optparse import make_option", "from django.conf import settings", "from django.core.management.commands.runserver import Command as RunserverCommand", "from django.contrib.staticfiles.handlers import StaticFilesHandler", "class Command(RunserverCommand):\n option_list = RunserverCommand.option_list...
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ import os import posixpath try: from urllib.parse import unquote except ImportError: # Python 2 from urllib import unquote from django.conf import settings fr...
[ [ 8, 0, 0.0682, 0.1136, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1364, 0.0227, 0, 0.66, 0.1111, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1591, 0.0227, 0, 0.66...
[ "\"\"\"\nViews and functions for serving static files. These are only to be used during\ndevelopment, and SHOULD NOT be used in a production setting.\n\n\"\"\"", "import os", "import posixpath", "try:\n from urllib.parse import unquote\nexcept ImportError: # Python 2\n from urllib import unquote", ...
from django import forms from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.utils.translation import ugettext, ugettext_lazy as _ class FlatpageForm(forms.ModelForm): url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/\.~]+$', help_text = _("...
[ [ 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.25, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0732, 0.0244, 0, 0....
[ "from django import forms", "from django.conf import settings", "from django.contrib.flatpages.models import FlatPage", "from django.utils.translation import ugettext, ugettext_lazy as _", "class FlatpageForm(forms.ModelForm):\n url = forms.RegexField(label=_(\"URL\"), max_length=100, regex=r'^[-\\w/\\.~...
from __future__ import unicode_literals from django.db import models from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class FlatPage(models.Model): url = models.CharField...
[ [ 1, 0, 0.0333, 0.0333, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1, 0.0333, 0, 0.66, 0.2, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.1333, 0.0333, 0, 0.66, ...
[ "from __future__ import unicode_literals", "from django.db import models", "from django.contrib.sites.models import Site", "from django.utils.translation import ugettext_lazy as _", "from django.utils.encoding import python_2_unicode_compatible", "class FlatPage(models.Model):\n url = models.CharField(...
import os from django.conf import settings from django.contrib.auth.models import AnonymousUser, User from django.contrib.auth.tests.utils import skipIfCustomUser from django.template import Template, Context, TemplateSyntaxError from django.test import TestCase from django.test.utils import override_settings @overri...
[ [ 1, 0, 0.0073, 0.0073, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0146, 0.0073, 0, 0.66, 0.1429, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0219, 0.0073, 0, ...
[ "import os", "from django.conf import settings", "from django.contrib.auth.models import AnonymousUser, User", "from django.contrib.auth.tests.utils import skipIfCustomUser", "from django.template import Template, Context, TemplateSyntaxError", "from django.test import TestCase", "from django.test.utils...
from __future__ import unicode_literals from django.conf import settings from django.contrib.flatpages.forms import FlatpageForm from django.contrib.flatpages.models import FlatPage from django.test import TestCase from django.test.utils import override_settings from django.utils import translation @override_settings...
[ [ 1, 0, 0.0102, 0.0102, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0306, 0.0102, 0, 0.66, 0.1429, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0408, 0.0102, 0, ...
[ "from __future__ import unicode_literals", "from django.conf import settings", "from django.contrib.flatpages.forms import FlatpageForm", "from django.contrib.flatpages.models import FlatPage", "from django.test import TestCase", "from django.test.utils import override_settings", "from django.utils impo...
from django.conf.urls import patterns, include # special urls for flatpage test cases urlpatterns = patterns('', (r'^flatpage_root', include('django.contrib.flatpages.urls')), (r'^accounts/', include('django.contrib.auth.urls')), )
[ [ 1, 0, 0.125, 0.125, 0, 0.66, 0, 528, 0, 2, 0, 0, 528, 0, 0 ], [ 14, 0, 0.6875, 0.5, 0, 0.66, 1, 990, 3, 3, 0, 0, 75, 10, 3 ] ]
[ "from django.conf.urls import patterns, include", "urlpatterns = patterns('',\n (r'^flatpage_root', include('django.contrib.flatpages.urls')),\n (r'^accounts/', include('django.contrib.auth.urls')),\n)" ]
import os from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.flatpages.models import FlatPage from django.test import TestCase from django.test.utils import override_settings @override_settings( LOGIN_URL='/...
[ [ 1, 0, 0.0063, 0.0063, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0127, 0.0063, 0, 0.66, 0.125, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.019, 0.0063, 0, 0....
[ "import os", "from django.conf import settings", "from django.contrib.auth.models import User", "from django.contrib.auth.tests.utils import skipIfCustomUser", "from django.contrib.flatpages.models import FlatPage", "from django.test import TestCase", "from django.test.utils import override_settings", ...
import os from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.test import TestCase, Client from django.test.utils import override_settings @override_settings( LOGIN_URL='/accounts/login/', MIDDLEWARE_CLASSES=( ...
[ [ 1, 0, 0.013, 0.013, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.026, 0.013, 0, 0.66, 0.1667, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.039, 0.013, 0, 0.66, ...
[ "import os", "from django.conf import settings", "from django.contrib.auth.models import User", "from django.contrib.auth.tests.utils import skipIfCustomUser", "from django.test import TestCase, Client", "from django.test.utils import override_settings", "class FlatpageCSRFTests(TestCase):\n fixtures...
import os from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.flatpages.models import FlatPage from django.test import TestCase from django.test.utils import override_settings @override_settings( LOGIN_URL='/...
[ [ 1, 0, 0.0078, 0.0078, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0155, 0.0078, 0, 0.66, 0.125, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0233, 0.0078, 0, 0...
[ "import os", "from django.conf import settings", "from django.contrib.auth.models import User", "from django.contrib.auth.tests.utils import skipIfCustomUser", "from django.contrib.flatpages.models import FlatPage", "from django.test import TestCase", "from django.test.utils import override_settings", ...
from django.contrib.flatpages.tests.csrf import * from django.contrib.flatpages.tests.forms import * from django.contrib.flatpages.tests.middleware import * from django.contrib.flatpages.tests.templatetags import * from django.contrib.flatpages.tests.views import *
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 500, 0, 1, 0, 0, 500, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.25, 351, 0, 1, 0, 0, 351, 0, 0 ], [ 1, 0, 0.6, 0.2, 0, 0.66, 0.5, 4...
[ "from django.contrib.flatpages.tests.csrf import *", "from django.contrib.flatpages.tests.forms import *", "from django.contrib.flatpages.tests.middleware import *", "from django.contrib.flatpages.tests.templatetags import *", "from django.contrib.flatpages.tests.views import *" ]
from django.conf.urls import patterns urlpatterns = patterns('django.contrib.flatpages.views', (r'^(?P<url>.*)$', 'flatpage'), )
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 528, 0, 1, 0, 0, 528, 0, 0 ], [ 14, 0, 0.8, 0.6, 0, 0.66, 1, 990, 3, 2, 0, 0, 75, 10, 1 ] ]
[ "from django.conf.urls import patterns", "urlpatterns = patterns('django.contrib.flatpages.views',\n (r'^(?P<url>.*)$', 'flatpage'),\n)" ]
from django.contrib.flatpages.views import flatpage from django.http import Http404 from django.conf import settings class FlatpageFallbackMiddleware(object): def process_response(self, request, response): if response.status_code != 404: return response # No need to check for a flatpage for non...
[ [ 1, 0, 0.0556, 0.0556, 0, 0.66, 0, 240, 0, 1, 0, 0, 240, 0, 0 ], [ 1, 0, 0.1111, 0.0556, 0, 0.66, 0.3333, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 1, 0, 0.1667, 0.0556, 0, ...
[ "from django.contrib.flatpages.views import flatpage", "from django.http import Http404", "from django.conf import settings", "class FlatpageFallbackMiddleware(object):\n def process_response(self, request, response):\n if response.status_code != 404:\n return response # No need to check ...
from django import template from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import get_current_site register = template.Library() class FlatpageNode(template.Node): def __init__(self, context_name, starts_with=None, user=None): self....
[ [ 1, 0, 0.0098, 0.0098, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.0196, 0.0098, 0, 0.66, 0.1667, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0294, 0.0098, 0, ...
[ "from django import template", "from django.conf import settings", "from django.contrib.flatpages.models import FlatPage", "from django.contrib.sites.models import get_current_site", "register = template.Library()", "class FlatpageNode(template.Node):\n def __init__(self, context_name, starts_with=None...
from django.contrib import admin from django.contrib.flatpages.models import FlatPage from django.utils.translation import ugettext_lazy as _ from django.contrib.flatpages.forms import FlatpageForm class FlatPageAdmin(admin.ModelAdmin): form = FlatpageForm fieldsets = ( (None, {'fields': ('url', 'title...
[ [ 1, 0, 0.0625, 0.0625, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.125, 0.0625, 0, 0.66, 0.2, 268, 0, 1, 0, 0, 268, 0, 0 ], [ 1, 0, 0.1875, 0.0625, 0, 0.66...
[ "from django.contrib import admin", "from django.contrib.flatpages.models import FlatPage", "from django.utils.translation import ugettext_lazy as _", "from django.contrib.flatpages.forms import FlatpageForm", "class FlatPageAdmin(admin.ModelAdmin):\n form = FlatpageForm\n fieldsets = (\n (None...
from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import get_current_site from django.core.xheaders import populate_xheaders from django.http import Http404, HttpResponse, HttpResponsePermanentRedirect from django.shortcuts import get_object_or_404 fr...
[ [ 1, 0, 0.0135, 0.0135, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.027, 0.0135, 0, 0.66, 0.0909, 268, 0, 1, 0, 0, 268, 0, 0 ], [ 1, 0, 0.0405, 0.0135, 0, 0...
[ "from django.conf import settings", "from django.contrib.flatpages.models import FlatPage", "from django.contrib.sites.models import get_current_site", "from django.core.xheaders import populate_xheaders", "from django.http import Http404, HttpResponse, HttpResponsePermanentRedirect", "from django.shortcu...
# This file intentionally left blank
[]
[]
from __future__ import unicode_literals import os from datetime import date from django.conf import settings from django.contrib.sitemaps import Sitemap, GenericSitemap from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigured from django.test.utils import override_settings ...
[ [ 1, 0, 0.0068, 0.0068, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0205, 0.0068, 0, 0.66, 0.0769, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0274, 0.0068, 0, ...
[ "from __future__ import unicode_literals", "import os", "from datetime import date", "from django.conf import settings", "from django.contrib.sitemaps import Sitemap, GenericSitemap", "from django.contrib.sites.models import Site", "from django.core.exceptions import ImproperlyConfigured", "from djang...
from __future__ import unicode_literals from datetime import date from django.test.utils import override_settings from .base import SitemapTestsBase class HTTPSSitemapTests(SitemapTestsBase): protocol = 'https' urls = 'django.contrib.sitemaps.tests.urls.https' def test_secure_sitemap_index(self): ...
[ [ 1, 0, 0.0179, 0.0179, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0536, 0.0179, 0, 0.66, 0.2, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0893, 0.0179, 0, 0.6...
[ "from __future__ import unicode_literals", "from datetime import date", "from django.test.utils import override_settings", "from .base import SitemapTestsBase", "class HTTPSSitemapTests(SitemapTestsBase):\n protocol = 'https'\n urls = 'django.contrib.sitemaps.tests.urls.https'\n\n def test_secure_s...
from __future__ import unicode_literals from django.test.utils import override_settings from .base import TestModel, SitemapTestsBase @override_settings(ABSOLUTE_URL_OVERRIDES={}) class GenericViewsSitemapTests(SitemapTestsBase): def test_generic_sitemap(self): "A minimal generic sitemap can be rendere...
[ [ 1, 0, 0.0455, 0.0455, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1364, 0.0455, 0, 0.66, 0.3333, 768, 0, 1, 0, 0, 768, 0, 0 ], [ 1, 0, 0.2273, 0.0455, 0, ...
[ "from __future__ import unicode_literals", "from django.test.utils import override_settings", "from .base import TestModel, SitemapTestsBase", "class GenericViewsSitemapTests(SitemapTestsBase):\n\n def test_generic_sitemap(self):\n \"A minimal generic sitemap can be rendered\"\n response = se...
from datetime import datetime from django.conf.urls import patterns, url from django.contrib.sitemaps import Sitemap, GenericSitemap, FlatPageSitemap, views from django.contrib.auth.models import User from django.views.decorators.cache import cache_page from django.contrib.sitemaps.tests.base import TestModel class ...
[ [ 1, 0, 0.0217, 0.0217, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0435, 0.0217, 0, 0.66, 0.1, 528, 0, 2, 0, 0, 528, 0, 0 ], [ 1, 0, 0.0652, 0.0217, 0, 0.6...
[ "from datetime import datetime", "from django.conf.urls import patterns, url", "from django.contrib.sitemaps import Sitemap, GenericSitemap, FlatPageSitemap, views", "from django.contrib.auth.models import User", "from django.views.decorators.cache import cache_page", "from django.contrib.sitemaps.tests.b...
from django.conf.urls import patterns from .http import SimpleSitemap class HTTPSSitemap(SimpleSitemap): protocol = 'https' secure_sitemaps = { 'simple': HTTPSSitemap, } urlpatterns = patterns('django.contrib.sitemaps.views', (r'^secure/index\.xml$', 'index', {'sitemaps': secure_sitemaps}), (r'^secu...
[ [ 1, 0, 0.0625, 0.0625, 0, 0.66, 0, 528, 0, 1, 0, 0, 528, 0, 0 ], [ 1, 0, 0.1875, 0.0625, 0, 0.66, 0.25, 415, 0, 1, 0, 0, 415, 0, 0 ], [ 3, 0, 0.3438, 0.125, 0, 0.6...
[ "from django.conf.urls import patterns", "from .http import SimpleSitemap", "class HTTPSSitemap(SimpleSitemap):\n protocol = 'https'", " protocol = 'https'", "secure_sitemaps = {\n 'simple': HTTPSSitemap,\n}", "urlpatterns = patterns('django.contrib.sitemaps.views',\n (r'^secure/index\\.xml$',...
from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.cache import cache from django.db import models from django.test import TestCase class TestModel(models.Model): "A test model for " name = models.CharField(max_length=100) class Meta: app_lab...
[ [ 1, 0, 0.0286, 0.0286, 0, 0.66, 0, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.0571, 0.0286, 0, 0.66, 0.1667, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 1, 0, 0.0857, 0.0286, 0, ...
[ "from django.contrib.auth.models import User", "from django.contrib.sites.models import Site", "from django.core.cache import cache", "from django.db import models", "from django.test import TestCase", "class TestModel(models.Model):\n \"A test model for \"\n name = models.CharField(max_length=100)\...
from .flatpages import FlatpagesSitemapTests from .generic import GenericViewsSitemapTests from .http import HTTPSitemapTests from .https import HTTPSSitemapTests, HTTPSDetectionSitemapTests
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 564, 0, 1, 0, 0, 564, 0, 0 ], [ 1, 0, 0.5, 0.25, 0, 0.66, 0.3333, 416, 0, 1, 0, 0, 416, 0, 0 ], [ 1, 0, 0.75, 0.25, 0, 0.66, 0.6...
[ "from .flatpages import FlatpagesSitemapTests", "from .generic import GenericViewsSitemapTests", "from .http import HTTPSitemapTests", "from .https import HTTPSSitemapTests, HTTPSDetectionSitemapTests" ]
from __future__ import unicode_literals from django.conf import settings from django.utils.unittest import skipUnless from .base import SitemapTestsBase class FlatpagesSitemapTests(SitemapTestsBase): @skipUnless("django.contrib.flatpages" in settings.INSTALLED_APPS, "django.contrib.flatpages app...
[ [ 1, 0, 0.0256, 0.0256, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0769, 0.0256, 0, 0.66, 0.25, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.1026, 0.0256, 0, 0....
[ "from __future__ import unicode_literals", "from django.conf import settings", "from django.utils.unittest import skipUnless", "from .base import SitemapTestsBase", "class FlatpagesSitemapTests(SitemapTestsBase):\n\n @skipUnless(\"django.contrib.flatpages\" in settings.INSTALLED_APPS,\n \"...
from django.core.management.base import BaseCommand from django.contrib.sitemaps import ping_google class Command(BaseCommand): help = "Ping Google with an updated sitemap, pass optional url of sitemap" def execute(self, *args, **options): if len(args) == 1: sitemap_url = args[0] ...
[ [ 1, 0, 0.0714, 0.0714, 0, 0.66, 0, 931, 0, 1, 0, 0, 931, 0, 0 ], [ 1, 0, 0.1429, 0.0714, 0, 0.66, 0.5, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 3, 0, 0.6429, 0.6429, 0, 0.6...
[ "from django.core.management.base import BaseCommand", "from django.contrib.sitemaps import ping_google", "class Command(BaseCommand):\n help = \"Ping Google with an updated sitemap, pass optional url of sitemap\"\n\n def execute(self, *args, **options):\n if len(args) == 1:\n sitemap_ur...
import warnings from django.contrib.sites.models import get_current_site from django.core import urlresolvers from django.core.paginator import EmptyPage, PageNotAnInteger from django.http import Http404 from django.template.response import TemplateResponse from django.utils import six def index(request, sitemaps, ...
[ [ 1, 0, 0.0143, 0.0143, 0, 0.66, 0, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 1, 0, 0.0429, 0.0143, 0, 0.66, 0.125, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 1, 0, 0.0571, 0.0143, 0, 0...
[ "import warnings", "from django.contrib.sites.models import get_current_site", "from django.core import urlresolvers", "from django.core.paginator import EmptyPage, PageNotAnInteger", "from django.http import Http404", "from django.template.response import TemplateResponse", "from django.utils import si...
from django.contrib.sites.models import Site from django.core import urlresolvers, paginator from django.core.exceptions import ImproperlyConfigured try: from urllib.parse import urlencode from urllib.request import urlopen except ImportError: # Python 2 from urllib import urlencode, urlopen PING_URL =...
[ [ 1, 0, 0.0081, 0.0081, 0, 0.66, 0, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 1, 0, 0.0161, 0.0081, 0, 0.66, 0.1111, 913, 0, 2, 0, 0, 913, 0, 0 ], [ 1, 0, 0.0242, 0.0081, 0, ...
[ "from django.contrib.sites.models import Site", "from django.core import urlresolvers, paginator", "from django.core.exceptions import ImproperlyConfigured", "try:\n from urllib.parse import urlencode\n from urllib.request import urlopen\nexcept ImportError: # Python 2\n from urllib import urlenc...
from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import CookieStorage from django.contrib.messages.storage.session import SessionStorage class FallbackStorage(BaseStorage): """ Tries to store all messages in the first backend, storing any unstored mes...
[ [ 1, 0, 0.0185, 0.0185, 0, 0.66, 0, 63, 0, 1, 0, 0, 63, 0, 0 ], [ 1, 0, 0.037, 0.0185, 0, 0.66, 0.3333, 589, 0, 1, 0, 0, 589, 0, 0 ], [ 1, 0, 0.0556, 0.0185, 0, 0.6...
[ "from django.contrib.messages.storage.base import BaseStorage", "from django.contrib.messages.storage.cookie import CookieStorage", "from django.contrib.messages.storage.session import SessionStorage", "class FallbackStorage(BaseStorage):\n \"\"\"\n Tries to store all messages in the first backend, stor...
import json from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import MessageEncoder, MessageDecoder from django.utils import six class SessionStorage(BaseStorage): """ Stores messages in the session (that is, django.contrib.sessions). """ session...
[ [ 1, 0, 0.0217, 0.0217, 0, 0.66, 0, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.0652, 0.0217, 0, 0.66, 0.25, 63, 0, 1, 0, 0, 63, 0, 0 ], [ 1, 0, 0.087, 0.0217, 0, 0.66,...
[ "import json", "from django.contrib.messages.storage.base import BaseStorage", "from django.contrib.messages.storage.cookie import MessageEncoder, MessageDecoder", "from django.utils import six", "class SessionStorage(BaseStorage):\n \"\"\"\n Stores messages in the session (that is, django.contrib.ses...
import json from django.conf import settings from django.contrib.messages.storage.base import BaseStorage, Message from django.http import SimpleCookie from django.utils.crypto import salted_hmac, constant_time_compare from django.utils.safestring import SafeData, mark_safe from django.utils import six class Message...
[ [ 1, 0, 0.0062, 0.0062, 0, 0.66, 0, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.0186, 0.0062, 0, 0.66, 0.1111, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0248, 0.0062, 0, ...
[ "import json", "from django.conf import settings", "from django.contrib.messages.storage.base import BaseStorage, Message", "from django.http import SimpleCookie", "from django.utils.crypto import salted_hmac, constant_time_compare", "from django.utils.safestring import SafeData, mark_safe", "from djang...
from __future__ import unicode_literals from django.conf import settings from django.utils.encoding import force_text, python_2_unicode_compatible from django.contrib.messages import constants, utils LEVEL_TAGS = utils.get_level_tags() @python_2_unicode_compatible class Message(object): """ Represents an a...
[ [ 1, 0, 0.0054, 0.0054, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0163, 0.0054, 0, 0.66, 0.1667, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0217, 0.0054, 0, ...
[ "from __future__ import unicode_literals", "from django.conf import settings", "from django.utils.encoding import force_text, python_2_unicode_compatible", "from django.contrib.messages import constants, utils", "LEVEL_TAGS = utils.get_level_tags()", "class Message(object):\n \"\"\"\n Represents an ...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module def get_storage(import_path): """ Imports the message storage class described by import_path, where import_path is the full Python path to the class. """ try: ...
[ [ 1, 0, 0.0323, 0.0323, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0645, 0.0323, 0, 0.66, 0.25, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 1, 0, 0.0968, 0.0323, 0, 0....
[ "from django.conf import settings", "from django.core.exceptions import ImproperlyConfigured", "from django.utils.importlib import import_module", "def get_storage(import_path):\n \"\"\"\n Imports the message storage class described by import_path, where\n import_path is the full Python path to the c...
from django.contrib.messages.api import get_messages def messages(request): """ Returns a lazy 'messages' context variable. """ return {'messages': get_messages(request)}
[ [ 1, 0, 0.125, 0.125, 0, 0.66, 0, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 2, 0, 0.75, 0.625, 0, 0.66, 1, 312, 0, 1, 1, 0, 0, 0, 1 ], [ 8, 1, 0.75, 0.375, 1, 0.39, 0, ...
[ "from django.contrib.messages.api import get_messages", "def messages(request):\n \"\"\"\n Returns a lazy 'messages' context variable.\n \"\"\"\n return {'messages': get_messages(request)}", " \"\"\"\n Returns a lazy 'messages' context variable.\n \"\"\"", " return {'messages': get_mes...
# Models module required so tests are discovered.
[]
[]