<commit_before># galleries

Galleries provides you with an easy way to create galleries in Django.<commit_msg>Update readme with an example<commit_after>Django-Galleries
======================

This is a base class to bring in galleries to sites. Currently supports photos
and embedded videos. This app mostly has abstract models for you to use and
append too for custom thumbnail sizes, photo-sizes.


Example
------------------------------

```py
# models.py
from galleries.modeles import Gallery, EmbedModel, ImageModel
from imagekit.models import ImageSpec
from imagekit.processors import Crop

class YouTubeVideo(EmbedModel):
    thumbnail = models.ProcessedImageField([Crop(60, 60)],
                                            upload_to='gallery_posters')

class Photo(ImageModel)
    thumbnail = models.ImageSpec([Crop(60, 60)], image_field='original_image')


class ApartmentGallery(Gallery):

    class GalleryMeta:
        member_models = [Photo, YouTubeVideo]


# admin.py
from .models import ApartmentGallery
from galleries.admin import register_gallery_admin

register_gallery_admin(ApartmentGallery)
```

This should register you new app with our galleries models
{'fraction_non_alphanumeric': 0.10526315789473684, 'fraction_numerical': 0.006791171477079796, 'mean_word_length': 3.9125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4068568', 'n_tokens_mistral': 330, 'n_tokens_neox': 293, 'n_words': 109}