{ "info": { "author": "Luis Zarate Montero", "author_email": "luis.zarate@solvosoft.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "crdist\n=========\n\n.. image:: https://travis-ci.org/solvo/crdist.svg\n :target: https://travis-ci.org/solvo/crdist\n\nCosta Rican Geografic distribution for model admin in Django.\n\nNow django 1.11 compatible.\n\n.. note:: \n The data is in Spanish.\n \n All source code is in English and of course it is spanish translated.\n\nInstallation\n-------------\n\nInstall crdist in your python environment\n\n1- Download and install package:\n\n.. code:: bash\n\n $ pip install crdist\n\nThrough Github:\n\n.. code:: bash\n\n $ pip install git+https://github.com/solvo/crdist.git\n\n\nPut crdist in your INSTALLED_APPS\n\n.. code:: python\n\n INSTALLED_APPS = (\n ...\n 'crdist',\n )\n\nInclude crdist in your urls.py\n\n.. code:: python\n\n\tfrom django.conf.urls import url, include\n\turlpatterns = [\n\t\turl(r'^crdist/', include(\"crdist.urls\")),\n\t]\n\n\nRun migration \n\n.. code:: bash\n\n $ python manage.py migrate \n\n\nUsage\n---------\n\nIn your models create a Foreign relation to District in your *models.py* file.\n\n.. code:: python\n \n from crdist.models import District\n class Test(models.Model):\n name = models.CharField(max_length=64)\n location = models.ForeignKey(District) \n \n\nWe provide a form widget specially for choose Province, Canton and District in the same widget. eg.\n\n.. code:: python\n\n from crdist.widgets import DistrictSelect\n from crdist.models import District\n \n class CRForm(forms.Form):\n district = forms.ModelChoiceField(queryset=District.objects.all(),\n widget=DistrictSelect)\n\n\nIt's also ok use with admin interface, you can add some code in your *admin.py* file.\n\n.. code:: python\n\n class TestAdminForm(forms.ModelForm):\n class Meta:\n model = Test\n fields = '__all__'\n widgets = {\n 'district': DistrictSelect(attrs={\"class\": \"form-control\"}),\n }\n \n \n class TestAdmin(admin.ModelAdmin):\n form = TestAdminForm\n\n admin.site.register(Test, TestAdmin)\n \nWe also support multiple relations in the same model, so you can display several widgets in the same page.\n\nJavascrit triggers \n-------------------------\n\n- load_canton { \"dist\": 'div_district_' + name, \"canton\": 'div_canton_' + name }\n- load_district { \"dist\": 'div_district_' + name }\n\n.. code:: javascript\n\n document.addEventListener(\"load_canton\", function(e) {\n\t console.log(document.cantoncrdist.dist); \n\t console.log(document.cantoncrdist.canton); // id of divs\n\t});\n \n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/solvo/crdist", "keywords": "", "license": "GNU General Public License", "maintainer": "", "maintainer_email": "", "name": "crdist", "package_url": "https://pypi.org/project/crdist/", "platform": "OS Independent", "project_url": "https://pypi.org/project/crdist/", "project_urls": { "Homepage": "https://github.com/solvo/crdist" }, "release_url": "https://pypi.org/project/crdist/0.1.7/", "requires_dist": null, "requires_python": "", "summary": "Costa Rican Geografic distribution for model admin in Django.", "version": "0.1.7" }, "last_serial": 4784633, "releases": { "0.0.2b0": [ { "comment_text": "", "digests": { "md5": "cd9b12f7e817634df780a18b36d149ce", "sha256": "f7072e3755c05edfbd9b54c12faff6f05854911d09af4f5b084049f79c477aef" }, "downloads": -1, "filename": "crdist-0.0.2b0.tar.gz", "has_sig": false, "md5_digest": "cd9b12f7e817634df780a18b36d149ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24815, "upload_time": "2015-12-17T05:28:26", "url": "https://files.pythonhosted.org/packages/70/45/90231f51a4b9fdfd8f3d52b6e1179abd21967d4411e1eeeadc08643058a5/crdist-0.0.2b0.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "a51027ce84706d3bf83dd0dd9b2b3388", "sha256": "d12e9f949d9c85b95054af3c57d26f2e603a8509007a007c40eb28376ab2b240" }, "downloads": -1, "filename": "crdist-0.1.tar.gz", "has_sig": false, "md5_digest": "a51027ce84706d3bf83dd0dd9b2b3388", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24883, "upload_time": "2015-12-17T06:33:48", "url": "https://files.pythonhosted.org/packages/d2/bc/a6e93d6223754b99245ee3954d103cdf7a690be9f696d4a0f7ba73d913f1/crdist-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "8d252a89f1bd0340271de1e0805b876b", "sha256": "54c4c7eeb2d97396f06a7f939e71e5b299d13db635b2fd87c8e205fa413e97e8" }, "downloads": -1, "filename": "crdist-0.1.1.tar.gz", "has_sig": false, "md5_digest": "8d252a89f1bd0340271de1e0805b876b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25456, "upload_time": "2015-12-19T21:06:08", "url": "https://files.pythonhosted.org/packages/24/bc/8051c71624936ecc9fc3b65f3e824a5f3681facc53153c8b92ba00a46ed5/crdist-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "3862cfc4f5a4f4892a4191372000d703", "sha256": "1f5a11085be6bd47c76952cd6f75c4a7ccad689f6f5632d729e3eab82f902659" }, "downloads": -1, "filename": "crdist-0.1.2.tar.gz", "has_sig": false, "md5_digest": "3862cfc4f5a4f4892a4191372000d703", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25933, "upload_time": "2016-02-06T15:48:44", "url": "https://files.pythonhosted.org/packages/12/1a/ca895567d3620ef4a3cc60ec7f61cc03fa512494b49b5651399425cf60da/crdist-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7e7d81229e9f4ad3e6010f3cb5b539c1", "sha256": "a1f787bbf0064508000e1339472a92c0d1c61ce8afa579d9092145b42310945d" }, "downloads": -1, "filename": "crdist-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7e7d81229e9f4ad3e6010f3cb5b539c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24428, "upload_time": "2017-01-18T15:40:13", "url": "https://files.pythonhosted.org/packages/f0/80/6e0bb2bd22cc770c3d8bc1c542d2858822dc434a9f16aaf31f58ad63ac72/crdist-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "394711cad55b625c0a057164a3307c6f", "sha256": "96bd0075c9fc43115f0df8b721b73872f1960df11f48110958a54af52d23096e" }, "downloads": -1, "filename": "crdist-0.1.4.tar.gz", "has_sig": false, "md5_digest": "394711cad55b625c0a057164a3307c6f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24801, "upload_time": "2017-01-24T19:15:50", "url": "https://files.pythonhosted.org/packages/03/e2/946a64ee14e4d341be1d9ed1494f20fe08a4ce6db6b2339f386b908e31cc/crdist-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "0d94ca22763c44e982d2c4a5565b0d92", "sha256": "617341f0f05b12670fcabccf6b540547ef7676590af04ca73542ebf9ba7ecf31" }, "downloads": -1, "filename": "crdist-0.1.5.tar.gz", "has_sig": false, "md5_digest": "0d94ca22763c44e982d2c4a5565b0d92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25874, "upload_time": "2017-05-16T03:19:57", "url": "https://files.pythonhosted.org/packages/d8/6e/ee08de9daf8894f007a09eed32be0d18ae0f5ccb88ec68ad035ea1991009/crdist-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "dcf0881cc36da2afb2319a6c19701281", "sha256": "4724a5044c5dc151fb4aa5a29aaa13c7c63e80e7d603798f8ba0f41a8e983414" }, "downloads": -1, "filename": "crdist-0.1.6.tar.gz", "has_sig": true, "md5_digest": "dcf0881cc36da2afb2319a6c19701281", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25875, "upload_time": "2018-02-15T20:23:54", "url": "https://files.pythonhosted.org/packages/14/de/88efca23fe8115235781b932c3564a399a4099a1b243b30b5def377059da/crdist-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "e06bff9f4968aa8f6701c486908e6c2f", "sha256": "d7d2ca9f4d8461232a8824f687f2b0042cced1dbf7ec4c146a72f3a3dcbd9679" }, "downloads": -1, "filename": "crdist-0.1.7.tar.gz", "has_sig": false, "md5_digest": "e06bff9f4968aa8f6701c486908e6c2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26179, "upload_time": "2019-02-06T01:55:59", "url": "https://files.pythonhosted.org/packages/d1/1a/55170dcd8cdec96a768e29d461cc46ee8dad6357760f64961cfe77ba22a8/crdist-0.1.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e06bff9f4968aa8f6701c486908e6c2f", "sha256": "d7d2ca9f4d8461232a8824f687f2b0042cced1dbf7ec4c146a72f3a3dcbd9679" }, "downloads": -1, "filename": "crdist-0.1.7.tar.gz", "has_sig": false, "md5_digest": "e06bff9f4968aa8f6701c486908e6c2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26179, "upload_time": "2019-02-06T01:55:59", "url": "https://files.pythonhosted.org/packages/d1/1a/55170dcd8cdec96a768e29d461cc46ee8dad6357760f64961cfe77ba22a8/crdist-0.1.7.tar.gz" } ] }