{ "info": { "author": "Erik van Widenfelt", "author_email": "ew2789@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "|pypi| |travis| |coverage|\n\nedc-form-label\n-------------\nCustomize Django's form label in realtime\n\nFor a sequence of data collection timepoints, we ask the question, \"Are you circumcised?\". At some time point we hope the response will be `YES`, but until then, we need to ask \"Since we last saw you, were you circumcised?\". It is a lot better if we can ask, \"Since we last saw you in 'October 2018', were you circumcised?\", where 'October 2018' represents the timepoint from which we got our last reponse.\n\nThis module shows how you can insert 'October 2018' into the ModelAdmin/ModelForm the form label in realtime.\n\n\nFor example:\n\nFor a sequence of data collection timepoints, we ask the question, \"Are you circumcised\". At some point we hope the response will be YES. But until then we need to ask \"Since we last saw you in October 2018, were you circumcised?\", etc.\n\n.. code-block:: python\n\n\tfrom edc_form_label import FormLabel, CustomFormLabel, FormLabelModelAdminMixin\n\n\n\tclass MyCustomLabelCondition(CustomLabelCondition):\n\t def check(self, **kwargs):\n\t if self.previous_obj.circumcised == NO:\n\t return True\n\t return False\n\n\n\t@register(MyModel)\n\tclass MyModelAdmin(FormLabelModelAdminMixin admin.ModelAdmin):\n\n\t fieldsets = (\n\t (None, {\n\t 'fields': (\n\t 'subject_visit',\n\t 'report_datetime',\n\t 'circumcised')},\n\t ),\n\t )\n\n\t custom_form_labels = [\n\t FormLabel(\n\t field='circumcised',\n\t custom_label='Since we last saw you in {previous_visit}, were you circumcised?',\n\t condition_cls=MyCustomLabelCondition)\n\t ]\n\n\n\n.. |pypi| image:: https://img.shields.io/pypi/v/edc-form-label.svg\n :target: https://pypi.python.org/pypi/edc-form-label\n\n.. |travis| image:: https://travis-ci.com/clinicedc/edc-form-label.svg?branch=develop\n :target: https://travis-ci.com/clinicedc/edc-form-label\n\n.. |coverage| image:: https://coveralls.io/repos/github/clinicedc/edc-form-label/badge.svg?branch=develop\n :target: https://coveralls.io/github/clinicedc/edc-form-label?branch=develop\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/clinicedc/edc-form-label", "keywords": "django edc form", "license": "GPL license, see LICENSE", "maintainer": "", "maintainer_email": "", "name": "edc-form-label", "package_url": "https://pypi.org/project/edc-form-label/", "platform": "", "project_url": "https://pypi.org/project/edc-form-label/", "project_urls": { "Homepage": "http://github.com/clinicedc/edc-form-label" }, "release_url": "https://pypi.org/project/edc-form-label/0.1.3/", "requires_dist": [ "Django" ], "requires_python": "", "summary": "Customize Django's form label in realtime", "version": "0.1.3" }, "last_serial": 4903384, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "80176ebb9b8db32f0bc4314b3814cf24", "sha256": "b76bf2219df6e724226974ae61484f55485bf89b2009e51a056284466d27f17c" }, "downloads": -1, "filename": "edc-form-label-0.1.0.macosx-10.13-x86_64.tar.gz", "has_sig": false, "md5_digest": "80176ebb9b8db32f0bc4314b3814cf24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14195, "upload_time": "2018-10-27T20:31:00", "url": "https://files.pythonhosted.org/packages/49/3b/b7378f7374489e9fc1936bb447727fdb1fe947341cbe85f24cf70a654acb/edc-form-label-0.1.0.macosx-10.13-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "41780777cd5370aee0563cb55af0d9cb", "sha256": "46df28ef3180700e2e94ee72d1b09824dcee0632198284c92a29ab9dd0ec2980" }, "downloads": -1, "filename": "edc_form_label-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "41780777cd5370aee0563cb55af0d9cb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10673, "upload_time": "2018-10-27T20:30:58", "url": "https://files.pythonhosted.org/packages/76/f8/cdfef7807780b2bfefefe66009fb5e9d6028441855e7966cb93762e63fcf/edc_form_label-0.1.0-py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "19f544eab6cc10cbbdb9e621a41be4bb", "sha256": "28e80f8fd6ee789ced960f1ef77757ba24dd76b3ffcc4bd5b16530921b8f71e6" }, "downloads": -1, "filename": "edc-form-label-0.1.1.macosx-10.13-x86_64.tar.gz", "has_sig": false, "md5_digest": "19f544eab6cc10cbbdb9e621a41be4bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14241, "upload_time": "2018-10-28T02:06:56", "url": "https://files.pythonhosted.org/packages/89/0c/be3a31a941708954cb167b45d6d2808d2a96e0d86e855daa09600c8f8290/edc-form-label-0.1.1.macosx-10.13-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "ebd06d20e9f402d6733453118017dfbd", "sha256": "b30396688dfede7f89931c1bf2e087e3a6d5f92fb690fb385d34624061903e4e" }, "downloads": -1, "filename": "edc_form_label-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ebd06d20e9f402d6733453118017dfbd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10711, "upload_time": "2018-10-28T02:06:55", "url": "https://files.pythonhosted.org/packages/da/44/e58a8232d85ac49ddcf4156c069d1f223ee099ec1a246294a4c7103ffe2e/edc_form_label-0.1.1-py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "5f197fc2f5c60cc6a45a5e2073470099", "sha256": "56983130b0a71fb98c2a660cb86ffc65666ba54b8be3c9174bab30c6b54da4a6" }, "downloads": -1, "filename": "edc-form-label-0.1.2.macosx-10.13-x86_64.tar.gz", "has_sig": false, "md5_digest": "5f197fc2f5c60cc6a45a5e2073470099", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14441, "upload_time": "2018-12-07T20:10:43", "url": "https://files.pythonhosted.org/packages/04/55/9d395510a07b236b4aba8411da076b6fa0c334b5134c596c15124b7b698a/edc-form-label-0.1.2.macosx-10.13-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "76bd3ceab23b4b0ce4a3964708ac4178", "sha256": "6951fe330e3123d2b41c1893acff9ee82b7ff90cec184453e4571e7f32710af0" }, "downloads": -1, "filename": "edc_form_label-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "76bd3ceab23b4b0ce4a3964708ac4178", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10896, "upload_time": "2018-12-07T20:10:42", "url": "https://files.pythonhosted.org/packages/9e/3a/e4089752bb2fd87a202eb9241a07a15994d33b7649c0b744e53b8ccc36b4/edc_form_label-0.1.2-py3-none-any.whl" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "e3e4eb86784336f3a5423cf037df748c", "sha256": "c993e558cf83b3f28c8108cccb8cf79b6a3ddca2c3859bf8a27e27e8a2f48c04" }, "downloads": -1, "filename": "edc_form_label-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "e3e4eb86784336f3a5423cf037df748c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23205, "upload_time": "2019-03-06T04:18:02", "url": "https://files.pythonhosted.org/packages/f8/24/f3fd996ba47f1047ccad7799f9883fdc095499a70731ee1038849ef4d862/edc_form_label-0.1.3-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e3e4eb86784336f3a5423cf037df748c", "sha256": "c993e558cf83b3f28c8108cccb8cf79b6a3ddca2c3859bf8a27e27e8a2f48c04" }, "downloads": -1, "filename": "edc_form_label-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "e3e4eb86784336f3a5423cf037df748c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23205, "upload_time": "2019-03-06T04:18:02", "url": "https://files.pythonhosted.org/packages/f8/24/f3fd996ba47f1047ccad7799f9883fdc095499a70731ee1038849ef4d862/edc_form_label-0.1.3-py3-none-any.whl" } ] }