{ "info": { "author": "Daniel Kaufhold", "author_email": "daniel.kaufhold@bitmazk.com", "bugtrack_url": null, "classifiers": [], "description": "Django Dated Values\n===================\n\nA reusable Django app that allows adding dated decimal values to any Django model.\n\nInstallation\n------------\n\nTo get the latest stable release from PyPi\n\n.. code-block:: bash\n\n pip install django-dated-values\n\nTo get the latest commit from GitHub\n\n.. code-block:: bash\n\n pip install -e git+git://github.com/bitmazk/django-dated-values.git#egg=dated_values\n\nTODO: Describe further installation steps (edit / remove the examples below):\n\nAdd ``dated_values`` to your ``INSTALLED_APPS``\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n ...,\n 'dated_values',\n )\n\nAdd the ``dated_values`` URLs to your ``urls.py``\n\n.. code-block:: python\n\n urlpatterns = patterns('',\n ...\n url(r'^dated-values/', include('dated_values.urls')),\n )\n\nDon't forget to migrate your database\n\n.. code-block:: bash\n\n ./manage.py migrate dated_values\n\n\nAdd css or write your own custom styles.\n\n.. code-block:: html\n\n {% load static %}\n \n\nUsage\n-----\n\nThe usage is fairly straight forward. You need to add ``DatedValueType``\ninstances for every content type, that you want values to be added to.\n\nThe ``decimal_places`` field allows you to lower the amount of decimal places\nfor form validation. It defaults to 2 and its max is 8.\n\n.. note:: Using postgres, it stores the full range of decimal places, no matter\n if you input less.\n\nIf you set ``hidden`` to ``True`` using the default template automatically\nhides the values in the form. You can e.g. use it to log values in the\nbackground without them being visible for users.\n\nIf you just set ``editable`` to ``True`` using the default template will\nrender only the values and no input fields.\n\nOnce you've set that up and visit the management view, you will see a form\ntable which holds all the values from all defined types for that item.\nThe url kwargs require ``ctype_id`` and ``object_id``. An example\nimplementation might be:\n\n.. code-block:: python\n\n class MyModel(models.Model):\n\n ... # my fields and other things go here\n\n def get_management_url(self):\n \"\"\"Returns the management url from django-dated-values.\"\"\"\n ctype = ContentType.objects.get_for_model(self.__class__)\n return reverse('dated_values_management_view', kwargs={\n 'ctype_id': ctype.id, 'object_id': self.id})\n\n\nSettings\n--------\n\nThe ``DATED_VALUES_ACCESS_ALLOWED`` setting expects a function, that takes the\nuser and the content object as arguments. It is required to define the access\npermission for the values management view. Default is as follows:\n\n.. code-block:: python\n\n DATED_VALUES_ACCESS_ALLOWED = lambda user, obj=None: user.is_staff\n\n.. note:: superusers will always be able to open the view, regardless of what\n is set here.\n\nYou can change the lenght of displayed items, defaulting to 14 (2 weeks) by\nsetting ``DATED_VALUES_DISPLAYED_ITEMS``:\n\n.. code-block:: python\n\n # this will only show 1 week\n DATED_VALUES_DISPLAYED_ITEMS = 7\n\n\nContribute\n----------\n\nIf you want to contribute to this project, please perform the following steps\n\n.. code-block:: bash\n\n # Fork this repository\n # Clone your fork\n mkvirtualenv -p python2.7 django-dated-values\n make develop\n\n git co -b feature_branch master\n # Implement your feature and tests\n git add . && git commit\n git push -u origin feature_branch\n # Send us a pull request for your feature branch", "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/bitmazk/django-dated-values", "keywords": "django,app,reusable,dates,management,values,generic", "license": "The MIT License", "maintainer": null, "maintainer_email": null, "name": "django-dated-values", "package_url": "https://pypi.org/project/django-dated-values/", "platform": "OS Independent", "project_url": "https://pypi.org/project/django-dated-values/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/bitmazk/django-dated-values" }, "release_url": "https://pypi.org/project/django-dated-values/0.2/", "requires_dist": null, "requires_python": null, "summary": "A reusable Django app that allows adding dated decimal values to any Django model", "version": "0.2" }, "last_serial": 970742, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "878e2b26590de3bb63892915a570bc81", "sha256": "3ddb606c056daeb77c11abfa3f70416f3c632374ac08446a5a1633f0b8e2459f" }, "downloads": -1, "filename": "django-dated-values-0.1.tar.gz", "has_sig": false, "md5_digest": "878e2b26590de3bb63892915a570bc81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13720, "upload_time": "2013-12-16T16:56:29", "url": "https://files.pythonhosted.org/packages/78/6a/7201644f4d694d50cd6aa85538c4f8fbce8de157ac0dc8ec8beb6e75fc98/django-dated-values-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "cb2f7b8371d65cdfe46dbf86ffec9eda", "sha256": "cff4e25f1844b73839521d2a7fdb44dd1b8e77e263acafe27b563b7116ce3347" }, "downloads": -1, "filename": "django-dated-values-0.2.tar.gz", "has_sig": false, "md5_digest": "cb2f7b8371d65cdfe46dbf86ffec9eda", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16429, "upload_time": "2014-01-16T11:03:27", "url": "https://files.pythonhosted.org/packages/1f/09/550e28afcc59159e2a6ea3de06107feec5ab509069203248e3fde9b86b0e/django-dated-values-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cb2f7b8371d65cdfe46dbf86ffec9eda", "sha256": "cff4e25f1844b73839521d2a7fdb44dd1b8e77e263acafe27b563b7116ce3347" }, "downloads": -1, "filename": "django-dated-values-0.2.tar.gz", "has_sig": false, "md5_digest": "cb2f7b8371d65cdfe46dbf86ffec9eda", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16429, "upload_time": "2014-01-16T11:03:27", "url": "https://files.pythonhosted.org/packages/1f/09/550e28afcc59159e2a6ea3de06107feec5ab509069203248e3fde9b86b0e/django-dated-values-0.2.tar.gz" } ] }