{ "info": { "author": "GoTLiuM InSPiRiT", "author_email": "gotlium@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "Django-collage\n==============\n\nWhat's that\n-----------\nThis reusable Django app can help you to create collages on your website\nfor gallery or another entities. For example, I'm use it for applications.\n\n.. image:: https://raw.github.com/gotlium/django-collage/master/demo/screens/1.jpg\n.. image:: https://raw.github.com/gotlium/django-collage/master/demo/screens/2.jpg\n.. image:: https://raw.github.com/gotlium/django-collage/master/demo/screens/3.jpg\n.. image:: https://raw.github.com/gotlium/django-collage/master/demo/screens/4.jpg\n.. image:: https://raw.github.com/gotlium/django-collage/master/demo/screens/5.jpg\n.. image:: https://raw.github.com/gotlium/django-collage/master/demo/screens/6.jpg\n.. image:: https://raw.github.com/gotlium/django-collage/master/demo/screens/7.jpg\n\n\nInstallation:\n-------------\n1. Package:\n\n.. code-block:: bash\n\n $ git clone https://github.com/gotlium/django-collage.git\n\n $ cd django-collage && sudo python setup.py install\n\n**OR**\n\n.. code-block:: bash\n\n $ sudo pip install django-collage\n\n2. Add the ``collage`` application to ``INSTALLED_APPS`` in your settings file (usually ``settings.py``)\n3. Sync database (``./manage.py syncdb``)\n\n\nUsage:\n------\n\nmodels.py\n~~~~~~~~~\n\n.. code-block:: python\n\n class Entity(models.Model):\n name = models.CharField(max_length=255, unique=True)\n\n def get_images(self):\n return Images.objects.values_list('image', flat=True).filter(\n entity=self)\n\n\n class Images(models.Model):\n entity = models.ForeignKey(Entity)\n image = models.ImageField()\n\n\nview.html\n~~~~~~~~~\n.. code-block:: html\n\n {% load collage %}\n {% load cache %}\n\n {% cache 31536000 images view.id %}\n {% get_collage for view.get_images as images %}\n