{ "info": { "author": "Tom Symonds", "author_email": "tdsymonds@hotmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "===============\r\nsingleton-admin\r\n===============\r\n\r\nUsing singleton-admin will allow users to only add one instance of a model via the django admin site. Once created, the instance can be updated and deleted, but additional instances cannot be created.\r\n\r\nThis is useful if you'd like to store a page content in the database for example.\r\n\r\nI found myself using this package (https://github.com/tttallis/django-singletons) a lot, but some of the code has now been depreciated through newer releases of Django.\r\n\r\nI originally had the intention of forking the package and making the fixes, but in the end I ended up re-writing from scratch. The end goal is the same, but with a different approach.\r\n\r\nI appreciate that there are probably plenty of packages out there that offer similar functionality, but as I've put this together and have used in my own projects, I thought I'd get it out there.\r\n\r\n\r\n\r\n\r\nQuick start\r\n-----------\r\n\r\n1. Install singleton-admin.\r\n\r\n2. Add \"singleton_admin\" to your INSTALLED_APPS::\r\n\r\n INSTALLED_APPS = [\r\n ...\r\n 'singleton_admin',\r\n ]\r\n\r\n3. In your apps admin.py file to make your model a singleton-admin you can either do::\r\n\r\n from singleton_admin.admin import SingletonAdmin\r\n\r\n admin.site.register(your_model, SingletonAdmin)\r\n\r\n\r\nOr if you'd like to add your own admin class::\r\n\r\n from singleton_admin.admin import SingletonAdmin\r\n\r\n class your_model_admin(SingletonAdmin):\r\n ...\r\n\r\n admin.site.register(your_model, your_model_admin)", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tdsymonds/singleton-admin", "keywords": "admin singleton", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "singleton-admin", "package_url": "https://pypi.org/project/singleton-admin/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/singleton-admin/", "project_urls": { "Homepage": "https://github.com/tdsymonds/singleton-admin" }, "release_url": "https://pypi.org/project/singleton-admin/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "A Django app that will only allow one instance of a model to be created via the admin site.", "version": "1.0.0" }, "last_serial": 2189157, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "e9ce6b545f7299a1331a29fcb68ce93f", "sha256": "72e97e9bf4927d7fce0bed041cd6b10156cffb62a7d334db34e576ed73cec28e" }, "downloads": -1, "filename": "singleton_admin-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "e9ce6b545f7299a1331a29fcb68ce93f", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4889, "upload_time": "2015-12-07T16:05:22", "url": "https://files.pythonhosted.org/packages/8f/9d/76d73d36b3dc53342bf8520e62560a139df5ecbb0b7c3667974e25ff0289/singleton_admin-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ddff2f8401135ddc393339fbcbb759ae", "sha256": "8700b0234e266c500b9fad8870177ec748a8f2347c07bca15b35a6caf271672a" }, "downloads": -1, "filename": "singleton_admin-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ddff2f8401135ddc393339fbcbb759ae", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4892, "upload_time": "2015-12-07T16:01:10", "url": "https://files.pythonhosted.org/packages/76/75/11cb847f14ee37ff96ea468a5856c1878636721944543e686ec2147eb415/singleton_admin-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f69997987661fa7eb0892afd58f69cc2", "sha256": "9e0b588a49509ad0ccdec5457faa7974369ecd6e74291cc6a43d150de6643374" }, "downloads": -1, "filename": "singleton-admin-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f69997987661fa7eb0892afd58f69cc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3677, "upload_time": "2015-12-07T16:05:18", "url": "https://files.pythonhosted.org/packages/14/cd/77d583f48cd680d74e7bd9885a75f8d3d1d2a34e39bd25da81b96400b51f/singleton-admin-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e9ce6b545f7299a1331a29fcb68ce93f", "sha256": "72e97e9bf4927d7fce0bed041cd6b10156cffb62a7d334db34e576ed73cec28e" }, "downloads": -1, "filename": "singleton_admin-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "e9ce6b545f7299a1331a29fcb68ce93f", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4889, "upload_time": "2015-12-07T16:05:22", "url": "https://files.pythonhosted.org/packages/8f/9d/76d73d36b3dc53342bf8520e62560a139df5ecbb0b7c3667974e25ff0289/singleton_admin-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ddff2f8401135ddc393339fbcbb759ae", "sha256": "8700b0234e266c500b9fad8870177ec748a8f2347c07bca15b35a6caf271672a" }, "downloads": -1, "filename": "singleton_admin-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ddff2f8401135ddc393339fbcbb759ae", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4892, "upload_time": "2015-12-07T16:01:10", "url": "https://files.pythonhosted.org/packages/76/75/11cb847f14ee37ff96ea468a5856c1878636721944543e686ec2147eb415/singleton_admin-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f69997987661fa7eb0892afd58f69cc2", "sha256": "9e0b588a49509ad0ccdec5457faa7974369ecd6e74291cc6a43d150de6643374" }, "downloads": -1, "filename": "singleton-admin-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f69997987661fa7eb0892afd58f69cc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3677, "upload_time": "2015-12-07T16:05:18", "url": "https://files.pythonhosted.org/packages/14/cd/77d583f48cd680d74e7bd9885a75f8d3d1d2a34e39bd25da81b96400b51f/singleton-admin-1.0.0.tar.gz" } ] }