{ "info": { "author": "Artur Barseghyan", "author_email": "artur.barseghyan@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "============\ndjango-ormex\n============\nDjango ORM extensions.\n\nPrerequisites\n=============\n- Django 1.8, 1.9, 1.10, 1.11\n- Python 2.7, 3.4, 3.5, 3.6\n\nInstallation\n============\n(1) Install in your virtual environment.\n\n Latest stable version from PyPI:\n\n .. code-block:: sh\n\n pip install django-ormex\n\n Latest stable version from GitHub:\n\n .. code-block:: sh\n\n pip install https://github.com/barseghyanartur/django-ormex/archive/stable.tar.gz\n\nUsage\n=====\nCommon usage examples.\n\nAggregations\n------------\nContains various modules for aggregations.\n\nGroupConcat\n~~~~~~~~~~~\nWorks like Concat, but for concatenating field values of related ManyToMany\nmodel. For instance, you may use it if you have an ``Author`` model as\nManyToMany relation in the ``Book`` model\n(``Book.authors = ManyToManyField(Author)``) and you want to have concatenated\nlist of all authors coupled to a given book.\n\nGiven the following models:\n\n.. code-block:: python\n\n class Publisher(models.Model):\n \"\"\"Publisher.\"\"\"\n\n name = models.CharField(max_length=30)\n address = models.CharField(max_length=50)\n city = models.CharField(max_length=60)\n state_province = models.CharField(max_length=30)\n country = models.CharField(max_length=50)\n website = models.URLField()\n\n\n class Author(models.Model):\n \"\"\"Author.\"\"\"\n\n salutation = models.CharField(max_length=10)\n name = models.CharField(max_length=200)\n email = models.EmailField()\n headshot = models.ImageField(upload_to='authors', null=True, blank=True)\n\n\n class Book(models.Model):\n \"\"\"Book.\"\"\"\n\n title = models.CharField(max_length=100)\n authors = models.ManyToManyField('books.Author', related_name='books')\n publisher = models.ForeignKey(Publisher, related_name='books')\n publication_date = models.DateField()\n isbn = models.CharField(max_length=100, unique=True)\n price = models.DecimalField(max_digits=10, decimal_places=2)\n pages = models.PositiveIntegerField(default=200)\n stock_count = models.PositiveIntegerField(default=30)\n\nWe could use GroupConcat as follows:\n\n.. code-block:: python\n\n from ormex.aggregations import GroupConcat\n\n book = Book.objects.all() \\\n .values('id',\n 'title',\n 'pages',\n 'price',\n 'publisher__id',\n 'publisher__name') \\\n .annotate(\n authors__name=GroupConcat('authors__name', separator=', ')\n ) \\\n .first()\n\nOutput would look as follows:\n\n.. code-block:: python\n\n {\n 'authors__name': 'Finn Janssen, Dan Dijkman, Merel Wolf, Evy de Jong',\n 'id': 14,\n 'pages': 83,\n 'price': Decimal('62.13'),\n 'publisher__id': 19,\n 'publisher__name': 'Rijn, de Bruyn and Verharen',\n 'title': 'Laboriosam officia temporibus facere omnis odit.'\n }\n\nDemo\n====\nRun demo locally\n----------------\nIn order to be able to quickly evaluate the `django-ormex`, a demo\napp (with a quick installer) has been created (works on Ubuntu/Debian, may\nwork on other Linux systems as well, although not guaranteed). Follow the\ninstructions below to have the demo running within a minute.\n\nGrab the latest ``ormex_demo_installer.sh``:\n\n.. code-block:: sh\n\n wget -O - https://raw.github.com/barseghyanartur/django-ormex/stable/examples/ormex_demo_installer.sh | bash\n\nOpen your browser and test the app.\n\n- URL: http://127.0.0.1:8001/\n\nIf quick installer doesn't work for you, see the manual steps on running the\n`example project\n`_.\n\nTesting\n=======\nSimply type:\n\n.. code-block:: sh\n\n ./runtests.py\n\nor use tox:\n\n.. code-block:: sh\n\n tox\n\nor use tox to check specific env:\n\n.. code-block:: sh\n\n tox -e py35\n\nor run Django tests:\n\n.. code-block:: sh\n\n ./manage.py test ormex --settings=settings.testing\n\nLicense\n=======\nGPL 2.0/LGPL 2.1\n\nSupport\n=======\nFor any issues contact me at the e-mail given in the `Author`_ section.\n\nAuthor\n======\nArtur Barseghyan \n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/barseghyanartur/django-ormex/", "keywords": "django", "license": "GPL 2.0/LGPL 2.1", "maintainer": "", "maintainer_email": "", "name": "django-ormex", "package_url": "https://pypi.org/project/django-ormex/", "platform": "", "project_url": "https://pypi.org/project/django-ormex/", "project_urls": { "Homepage": "https://github.com/barseghyanartur/django-ormex/" }, "release_url": "https://pypi.org/project/django-ormex/0.2/", "requires_dist": null, "requires_python": "", "summary": "Django ORM extensions", "version": "0.2" }, "last_serial": 3472146, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d385dd56efa2b437cea91f759f3d527b", "sha256": "c391cb849c0c4254174a80bba00e69fe361d7a17bf6db32c3afb748104f2429c" }, "downloads": -1, "filename": "django_ormex-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d385dd56efa2b437cea91f759f3d527b", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 9123406, "upload_time": "2017-05-18T00:23:18", "url": "https://files.pythonhosted.org/packages/8d/d4/dc8654e54e96e2d36a87e4112b3ab43d20c17822fbc166ca3e0f279c0f30/django_ormex-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "55e13d1a6bc1a5245d80e82470d823f4", "sha256": "bbe0e0e8d8e7f9429d9807fc294f5767f1820fcb719877895c58565e6e6ebaeb" }, "downloads": -1, "filename": "django-ormex-0.1.tar.gz", "has_sig": false, "md5_digest": "55e13d1a6bc1a5245d80e82470d823f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9135243, "upload_time": "2017-05-18T00:23:05", "url": "https://files.pythonhosted.org/packages/68/42/12dc594fb30b02a937de4b079f17c3d4f24fb087c32fc491338ea2391fb4/django-ormex-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c1b25492b45823d320c8e859b42699f6", "sha256": "b7dae848c081b2c7eea51d765437d9072ee25b3d868da0513cfd8d17ea2f6a95" }, "downloads": -1, "filename": "django_ormex-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c1b25492b45823d320c8e859b42699f6", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 11494, "upload_time": "2017-05-18T21:46:33", "url": "https://files.pythonhosted.org/packages/b8/71/4c7b063bc8d5c97e8ab2f8726ca86d0b8ffc7117a2f092136da90da62614/django_ormex-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e61e1080d6dc515af9c8be1a93cdf59c", "sha256": "7031c606537e104925e9f0cd72078de7fe71267ca00453829331120fe0f3cf50" }, "downloads": -1, "filename": "django-ormex-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e61e1080d6dc515af9c8be1a93cdf59c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23141, "upload_time": "2017-05-18T21:46:31", "url": "https://files.pythonhosted.org/packages/16/1e/9cb8d8c35b62dd3917a880381184711cbc0f2a59854dd229f2a55a8d555c/django-ormex-0.1.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "5c824a9111b257bc08608737ce2d8080", "sha256": "8bc24b3387b403c31b24e9257ea217cfda405775037840cfd1c7bbded4a5f95e" }, "downloads": -1, "filename": "django_ormex-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5c824a9111b257bc08608737ce2d8080", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 12276, "upload_time": "2017-05-21T02:26:06", "url": "https://files.pythonhosted.org/packages/97/3e/0b3057532576255072cfc5eb36ea819192c13875ab993666b4668f2ba885/django_ormex-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47e167952cba8fcbf1e8b012ba1a2e1b", "sha256": "ab5c8d6168a0a763c6a5cdd66adb1dc1bbf181614a501f739f5713afdc53d647" }, "downloads": -1, "filename": "django-ormex-0.2.tar.gz", "has_sig": false, "md5_digest": "47e167952cba8fcbf1e8b012ba1a2e1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23802, "upload_time": "2017-05-21T02:26:04", "url": "https://files.pythonhosted.org/packages/c5/c0/406e03c968ed1b0aa8a7b0928171092d8ed54c1b8b5231b11cda32b184e4/django-ormex-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5c824a9111b257bc08608737ce2d8080", "sha256": "8bc24b3387b403c31b24e9257ea217cfda405775037840cfd1c7bbded4a5f95e" }, "downloads": -1, "filename": "django_ormex-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5c824a9111b257bc08608737ce2d8080", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 12276, "upload_time": "2017-05-21T02:26:06", "url": "https://files.pythonhosted.org/packages/97/3e/0b3057532576255072cfc5eb36ea819192c13875ab993666b4668f2ba885/django_ormex-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47e167952cba8fcbf1e8b012ba1a2e1b", "sha256": "ab5c8d6168a0a763c6a5cdd66adb1dc1bbf181614a501f739f5713afdc53d647" }, "downloads": -1, "filename": "django-ormex-0.2.tar.gz", "has_sig": false, "md5_digest": "47e167952cba8fcbf1e8b012ba1a2e1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23802, "upload_time": "2017-05-21T02:26:04", "url": "https://files.pythonhosted.org/packages/c5/c0/406e03c968ed1b0aa8a7b0928171092d8ed54c1b8b5231b11cda32b184e4/django-ormex-0.2.tar.gz" } ] }