{ "info": { "author": "Matthys Kroon", "author_email": "matthysk@clearspark.co.za", "bugtrack_url": null, "classifiers": [], "description": "django-monthfield\n=================\n\nIntroduction\n------------\n\nThis module provides a custom field for storing month (YYYY-MM) as a django field.\n\nThis can be useful when dealing with data that relates to a whole month, for example,\nthe total expenditure for a given month.\n\nThis module also adds some arithmetic and other functionality for dealing with months.\n\nUsage\n-----\n\nAdding a month field to a django model:\n\n.. code-block:: console\n\n from django.db import models\n from month.models import MonthField\n\n\n # Create your models here.\n\n class ExampleModel(models.Model):\n name = models.CharField(max_length=20, blank=True)\n month = MonthField(\"Month Value\", help_text=\"some help...\")\n\n def __unicode__(self):\n return unicode(self.month)\n\nThe module defines a \"Month\" class which is used to represent the MonthField attribute on the model.\nThe \"Month\" class can also be used standalone without any django model.\n\nSome examples of funcionality provided by the Month class:\n\n.. code-block:: console\n\n import month\n\n m = month.Month(2017, 3)\n\n print(m)\n >\"2017-03\"\n\n print(m + 2)\n >\"2017-05\"\n\n print(m.last_day())\n >\"2017-03-31\"\n\n m2 = month.Month(2017, 7)\n\n print(m > m2)\n >\"False\"\n\n print(m.range(m2))\n >\"[2017-03, 2017-04, 2017-05, 2017-06, 2017-07]\"\n\nExample project\n---------------\n\nAn example website using this module is included in the repository.\n\nusername: test\npassword: test\n\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/clearspark/django-monthfield", "keywords": "", "license": "BSD licence, see LICENCE", "maintainer": "", "maintainer_email": "", "name": "django-monthfield", "package_url": "https://pypi.org/project/django-monthfield/", "platform": "", "project_url": "https://pypi.org/project/django-monthfield/", "project_urls": { "Homepage": "https://github.com/clearspark/django-monthfield" }, "release_url": "https://pypi.org/project/django-monthfield/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Provides a field for storing months (YYYY-MM) on django models.", "version": "0.1.2" }, "last_serial": 5693989, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "143553eb01e6526aea994ea33a699360", "sha256": "981031ade748fa9a6fc5b1ded60b4a95c02af7a50ddbb69b734a564deb14683b" }, "downloads": -1, "filename": "django_monthfield-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "143553eb01e6526aea994ea33a699360", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9093, "upload_time": "2018-03-16T17:00:15", "url": "https://files.pythonhosted.org/packages/fd/fd/a39011ab5eaa39f0c529ebf0373c1ee52b00a266ac940d376eca3fa0f05c/django_monthfield-0.1.1-py2.py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "6399806cafc3073270bf2e057e76a186", "sha256": "e259aaaac8e6f711907a6ff8d3e0f338c188408260f612d766e16719e2032403" }, "downloads": -1, "filename": "django_monthfield-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6399806cafc3073270bf2e057e76a186", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8637, "upload_time": "2019-08-18T09:30:39", "url": "https://files.pythonhosted.org/packages/f0/04/ed64dae2a3a5aac9da2dddf3f3cac407d9a91423dc48aa7f431d98ff8df8/django_monthfield-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "69ef4ac71f95634153bc3c148326bff2", "sha256": "88782fe49abf25982346dbada65e4ad588b810f1569a3e9bc771ebbdfce03006" }, "downloads": -1, "filename": "django-monthfield-0.1.2.tar.gz", "has_sig": false, "md5_digest": "69ef4ac71f95634153bc3c148326bff2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6449, "upload_time": "2019-08-18T09:30:41", "url": "https://files.pythonhosted.org/packages/02/a2/1355c7027e9d90cd8b416b69426820ba6009fc72b650764aa66371efb431/django-monthfield-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6399806cafc3073270bf2e057e76a186", "sha256": "e259aaaac8e6f711907a6ff8d3e0f338c188408260f612d766e16719e2032403" }, "downloads": -1, "filename": "django_monthfield-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6399806cafc3073270bf2e057e76a186", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8637, "upload_time": "2019-08-18T09:30:39", "url": "https://files.pythonhosted.org/packages/f0/04/ed64dae2a3a5aac9da2dddf3f3cac407d9a91423dc48aa7f431d98ff8df8/django_monthfield-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "69ef4ac71f95634153bc3c148326bff2", "sha256": "88782fe49abf25982346dbada65e4ad588b810f1569a3e9bc771ebbdfce03006" }, "downloads": -1, "filename": "django-monthfield-0.1.2.tar.gz", "has_sig": false, "md5_digest": "69ef4ac71f95634153bc3c148326bff2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6449, "upload_time": "2019-08-18T09:30:41", "url": "https://files.pythonhosted.org/packages/02/a2/1355c7027e9d90cd8b416b69426820ba6009fc72b650764aa66371efb431/django-monthfield-0.1.2.tar.gz" } ] }