{ "info": { "author": "Ryan Nowakowski", "author_email": "tubaman@fattuba.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP" ], "description": "django-macaddress\n==================\n\n.. image:: https://travis-ci.org/django-macaddress/django-macaddress.svg?branch=master\n :alt: Build Status\n :target: https://travis-ci.org/django-macaddress/django-macaddress\n.. image:: https://img.shields.io/pypi/v/django-macaddress.svg\n :target: https://crate.io/packages/django-macaddress\n\nMAC Address model and form fields for Django\n\nWe use netaddr to parse and validate the MAC address. The tests aren't\ncomplete yet.\n\nPatches welcome: http://github.com/django-macaddress/django-macaddress\n\nRelease Notes:\n**************\n\nFor release info: https://github.com/django-macaddress/django-macaddress/releases\n\n\nGetting Started\n***************\n\nsettings.MACADDRESS_DEFAULT_DIALECT\n-----------------------------------\nTo specify a default dialect for presentation (and storage, see below), specify::\n\n settings.MACADDRESS_DEFAULT_DIALECT = 'module.dialect_class'\n\nwhere the specified value is a string composed of a parent python module name \nand the child dialect class name. For example::\n\n settings.MACADDRESS_DEFAULT_DIALECT = 'netaddr.mac_eui48'\n\nPS: old default of macaddress.mac_linux (uppercase and divided by ':' ) will be used by default.\n\nIf the custom dialect is defined in a package module, you will need to define the \nclass in or import into the package's ``__init__.py``.\n\n``default_dialect`` and ``format_mac``\n--------------------------------------\nTo get the default dialect for your project, import and call the ``default_dialect`` function::\n\n >>> from macaddress import default_dialect\n\n >>> dialect = default_dialect()\n\nThis function may, optionally, be called with an ``netaddr.EUI`` class instance as its argument. If no\ndefault is defined in ``settings``, it will return the dialect of the provided ``EUI`` object.\n\nThe ``format_mac`` function takes an ``EUI`` instance and a dialect class (``netaddr.mac_eui48`` or a \nsubclass) as its arguments. The dialect class may be specified as a string in the same manner as \n``settings.MACADDRESS_DEFAULT_DIALECT``::\n\n >>> from netaddr import EUI, mac_bare\n >>> from macaddress import format_mac\n\n >>> mac = EUI('00:12:3c:37:64:8f')\n >>> format_mac(mac, mac_bare)\n '00123C37648F'\n >>> format_mac(mac, 'netaddr.mac_cisco')\n '0012.3c37.648f'\n\nMACAddressField (ModelField)\n----------------------------\nThis is an example model using MACAddressField::\n\n from macaddress.fields import MACAddressField\n\n class Computer(models.Model):\n name = models.CharField(max_length=32)\n eth0 = MACAddressField(null=True, blank=True)\n ...\n\nThe default behavior is to store the MAC Address in the database is a BigInteger. \nIf you would, rather, store the value as a string (to, for instance, facilitate \nsub-string searches), you can specify ``integer=False`` and the value will be stored\nas a string::\n\n class Computer(models.Model):\n name = models.CharField(max_length=32)\n eth0 = MACAddressField(blank=True, integer=False)\n ...\n\nIf you want to set ``unique=True`` on a MACAddressField that is stored as a string, you will need \nto set ``null=True`` and create custom ``clean_`` methods on your ``forms.ModelForm`` class for \neach MACAddressField that return ``None`` when the value provided is an ``''`` (empty string)::\n\n from .models import Computer\n\n class ComputerForm(forms.ModelForm):\n class Meta:\n model = Computer\n\n def clean_eth0(self):\n return self.cleaned_data['eth0'] or None\n\nYou should avoid changing the value of ``integer`` after running ``managy.py syncdb``, \nunless you are using a schema migration solution like South or Django's built-in migrations.\n\n\nTo Do\n*****\n\n+ Add greater support for partial string queries when storing MACs as strings in the database.\n+ Add custom validator to check for duplicate MACs when mixing string and integer storage types.\n+ Add deprecation warning and timeline for changeover to default string storage.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/tubaman/django-macaddress", "keywords": "", "license": "BSD", "maintainer": "Arun Karunagath", "maintainer_email": "the1.arun@gmail.com", "name": "django-macaddress", "package_url": "https://pypi.org/project/django-macaddress/", "platform": "", "project_url": "https://pypi.org/project/django-macaddress/", "project_urls": { "Homepage": "http://github.com/tubaman/django-macaddress" }, "release_url": "https://pypi.org/project/django-macaddress/1.6.0/", "requires_dist": [ "netaddr" ], "requires_python": "", "summary": "MAC address model and form fields for Django apps.", "version": "1.6.0" }, "last_serial": 5369474, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "013746e5ff42090872efda16b1257a82", "sha256": "69df9ec82112c90b94b5c72e661c777679d8ddf2c32ea13ec9ce2c1834ab5929" }, "downloads": -1, "filename": "django-macaddress-1.0.0.tar.gz", "has_sig": false, "md5_digest": "013746e5ff42090872efda16b1257a82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3246, "upload_time": "2012-01-20T06:06:21", "url": "https://files.pythonhosted.org/packages/fc/fd/9d9bb58446daa06b814fa374d23350a2ec9c3d0923e06c266477a8e795dc/django-macaddress-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "7bb273f8727e1cdc063e81d56d31a502", "sha256": "8ad487b7fcf3a775322f58ae0379e383930d8bbda1992fea66960172f0bba783" }, "downloads": -1, "filename": "django-macaddress-1.0.1.tar.gz", "has_sig": false, "md5_digest": "7bb273f8727e1cdc063e81d56d31a502", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3209, "upload_time": "2012-12-04T00:27:35", "url": "https://files.pythonhosted.org/packages/42/b6/2cfe76cad3239099f6c69ea7a7b8467e6d27af3b666379ff73eb1531c9af/django-macaddress-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "a4e8437ef2a80398e9d8b0bcd95a2cf7", "sha256": "d1be55b49da97bc4a4a83534125a569026b3073f37af0a7485c32627e9d27c51" }, "downloads": -1, "filename": "django-macaddress-1.1.0.tar.gz", "has_sig": false, "md5_digest": "a4e8437ef2a80398e9d8b0bcd95a2cf7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3377, "upload_time": "2014-06-20T20:40:07", "url": "https://files.pythonhosted.org/packages/9d/85/b0e899dce91c305374723ac724a3e45551d8ed7bcbfcbaed8e4153b18693/django-macaddress-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "3fc4510751ece85e808283b43055ee7b", "sha256": "41732c1519a2efa2e133935511782fdbb91f2643c717d914396cf1bfbc14b903" }, "downloads": -1, "filename": "django-macaddress-1.2.0.tar.gz", "has_sig": false, "md5_digest": "3fc4510751ece85e808283b43055ee7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3806, "upload_time": "2014-06-21T07:58:35", "url": "https://files.pythonhosted.org/packages/92/ee/234cc5981cf7ddddc4af3870e3795723168d74d211e1300dbad220d838bd/django-macaddress-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "2ec1d3acc84c56ee29b1108178aefe04", "sha256": "2f298cf9bcad0b13bcc7fc4fbc4a245311287333f8f40448e4b527558098fd63" }, "downloads": -1, "filename": "django-macaddress-1.2.1.tar.gz", "has_sig": false, "md5_digest": "2ec1d3acc84c56ee29b1108178aefe04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3877, "upload_time": "2014-06-29T09:53:18", "url": "https://files.pythonhosted.org/packages/52/93/5a057c56bafa0579247467d2be3663fdcb282f977c0773795904c461cdcc/django-macaddress-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "3fbdb98869455b0f0852cb28523bbcf6", "sha256": "e5a57caa585b3e16c56e1d45198935294cf6b1856b61f08010a38bdce2b4a4c5" }, "downloads": -1, "filename": "django-macaddress-1.2.2.tar.gz", "has_sig": false, "md5_digest": "3fbdb98869455b0f0852cb28523bbcf6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3877, "upload_time": "2014-06-30T12:51:25", "url": "https://files.pythonhosted.org/packages/42/15/ad0ab7377094be3f54e759aa80d8df617fc5984385a3d01696e8c8446fbf/django-macaddress-1.2.2.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "95dca10caa3cce9d91800d14bfc90ed5", "sha256": "4c836288620f8bcdead2a2bc28890e0db266418f6d7300a5a3dad062d6aa8b3d" }, "downloads": -1, "filename": "django-macaddress-1.3.0.tar.gz", "has_sig": false, "md5_digest": "95dca10caa3cce9d91800d14bfc90ed5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6200, "upload_time": "2014-07-13T17:05:30", "url": "https://files.pythonhosted.org/packages/55/50/91ab3f03c1df0b427f4b33a5673e20c3281d2844a85a6f3be1fa410b72c1/django-macaddress-1.3.0.tar.gz" } ], "1.3.2": [ { "comment_text": "", "digests": { "md5": "d0f4bd508e134347b53d50e62aa22b3a", "sha256": "c36dc7edfc0ad03d82f5e449bf0209bafef9892a04c2cb82a21bbec622a7f3c7" }, "downloads": -1, "filename": "django_macaddress-1.3.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d0f4bd508e134347b53d50e62aa22b3a", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 9350, "upload_time": "2015-08-18T09:58:32", "url": "https://files.pythonhosted.org/packages/d5/29/7a2c0b484d8fdcdfe956b42de442007514550755945060b94e61668ab028/django_macaddress-1.3.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3e89435298c409ff24e193362b340214", "sha256": "614d1637bfa4b7c026ebe3711691086a4a3615e5ca6c0007622f28f8f9650f48" }, "downloads": -1, "filename": "django-macaddress-1.3.2.tar.gz", "has_sig": false, "md5_digest": "3e89435298c409ff24e193362b340214", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6523, "upload_time": "2015-08-18T09:58:27", "url": "https://files.pythonhosted.org/packages/1b/d8/227c27fc9378e9658bf836dd8850a591b28ce19d380cd0b385455881958a/django-macaddress-1.3.2.tar.gz" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "0ed701bf2e37ed076d6f80a5df120349", "sha256": "934df682d4f739c569af8549135709084c3a19e6b2def42f85de9ff4c689baed" }, "downloads": -1, "filename": "django_macaddress-1.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0ed701bf2e37ed076d6f80a5df120349", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 9972, "upload_time": "2016-07-08T16:31:29", "url": "https://files.pythonhosted.org/packages/3b/db/be29a1ae63661b656ba133e4a173b042642f2b9a647b806f4b365cec3f15/django_macaddress-1.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5d1437c8cabfe12922c2d6c3e366d00e", "sha256": "e3a6690cd33721a995685c0044d62475eee4c073336fe0a6607c1d993c0f08c7" }, "downloads": -1, "filename": "django-macaddress-1.4.0.tar.gz", "has_sig": false, "md5_digest": "5d1437c8cabfe12922c2d6c3e366d00e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6881, "upload_time": "2016-07-08T16:31:22", "url": "https://files.pythonhosted.org/packages/31/1d/5de25827198a97010e6e433f2aa23faac90e13ae9a858180132ac0332c6b/django-macaddress-1.4.0.tar.gz" } ], "1.4.1": [ { "comment_text": "", "digests": { "md5": "543905a4e0c250ff50638aa5b446b70a", "sha256": "9a56eed6d103654935fbb5e118e3e1b1461f1bed87f9b2a995656c39c5024cb7" }, "downloads": -1, "filename": "django_macaddress-1.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "543905a4e0c250ff50638aa5b446b70a", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 9976, "upload_time": "2017-04-18T11:09:17", "url": "https://files.pythonhosted.org/packages/85/3b/075ceee5f51a53d8bea8c7603f2d6cc381c914790a906f7518a9cd7117f4/django_macaddress-1.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fcefffa7071fce33a294ac56f8255b2a", "sha256": "be4530043cd05fda5116db2199cd1fbf27389d410e2260a7c39049ab9ac178ff" }, "downloads": -1, "filename": "django-macaddress-1.4.1.tar.gz", "has_sig": false, "md5_digest": "fcefffa7071fce33a294ac56f8255b2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6862, "upload_time": "2017-04-18T11:09:14", "url": "https://files.pythonhosted.org/packages/1a/53/bdd0a36cb690592a83cd89907f2dd85e56126198ea9f00f3164f95d12f6c/django-macaddress-1.4.1.tar.gz" } ], "1.5.0": [ { "comment_text": "", "digests": { "md5": "aa48ff3a2b264823aa6eb5286d0fd2fa", "sha256": "bc2006629a0b81b34e99b45e21bb9cd8551f00dd783b3b1c766677450e9fa3c9" }, "downloads": -1, "filename": "django_macaddress-1.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "aa48ff3a2b264823aa6eb5286d0fd2fa", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10124, "upload_time": "2018-03-31T23:15:50", "url": "https://files.pythonhosted.org/packages/f7/c0/dd0576c115d9733b569a733e71c27d14f6da5ddbc6ba8f60c491d5bc3008/django_macaddress-1.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8f03855c338b3ae174049588d36b1825", "sha256": "21a08619ba9af8cb3eb684a7430a63d63b7634b71c5830da0548f452cc78e3a1" }, "downloads": -1, "filename": "django-macaddress-1.5.0.tar.gz", "has_sig": false, "md5_digest": "8f03855c338b3ae174049588d36b1825", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7417, "upload_time": "2018-03-31T23:15:51", "url": "https://files.pythonhosted.org/packages/57/f9/1957bdca7aa9c63d3af32b6d69b2c1f9cf6cd58789eace14c98117add1b5/django-macaddress-1.5.0.tar.gz" } ], "1.6.0": [ { "comment_text": "", "digests": { "md5": "0eef6a3df77ba09c29fc0ae36255bca2", "sha256": "078bc7c9c04c35411378e86422a387d9fa6e728311e65bfd372aab3c4879ce3a" }, "downloads": -1, "filename": "django_macaddress-1.6.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0eef6a3df77ba09c29fc0ae36255bca2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10082, "upload_time": "2019-06-06T23:09:31", "url": "https://files.pythonhosted.org/packages/4a/42/129e3b805cea03af89100bd0d715823f81c327015cf79ee9f3917dbd0893/django_macaddress-1.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c989b83aba4ba1e60a455a241515ad4d", "sha256": "0ca677ff8df7011bfa6534b2bb779097865a68db699d70125f3336639fbfecd6" }, "downloads": -1, "filename": "django-macaddress-1.6.0.tar.gz", "has_sig": false, "md5_digest": "c989b83aba4ba1e60a455a241515ad4d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7374, "upload_time": "2019-06-06T23:09:33", "url": "https://files.pythonhosted.org/packages/39/20/ab029cf61736ff501a18ae5ba7448a9b228888ba8c05ec8c3df458619290/django-macaddress-1.6.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0eef6a3df77ba09c29fc0ae36255bca2", "sha256": "078bc7c9c04c35411378e86422a387d9fa6e728311e65bfd372aab3c4879ce3a" }, "downloads": -1, "filename": "django_macaddress-1.6.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0eef6a3df77ba09c29fc0ae36255bca2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10082, "upload_time": "2019-06-06T23:09:31", "url": "https://files.pythonhosted.org/packages/4a/42/129e3b805cea03af89100bd0d715823f81c327015cf79ee9f3917dbd0893/django_macaddress-1.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c989b83aba4ba1e60a455a241515ad4d", "sha256": "0ca677ff8df7011bfa6534b2bb779097865a68db699d70125f3336639fbfecd6" }, "downloads": -1, "filename": "django-macaddress-1.6.0.tar.gz", "has_sig": false, "md5_digest": "c989b83aba4ba1e60a455a241515ad4d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7374, "upload_time": "2019-06-06T23:09:33", "url": "https://files.pythonhosted.org/packages/39/20/ab029cf61736ff501a18ae5ba7448a9b228888ba8c05ec8c3df458619290/django-macaddress-1.6.0.tar.gz" } ] }