{ "info": { "author": "Alireza Savand", "author_email": "alireza.savand@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Topic :: Software Development" ], "description": "==================\nDjango Base64Field\n==================\n\n.. image:: https://travis-ci.org/Alir3z4/django-base64field.png\n :alt: travis-cli tests status for django-base64field\n :target: https://travis-ci.org/Alir3z4/django-base64field\n\n.. contents:: Table of contents\n\nOverview\n--------\n\n- A motherfucking django model field to bring ``base64`` encoded key to models.\n- It uses ``base64`` from ``django.utils.baseconv`` for encoding.\n- Tested on Python2.7, Python3.3 .\n\nHow it works?\n--------------\n\n``Base64Field`` is useful where you need a base64 encoded value from\nmodel's Primary Key a.k.a PK which is available on every django\napplication model by default. Sine `base64` encoder works with\n`integer` value then PK should be also `integer`, Fortunately\nagain `PK` field is `integer` by nature.\n\nWhen a model gets saved, ``post_save`` signal will be emitted,\nThis is where a ``base64`` encoded key will be generated/encoded\nfrom model's ``PK``, Then model will gets **updated** not getting save again.\nthis operation happens just on the first time model gets saved.\nIn next time model gets saved or updated ``base64`` won't be generated.\n\nYou wanna know more about how ``django-base64field`` works? Then get da fuck\nout of ``README.rst`` and look inside the ``django_base64field.tests.py``.\n\nUsage\n-----\n\nHere is simple usage of ``Base64Field``\n::\n >>> from django.db import models\n >>> from django_base64field.fields import Base64Field\n >>>\n >>> class MyModelianto(models.Model):\n >>> ek = Base64Field()\n >>>\n >>> modelia = MyModelianto.objects.create(pk=314159265358979323)\n >>> modelia.ek\n >>> u''\n >>> refreshed_modelia = MyModelianto.objects.get(pk=modelia.pk)\n >>> refreshed_modelia.ek\n >>> u'HS7Y_sdg3x'\n\nAs You can see ``ek`` in not available on returned instance\nfrom ``MyModelianto.objects.create()``, It will be available after retrieving\n``refreshed_modelia`` from database which is same record as ``modelia`` here.\n\nThis behavior can be easily controlled with implementing a simple helper\nmethod on ``MyModelianto``. You can find out more about this solution on\n``django_base64field.tests.py``, Which it doesn't require to retrieving \nthe instance from database after first creation just for getting ``ek` field.\n\nInstallation\n------------\n``django-base64field`` is available on pypi\n\nhttp://pypi.python.org/pypi/django-base64field\n\nSo easily install it by ``pip``\n::\n\n $ pip install django-base64field\n\nOr by ``easy_install``\n::\n\n $ easy_install django-base64field\n\nAnother way is by cloning ``django-base64field``'s\n`git repo `_ ::\n\n $ git clone git://github.com/Alir3z4/django-base64field.git\n\nThen install it by running\n::\n\n $ python setup.py install\n\nOr I don't know, Install it directly from git.\n::\n\n pip install git+https://github.com/Alir3z4/django-base64field.git#egg=django-base64field\n\n\nSome pkgs have no installation method, This is awefuckingsome that\n``django-base64field`` gives you many ways for installation.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Alir3z4/django-base64field", "keywords": "django,base64,field", "license": "Copyright (c) 2013 Alireza Savand\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n * Neither the name of the authors nor the\n names of its contributors may be used to endorse or promote products\n derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", "maintainer": null, "maintainer_email": null, "name": "django-base64field", "package_url": "https://pypi.org/project/django-base64field/", "platform": "OS Independent", "project_url": "https://pypi.org/project/django-base64field/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Alir3z4/django-base64field" }, "release_url": "https://pypi.org/project/django-base64field/1.0/", "requires_dist": null, "requires_python": null, "summary": "A motherfucking django model field to bring base64 encoded key to models.", "version": "1.0" }, "last_serial": 789166, "releases": { "0.9": [ { "comment_text": "", "digests": { "md5": "34c05cd57da4730b7752b9a3e1406770", "sha256": "79de861a9e142c96f39fca7e8354b49958e14f65fdf30917ba32fd0c35ac557f" }, "downloads": -1, "filename": "django-base64field-0.9.tar.gz", "has_sig": false, "md5_digest": "34c05cd57da4730b7752b9a3e1406770", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5549, "upload_time": "2013-03-26T17:54:14", "url": "https://files.pythonhosted.org/packages/22/8f/6be36aee32587652c156aa2efa96167b1187c90c3211de1855212ada4935/django-base64field-0.9.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "967ded849e81ce29cf0a6d47cdfd0a30", "sha256": "8fa8653ba1ce6d8fefe9a05e5687b8d4f5a8da0b4ebf9ce1fd6c4a75c3a832f4" }, "downloads": -1, "filename": "django-base64field-1.0.tar.gz", "has_sig": false, "md5_digest": "967ded849e81ce29cf0a6d47cdfd0a30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4607, "upload_time": "2013-06-03T00:31:50", "url": "https://files.pythonhosted.org/packages/b6/8f/7adf9e66946221395609ec50ce28604277b4ac52b2298f20e823f22f1fc4/django-base64field-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "967ded849e81ce29cf0a6d47cdfd0a30", "sha256": "8fa8653ba1ce6d8fefe9a05e5687b8d4f5a8da0b4ebf9ce1fd6c4a75c3a832f4" }, "downloads": -1, "filename": "django-base64field-1.0.tar.gz", "has_sig": false, "md5_digest": "967ded849e81ce29cf0a6d47cdfd0a30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4607, "upload_time": "2013-06-03T00:31:50", "url": "https://files.pythonhosted.org/packages/b6/8f/7adf9e66946221395609ec50ce28604277b4ac52b2298f20e823f22f1fc4/django-base64field-1.0.tar.gz" } ] }