Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

import project

  • Loading branch information...
commit 826898c61a578bbd5cbba67cec732124c0c23d79 1 parent ddeb2a0
Areski Belaid areski authored
55 HACKING
View
@@ -0,0 +1,55 @@
+Nova Style Commandments
+=======================
+
+Step 1: Read http://www.python.org/dev/peps/pep-0008/
+Step 2: Read http://www.python.org/dev/peps/pep-0008/ again
+Step 3: Read on
+
+Imports
+-------
+- thou shalt not import objects, only modules
+- thou shalt not import more than one module per line
+- thou shalt not make relative imports
+- thou shalt "from nova import vendor" before importing third party code
+- thou shalt organize your imports according to the following template
+
+::
+ # vim: tabstop=4 shiftwidth=4 softtabstop=4
+ {{stdlib imports in human alphabetical order}}
+ \n
+ from nova import vendor
+ {{vendor imports in human alphabetical order}}
+ \n
+ {{nova imports in human alphabetical order}}
+ \n
+ \n
+ {{begin your code}}
+
+
+General
+-------
+- thou shalt put two newlines twixt toplevel code (funcs, classes, etc)
+- thou shalt put one newline twixt methods in classes and anywhere else
+- thou shalt not write "except:", use "except Exception:" at the very least
+- thou shalt include your name with TODOs as in "TODO(termie)"
+- thou shalt not name anything the same name as a builtin or reserved word
+- thou shalt not violate causality in our time cone, or else
+
+
+Human Alphabetical Order Examples
+---------------------------------
+::
+ import httplib
+ import logging
+ import random
+ import StringIO
+ import time
+ import unittest
+
+
+
+Tool to make code PEP8 compliant
+--------------------------------
+- Install : https://github.com/cburroughs/pep8
+- Usage in your project directory : pep8 --statistics --filename=*.py --show-source --show-pep8 .
+
15 INSTALL.rst
View
@@ -0,0 +1,15 @@
+
+
+1. Install requirement
+======================
+
+ > pip install -r requirements.txt
+
+
+2. Install
+==========
+
+ > python setup.py install
+
+
+
18 MIT-LICENSE.txt
View
@@ -0,0 +1,18 @@
+Copyright (c) 2011 Star2Billing S.L. <info@star2billing.com>
+
+django-audiofield is distributed under the terms of the Mozilla Public License (MPL) Version 1.1
+
+
+The contents of this file are subject to the Mozilla Public License Version
+1.1 (the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+http://www.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+
+You must retain, in the Source form of any Derivative Works that You distribute, all
+copyright, patent, trademark, and attribution notices from the Source form of the Work
+and a copy of this License excluding those notices that do not pertain to any part of the Derivative Works.
78 README.rst
View
@@ -0,0 +1,78 @@
+=======================
+django-country-dialcode
+=======================
+
+
+This Django application has for purpose to provide Dial Code and Country data, to reuse quickly into your django application.
+
+
+Installation
+============
+
+Install Django-Country-Dialcode::
+
+ python setup.py install
+
+
+Dependencies
+------------
+
+See requirements.txt file
+
+
+Settings
+========
+
+in your settings.py file::
+
+INSTALLED_APPS = INSTALLED_APPS + ('country_dialcode',)
+
+
+Usage
+=====
+
+In your models add the following ::
+
+ dialcode = models.ForeignKey(Prefix, verbose_name=_("Destination"), null=True,
+ blank=True, help_text=_("Select Prefix"))
+
+
+Contributing
+============
+
+If you've found a bug, implemented/improved a feature and think it is useful
+then please consider contributing. Patches, pull requests or just suggestions
+are welcome!
+
+Source code: http://github.com/Star2Billing/django-country-dialcode
+
+
+If you don’t like Github and Git you’re welcome to send regular patches.
+
+Bug tracker: https://github.com/Star2Billing/django-country-dialcode/issues
+
+
+Documentation
+=============
+
+Documentation is available on 'Read the Docs':
+http://django-country-dialcode.readthedocs.org
+
+
+License
+=======
+
+Copyright (c) 2011 Star2Billing S.L. <info@star2billing.com>
+
+django-country-dialcode is licensed under MIT, see `MIT-LICENSE.txt`.
+
+
+Credit
+======
+
+Django-country-dialcode is a Star2Billing-Sponsored Community Project, for more information visit
+http://www.star2billing.com or email us at info@star2billing.com
+
+
+
+
0  README → country_dialcode/__init__.py
View
File renamed without changes
29 country_dialcode/admin.py
View
@@ -0,0 +1,29 @@
+from django.contrib import admin
+from django.conf.urls.defaults import *
+from django.utils.translation import ugettext as _
+from django.db.models import *
+from prefix_country.models import *
+
+
+class CountryAdmin(admin.ModelAdmin):
+ list_display = ('countrycode', 'countryprefix', 'countryname')
+ search_fields = ('countryname', 'countryprefix')
+ ordering = ('id', )
+ list_filter = ['countryprefix', 'countrycode']
+
+ def __init__(self, *args, **kwargs):
+ super(CountryAdmin, self).__init__(*args, **kwargs)
+ self.list_display_links = ('countrycode', )
+admin.site.register(Country, CountryAdmin)
+
+
+class PrefixAdmin(admin.ModelAdmin):
+ search_fields = ('prefix', 'destination')
+ list_display = ('prefix', 'destination', 'country_name', 'carrier_name')
+ ordering = ('prefix', )
+ #list_filter = ['country_name', 'carrier_name']
+
+ def __init__(self, *args, **kwargs):
+ super(PrefixAdmin, self).__init__(*args, **kwargs)
+ #self.list_display_links = (None, )
+admin.site.register(Prefix, PrefixAdmin)
0  country_dialcode/fixtures/initial_data.json
View
No changes.
1  country_dialcode/fixtures/initial_data_full.json
View
1 addition, 0 deletions not shown
3  country_dialcode/forms.py
View
@@ -0,0 +1,3 @@
+from django import forms
+# place form definition here
+
74 country_dialcode/models.py
View
@@ -0,0 +1,74 @@
+from django.db import models
+from django.utils.translation import ugettext as _
+from datetime import *
+from common.intermediate_model_base_class import Model
+
+prefix_type_list = ((0, _("Landline")),
+ (1, _("Mobile")),
+ (2, _("NGN (Non Geographic Numbers)")))
+
+
+# Create your models here.
+class Country(Model):
+ """
+ Country
+
+ These are the countries and their country code, country prefix, name
+ For instance : USA, 1, United States
+ """
+ countrycode = models.CharField(max_length=240, verbose_name='Code',
+ help_text=_("Enter Country Code. e.g. USA"))
+ countryprefix = models.IntegerField(max_length=12,
+ verbose_name='Prefix',
+ help_text=_("Enter Country Prefix. e.g. 1"))
+ countryname = models.CharField(max_length=240, verbose_name='Name',
+ help_text=_("Enter Country Name. e.g. United States"))
+
+ class Meta:
+ db_table = 'simu_country'
+ app_label = _('prefix_country')
+ verbose_name = _("Country")
+ verbose_name_plural = _("Countries")
+
+ def __unicode__(self):
+ return "%s" % (self.countrycode)
+
+
+class Prefix(Model):
+ """
+ Prefix
+
+ These are the prefixes and destinations
+ For instance : 44 ; United Kingdom
+ """
+ prefix = models.IntegerField(primary_key=True, help_text=_("Enter Prefix"))
+ destination = models.CharField(max_length=180,
+ help_text=_("Enter Destination"))
+ country_id = models.ForeignKey(Country, db_column="country_id", null=True,
+ blank=True, verbose_name="Country Code",
+ help_text=_("Select Country"))
+ carrier_name = models.CharField(max_length=180,
+ help_text=_("Enter Carrier Name"))
+ prefix_type = models.IntegerField(choices=prefix_type_list, default=1,
+ verbose_name='Prefix Type',
+ help_text=_("Select Prefix Type"))
+
+ class Meta:
+ db_table = 'simu_prefix'
+ app_label = _('prefix_country')
+ verbose_name = _("Prefix")
+ verbose_name_plural = _("Prefixes")
+ ordering = ["prefix"]
+
+ def __unicode__(self):
+ return "%d" % (self.prefix)
+
+ def country_name(self):
+ """
+ Return country name on country listing (changeview_list)
+ """
+ if self.country_id is None:
+ return ""
+ else:
+ return self.country_id.countryname
+ country_name.short_description = _("Country Name")
255 country_dialcode/sql/country.sql
View
@@ -0,0 +1,255 @@
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (1, 'AFG', 93, 'Afghanistan');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (2, 'ALB', 355, 'Albania');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (3, 'DZA', 213, 'Algeria');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (4, 'ASM', 684, 'American Samoa');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (5, 'AND', 376, 'Andorra');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (6, 'AGO', 244, 'Angola');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (7, 'AIA', 1264, 'Anguilla');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (8, 'ATA', 672, 'Antarctica');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (9, 'ATG', 1268, 'Antigua And Barbuda');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (10, 'ARG', 54, 'Argentina');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (11, 'ARM', 374, 'Armenia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (12, 'ABW', 297, 'Aruba');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (13, 'AUS', 61, 'Australia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (14, 'AUT', 43, 'Austria');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (15, 'AZE', 994, 'Azerbaijan');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (16, 'BHS', 1242, 'Bahamas');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (17, 'BHR', 973, 'Bahrain');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (18, 'BGD', 880, 'Bangladesh');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (19, 'BRB', 1246, 'Barbados');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (20, 'BLR', 375, 'Belarus');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (21, 'BEL', 32, 'Belgium');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (22, 'BLZ', 501, 'Belize');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (23, 'BEN', 229, 'Benin');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (24, 'BMU', 1441, 'Bermuda');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (25, 'BTN', 975, 'Bhutan');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (26, 'BOL', 591, 'Bolivia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (27, 'BIH', 387, 'Bosnia And Herzegovina');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (28, 'BWA', 267, 'Botswana');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (29, 'BVT', 0, 'Bouvet Island');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (30, 'BRA', 55, 'Brazil');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (31, 'IOT', 1284, 'British Indian Ocean Territory');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (32, 'BRN', 673, 'Brunei Darussalam');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (33, 'BGR', 359, 'Bulgaria');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (34, 'BFA', 226, 'Burkina Faso');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (35, 'BDI', 257, 'Burundi');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (36, 'KHM', 855, 'Cambodia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (37, 'CMR', 237, 'Cameroon');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (38, 'CAN', 1, 'Canada');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (39, 'CPV', 238, 'Cape Verde');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (40, 'CYM', 1345, 'Cayman Islands');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (41, 'CAF', 236, 'Central African Republic');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (42, 'TCD', 235, 'Chad');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (43, 'CHL', 56, 'Chile');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (44, 'CHN', 86, 'China');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (45, 'CXR', 618, 'Christmas Island');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (46, 'CCK', 61, 'Cocos (Keeling); Islands');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (47, 'COL', 57, 'Colombia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (48, 'COM', 269, 'Comoros');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (49, 'COG', 242, 'Congo');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (50, 'COD', 243, 'Congo, The Democratic Republic Of The');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (51, 'COK', 682, 'Cook Islands');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (52, 'CRI', 506, 'Costa Rica');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (53, 'CIV', 225, 'Côte d''Ivoire');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (54, 'HRV', 385, 'Croatia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (55, 'CUB', 53, 'Cuba');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (56, 'CYP', 357, 'Cyprus');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (57, 'CZE', 420, 'Czech Republic');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (58, 'DNK', 45, 'Denmark');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (59, 'DJI', 253, 'Djibouti');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (60, 'DMA', 1767, 'Dominica');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (61, 'DOM', 1809, 'Dominican Republic');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (62, 'ECU', 593, 'Ecuador');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (63, 'EGY', 20, 'Egypt');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (64, 'SLV', 503, 'El Salvador');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (65, 'GNQ', 240, 'Equatorial Guinea');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (66, 'ERI', 291, 'Eritrea');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (67, 'EST', 372, 'Estonia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (68, 'ETH', 251, 'Ethiopia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (69, 'FLK', 500, 'Falkland Islands (Malvinas);');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (70, 'FRO', 298, 'Faroe Islands');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (71, 'FJI', 679, 'Fiji');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (72, 'FIN', 358, 'Finland');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (73, 'FRA', 33, 'France');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (74, 'GUF', 596, 'French Guiana');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (75, 'PYF', 594, 'French Polynesia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (76, 'ATF', 689, 'French Southern Territories');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (77, 'GAB', 241, 'Gabon');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (78, 'GMB', 220, 'Gambia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (79, 'GEO', 995, 'Georgia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (80, 'DEU', 49, 'Germany');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (81, 'GHA', 233, 'Ghana');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (82, 'GIB', 350, 'Gibraltar');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (83, 'GRC', 30, 'Greece');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (84, 'GRL', 299, 'Greenland');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (85, 'GRD', 1473, 'Grenada');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (86, 'GLP', 590, 'Guadeloupe');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (87, 'GUM', 1671, 'Guam');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (88, 'GTM', 502, 'Guatemala');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (89, 'GIN', 224, 'Guinea');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (90, 'GNB', 245, 'Guinea-Bissau');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (91, 'GUY', 592, 'Guyana');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (92, 'HTI', 509, 'Haiti');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (93, 'HMD', 0, 'Heard Island And McDonald Islands');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (94, 'VAT', 0, 'Holy See (Vatican City State);');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (95, 'HND', 504, 'Honduras');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (96, 'HKG', 852, 'Hong Kong');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (97, 'HUN', 36, 'Hungary');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (98, 'ISL', 354, 'Iceland');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (99, 'IND', 91, 'India');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (100, 'IDN', 62, 'Indonesia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (101, 'IRN', 98, 'Iran, Islamic Republic Of');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (102, 'IRQ', 964, 'Iraq');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (103, 'IRL', 353, 'Ireland');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (104, 'ISR', 972, 'Israel');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (105, 'ITA', 39, 'Italy');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (106, 'JAM', 1876, 'Jamaica');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (107, 'JPN', 81, 'Japan');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (108, 'JOR', 962, 'Jordan');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (109, 'KAZ', 7, 'Kazakhstan');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (110, 'KEN', 254, 'Kenya');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (111, 'KIR', 686, 'Kiribati');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (112, 'PRK', 850, 'Korea, Democratic People''s Republic Of');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (113, 'KOR', 82, 'Korea, Republic of');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (114, 'KWT', 965, 'Kuwait');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (115, 'KGZ', 996, 'Kyrgyzstan');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (116, 'LAO', 856, 'Lao People''s Democratic Republic');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (117, 'LVA', 371, 'Latvia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (118, 'LBN', 961, 'Lebanon');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (119, 'LSO', 266, 'Lesotho');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (120, 'LBR', 231, 'Liberia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (121, 'LBY', 218, 'Libyan Arab Jamahiriya');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (122, 'LIE', 423, 'Liechtenstein');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (123, 'LTU', 370, 'Lithuania');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (124, 'LUX', 352, 'Luxembourg');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (125, 'MAC', 853, 'Macao');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (126, 'MKD', 389, 'Macedonia, The Former Yugoslav Republic Of');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (127, 'MDG', 261, 'Madagascar');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (128, 'MWI', 265, 'Malawi');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (129, 'MYS', 60, 'Malaysia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (130, 'MDV', 960, 'Maldives');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (131, 'MLI', 223, 'Mali');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (132, 'MLT', 356, 'Malta');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (133, 'MHL', 692, 'Marshall islands');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (134, 'MTQ', 596, 'Martinique');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (135, 'MRT', 222, 'Mauritania');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (136, 'MUS', 230, 'Mauritius');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (137, 'MYT', 269, 'Mayotte');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (138, 'MEX', 52, 'Mexico');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (139, 'FSM', 691, 'Micronesia, Federated States Of');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (140, 'MDA', 1808, 'Moldova, Republic Of');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (141, 'MCO', 377, 'Monaco');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (142, 'MNG', 976, 'Mongolia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (143, 'MSR', 1664, 'Montserrat');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (144, 'MAR', 212, 'Morocco');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (145, 'MOZ', 258, 'Mozambique');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (146, 'MMR', 95, 'Myanmar');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (147, 'NAM', 264, 'Namibia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (148, 'NRU', 674, 'Nauru');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (149, 'NPL', 977, 'Nepal');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (150, 'NLD', 31, 'Netherlands');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (151, 'ANT', 599, 'Netherlands Antilles');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (152, 'NCL', 687, 'New Caledonia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (153, 'NZL', 64, 'New Zealand');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (154, 'NIC', 505, 'Nicaragua');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (155, 'NER', 227, 'Niger');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (156, 'NGA', 234, 'Nigeria');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (157, 'NIU', 683, 'Niue');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (158, 'NFK', 672, 'Norfolk Island');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (159, 'MNP', 1670, 'Northern Mariana Islands');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (160, 'NOR', 47, 'Norway');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (161, 'OMN', 968, 'Oman');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (162, 'PAK', 92, 'Pakistan');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (163, 'PLW', 680, 'Palau');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (164, 'PSE', 970, 'Palestinian Territory, Occupied');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (165, 'PAN', 507, 'Panama');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (166, 'PNG', 675, 'Papua New Guinea');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (167, 'PRY', 595, 'Paraguay');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (168, 'PER', 51, 'Peru');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (169, 'PHL', 63, 'Philippines');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (170, 'PCN', 0, 'Pitcairn');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (171, 'POL', 48, 'Poland');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (172, 'PRT', 351, 'Portugal');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (173, 'PRI', 1787, 'Puerto Rico');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (174, 'QAT', 974, 'Qatar');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (175, 'REU', 262, 'Reunion');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (176, 'ROU', 40, 'Romania');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (177, 'RUS', 7, 'Russian Federation');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (178, 'RWA', 250, 'Rwanda');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (179, 'SHN', 290, 'SaINT Helena');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (180, 'KNA', 1869, 'SaINT Kitts And Nevis');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (181, 'LCA', 1758, 'SaINT Lucia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (182, 'SPM', 508, 'SaINT Pierre And Miquelon');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (183, 'VCT', 1784, 'SaINT Vincent And The Grenadines');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (184, 'WSM', 685, 'Samoa');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (185, 'SMR', 378, 'San Marino');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (186, 'STP', 239, 'São Tomé And Principe');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (187, 'SAU', 966, 'Saudi Arabia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (188, 'SEN', 221, 'Senegal');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (189, 'SYC', 248, 'Seychelles');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (190, 'SLE', 232, 'Sierra Leone');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (191, 'SGP', 65, 'Singapore');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (192, 'SVK', 421, 'Slovakia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (193, 'SVN', 386, 'Slovenia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (194, 'SLB', 677, 'Solomon Islands');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (195, 'SOM', 252, 'Somalia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (196, 'ZAF', 27, 'South Africa');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (197, 'SGS', 0, 'South Georgia And The South Sandwich Islands');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (198, 'ESP', 34, 'Spain');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (199, 'LKA', 94, 'Sri Lanka');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (200, 'SDN', 249, 'Sudan');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (201, 'SUR', 597, 'Suriname');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (202, 'SJM', 0, 'Svalbard and Jan Mayen');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (203, 'SWZ', 268, 'Swaziland');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (204, 'SWE', 46, 'Sweden');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (205, 'CHE', 41, 'Switzerland');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (206, 'SYR', 963, 'Syrian Arab Republic');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (207, 'TWN', 886, 'Taiwan, Province Of China');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (208, 'TJK', 992, 'Tajikistan');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (209, 'TZA', 255, 'Tanzania, United Republic Of');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (210, 'THA', 66, 'Thailand');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (211, 'TLS', 670, 'Timor-Leste');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (212, 'TGO', 228, 'Togo');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (213, 'TKL', 690, 'Tokelau');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (214, 'TON', 676, 'Tonga');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (215, 'TTO', 1868, 'Trinidad And Tobago');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (216, 'TUN', 216, 'Tunisia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (217, 'TUR', 90, 'Turkey');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (218, 'TKM', 993, 'Turkmenistan');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (219, 'TCA', 1649, 'Turks And Caicos Islands');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (220, 'TUV', 688, 'Tuvalu');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (221, 'UGA', 256, 'Uganda');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (222, 'UKR', 380, 'Ukraine');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (223, 'ARE', 971, 'United Arab Emirates');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (224, 'GBR', 44, 'United Kingdom');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (225, 'USA', 1, 'United States');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (226, 'UMI', 0, 'United States Minor Outlying Islands');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (227, 'URY', 598, 'Uruguay');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (228, 'UZB', 998, 'Uzbekistan');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (229, 'VUT', 678, 'Vanuatu');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (230, 'VEN', 58, 'Venezuela');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (231, 'VNM', 84, 'Vietnam');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (232, 'VGB', 1284, 'Virgin Islands, British');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (233, 'VIR', 808, 'Virgin Islands, U.S.');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (234, 'WLF', 681, 'Wallis And Futuna');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (235, 'ESH', 0, 'Western Sahara');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (236, 'YEM', 967, 'Yemen');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (237, 'YUG', 0, 'Yugoslavia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (238, 'ZMB', 260, 'Zambia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (239, 'ZWE', 263, 'Zimbabwe');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (240, 'ASC', 0, 'Ascension Island');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (241, 'DGA', 0, 'Diego Garcia');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (242, 'XNM', 0, 'Inmarsat');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (243, 'TMP', 0, 'East timor');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (244, 'AK', 0, 'Alaska');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (245, 'HI', 0, 'Hawaii');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (246, 'ALA', 35818, 'Aland Islands');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (247, 'BLM', 0, 'Saint Barthelemy');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (248, 'GGY', 441481, 'Guernsey');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (249, 'IMN', 441624, 'Isle of Man');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (250, 'JEY', 441534, 'Jersey');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (251, 'MAF', 0, 'Saint Martin');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (252, 'MNE', 382, 'Montenegro, Republic of');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (253, 'SRB', 381, 'Serbia, Republic of');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (254, 'CPT', 0, 'Clipperton Island');
+INSERT INTO `simu_country` (`id`, `countrycode`, `countryprefix`, `countryname`) VALUES (255, 'TAA', 0, 'Tristan da Cunha');
9,013 country_dialcode/sql/prefix.sql
View
9,013 additions, 0 deletions not shown
8 country_dialcode/urls.py
View
@@ -0,0 +1,8 @@
+from django.conf.urls.defaults import *
+from django.conf import settings
+from provider.views import *
+
+
+urlpatterns = patterns('',
+
+)
1  country_dialcode/views.py
View
@@ -0,0 +1 @@
+# Create your views here.
130 docs/Makefile
View
@@ -0,0 +1,130 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = build
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ -rm -rf $(BUILDDIR)/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/django-audiofield.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/django-audiofield.qhc"
+
+devhelp:
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+ @echo
+ @echo "Build finished."
+ @echo "To view the help file:"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/django-audiofield"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/django-audiofield"
+ @echo "# devhelp"
+
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ make -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+ @echo
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
170 docs/make.bat
View
@@ -0,0 +1,170 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
+if NOT "%PAPER%" == "" (
+ set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+ :help
+ echo.Please use `make ^<target^>` where ^<target^> is one of
+ echo. html to make standalone HTML files
+ echo. dirhtml to make HTML files named index.html in directories
+ echo. singlehtml to make a single large HTML file
+ echo. pickle to make pickle files
+ echo. json to make JSON files
+ echo. htmlhelp to make HTML files and a HTML help project
+ echo. qthelp to make HTML files and a qthelp project
+ echo. devhelp to make HTML files and a Devhelp project
+ echo. epub to make an epub
+ echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+ echo. text to make text files
+ echo. man to make manual pages
+ echo. changes to make an overview over all changed/added/deprecated items
+ echo. linkcheck to check all external links for integrity
+ echo. doctest to run all doctests embedded in the documentation if enabled
+ goto end
+)
+
+if "%1" == "clean" (
+ for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+ del /q /s %BUILDDIR%\*
+ goto end
+)
+
+if "%1" == "html" (
+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+ goto end
+)
+
+if "%1" == "dirhtml" (
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+ goto end
+)
+
+if "%1" == "singlehtml" (
+ %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+ goto end
+)
+
+if "%1" == "pickle" (
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the pickle files.
+ goto end
+)
+
+if "%1" == "json" (
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the JSON files.
+ goto end
+)
+
+if "%1" == "htmlhelp" (
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+ goto end
+)
+
+if "%1" == "qthelp" (
+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\django-audiofield.qhcp
+ echo.To view the help file:
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\django-audiofield.ghc
+ goto end
+)
+
+if "%1" == "devhelp" (
+ %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished.
+ goto end
+)
+
+if "%1" == "epub" (
+ %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The epub file is in %BUILDDIR%/epub.
+ goto end
+)
+
+if "%1" == "latex" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "text" (
+ %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The text files are in %BUILDDIR%/text.
+ goto end
+)
+
+if "%1" == "man" (
+ %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The manual pages are in %BUILDDIR%/man.
+ goto end
+)
+
+if "%1" == "changes" (
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.The overview file is in %BUILDDIR%/changes.
+ goto end
+)
+
+if "%1" == "linkcheck" (
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+ goto end
+)
+
+if "%1" == "doctest" (
+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+ goto end
+)
+
+:end
216 docs/source/conf.py
View
@@ -0,0 +1,216 @@
+# -*- coding: utf-8 -*-
+#
+# django-audiofield documentation build configuration file, created by
+# sphinx-quickstart on Thu Dec 8 12:55:34 2011.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = []
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'django-audiofield'
+copyright = u'2011, Arezqui Belaid (Star2Billing)'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '0.1'
+# The full version, including alpha/beta/rc tags.
+release = '0.1'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = []
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'django-audiofielddoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+ ('index', 'django-audiofield.tex', u'django-audiofield Documentation',
+ u'Arezqui Belaid', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ ('index', 'django-audiofield', u'django-audiofield Documentation',
+ [u'Arezqui Belaid'], 1)
+]
78 docs/source/includes/introduction.txt
View
@@ -0,0 +1,78 @@
+:Version: 0.1.0
+:Keywords: django, python
+
+--
+
+.. _django-country-dialcode-synopsis:
+
+Django-country-dialcode is an open source project written in Python, using the ``Django`` Framework.
+
+The license is MIT.
+
+
+.. _overview:
+
+Overview
+========
+
+Django-country-dialcode is a Django application which provide Dial Code and Country data and make it easy to reuse quickly into your django application
+
+
+.. _usage:
+
+Usage
+=====
+
+
+In your models add the following ::
+
+ dialcode = models.ForeignKey(Prefix, verbose_name=_("Destination"), null=True,
+ blank=True, help_text=_("Select Prefix"))
+
+
+.. _documentation:
+
+Documentation
+=============
+
+Extensive documentation is available on 'Read the Docs':
+http://django-country-dialcode.readthedocs.org
+
+
+.. _contributing:
+
+Contributing
+============
+
+If you've found a bug, implemented a feature or customized the template and
+think it is useful then please consider contributing. Patches, pull requests or
+just suggestions are welcome!
+
+Source code: http://github.com/Star2Billing/django-country-dialcode
+
+
+If you don’t like Github and Git you’re welcome to send regular patches.
+
+Bug tracker: https://github.com/Star2Billing/django-country-dialcode/issues
+
+
+.. _license:
+
+License
+=======
+
+Copyright (c) 2011 Star2Billing S.L. <info@star2billing.com>
+
+django-country-dialcode is licensed under MIT, see `MIT-LICENSE.txt`.
+
+
+.. _credit:
+
+Credit
+======
+
+django-country-dialcode is a Star2Billing-Sponsored Community Project, for more information visit
+http://www.star2billing.com or email us at info@star2billing.com
+
+
+
29 docs/source/index.rst
View
@@ -0,0 +1,29 @@
+.. django-country-dialcode documentation master file, created by
+ sphinx-quickstart on Thu Dec 8 12:55:34 2011.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+Welcome to django-country-dialcode's documentation!
+===================================================
+
+:Release: |version|
+:Date: |today|
+
+
+Contents:
+
+.. toctree::
+ :maxdepth: 2
+
+ introduction
+ installation-overview
+ developer-doc
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
48 docs/source/installation-overview.rst
View
@@ -0,0 +1,48 @@
+.. _installation-overview:
+
+=====================
+Installation overview
+=====================
+
+.. _install-requirements:
+
+Install requirements
+====================
+
+A requirements file stores a list of dependencies to be installed for your project/application.
+
+To get started with Django-country-dialcode you must have the following installed:
+
+- python >= 2.4 (programming language)
+- Apache / http server with WSGI modules
+- Django Framework >= 1.3 (Python based Web framework)
+
+
+.. _install_requirements:
+
+Install requirements
+====================
+
+Use PIP to install the dependencies listed in the requirments file,::
+
+ $ pip install -r requirements.txt
+
+
+.. _configuration:
+
+Configuration
+=============
+
+Add ``country_dialcode`` into INSTALLED_APPS in settings.py::
+
+ INSTALLED_APPS = (
+ ...
+ 'country_dialcode',
+ ...)
+
+
+Run following commands::
+
+ python manage.py syncdb
+
+
7 docs/source/introduction.rst
View
@@ -0,0 +1,7 @@
+.. _intro:
+
+============
+Introduction
+============
+
+.. include:: ./includes/introduction.txt
4 requirements.txt
View
@@ -0,0 +1,4 @@
+Django==1.3.0
+MySQL-python==1.2.3
+django-reusableapps==0.1.1
+git+git://github.com/Star2Billing/simu-common.git
92 setup.py
View
@@ -0,0 +1,92 @@
+from setuptools import setup
+import os
+import sys
+import re
+
+version='0.1.0'
+
+packages, data_files = [], []
+root_dir = os.path.dirname(__file__)
+if root_dir:
+ os.chdir(root_dir)
+
+for dirpath, dirnames, filenames in os.walk('country_dialcode'):
+ # Ignore dirnames that start with '.'
+ for i, dirname in enumerate(dirnames):
+ if dirname.startswith('.'): del dirnames[i]
+ if '__init__.py' in filenames:
+ pkg = dirpath.replace(os.path.sep, '.')
+ if os.path.altsep:
+ pkg = pkg.replace(os.path.altsep, '.')
+ packages.append(pkg)
+ elif filenames:
+ prefix = dirpath[12:]
+ for f in filenames:
+ data_files.append(os.path.join(prefix, f))
+
+def parse_requirements(file_name):
+ requirements = []
+ for line in open(file_name, 'r').read().split('\n'):
+ if re.match(r'(\s*#)|(\s*$)', line):
+ continue
+ if re.match(r'\s*-e\s+', line):
+ requirements.append(re.sub(r'\s*-e\s+.*#egg=(.*)$', r'\1', line))
+ elif re.match(r'(\s*git)|(\s*hg)', line):
+ pass
+ else:
+ requirements.append(line)
+ return requirements
+
+
+def parse_dependency_links(file_name, install_flag=False):
+ dependency_links = []
+ for line in open(file_name, 'r').read().split('\n'):
+ if re.match(r'\s*-e\s+', line):
+ dependency_links.append(re.sub(r'\s*-e\s+', '', line))
+ if re.match(r'(\s*git)|(\s*hg)', line):
+ if install_flag == True:
+ line_arr = line.split('/')
+ line_arr_length = len(line.split('/'))
+ pck_name = line_arr[line_arr_length - 1].split('.git')
+ if len(pck_name) == 2:
+ os.system('pip install -f %s %s' % (pck_name[0], line))
+ if len(pck_name) == 1:
+ os.system('pip install -f %s %s' % (pck_name, line))
+ return dependency_links
+
+
+install_flag=False
+if sys.argv[1] == "install":
+ install_flag = True
+
+
+
+setup(
+ name='django-country-dialcode',
+ version=version,
+ description='Application providing Dialcode and Countries code',
+ author='Belaid Arezqui',
+ author_email='areski@gmail.com',
+ url='http://github.com/Star2Billing/django-country-dialcode',
+ packages=['country_dialcode'],
+ package_dir={'country_dialcode': 'country_dialcode'},
+ package_data={'country_dialcode': data_files},
+ download_url='https://github.com/Star2Billing/django-country-dialcode/tarball/master',
+ zip_safe = False,
+ entry_points={'django.apps': 'country_dialcode = country_dialcode'},
+ install_requires = parse_requirements('requirements.txt'),
+ dependency_links = parse_dependency_links('requirements.txt',
+ install_flag),
+ license='MIT License',
+ classifiers=[
+ 'Development Status :: 4 - Beta',
+ 'Environment :: Web Environment',
+ 'Framework :: Django',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: MIT License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ 'Topic :: Software Development :: Libraries :: Python Modules'
+ ],
+)
+
Please sign in to comment.
Something went wrong with that request. Please try again.