├── .coveragerc ├── .dockerignore ├── .editorconfig ├── .gitignore ├── .travis.yml ├── Dockerfile ├── LICENSE ├── MANIFEST.in ├── README.rst ├── docker-cloud.yml ├── docker-compose.override.sample.yml ├── docker-compose.travis.yml ├── docker-compose.yml ├── docs ├── Makefile ├── _ext │ └── autodoc_raw.py ├── architecture │ ├── content │ │ ├── _layouts.rst │ │ ├── content-collections.rst │ │ ├── content-plugins.rst │ │ ├── index.rst │ │ ├── listable.rst │ │ ├── page-trees-and-mptt.rst │ │ ├── publishing.rst │ │ ├── rich-content-models.rst │ │ └── workflow.rst │ ├── conventions.rst │ ├── index.rst │ └── specs │ │ └── Refactor Repeating Events - Functional Spec.md ├── changelog.rst ├── conf.py ├── contributing │ ├── conduct.rst │ ├── documentation.rst │ ├── index.rst │ ├── releases.rst │ ├── roadmap.rst │ ├── source-setup.rst │ ├── style.rst │ └── testing.rst ├── customising │ ├── concepts.rst │ ├── configure.rst │ ├── content-plugins.rst │ ├── files.rst │ ├── index.rst │ └── rich-content-models.rst ├── deploying │ └── index.rst ├── glossary.rst ├── includes │ └── intro.rst ├── index.rst ├── install │ ├── _new_project.rst │ ├── docker.rst │ ├── existing-project.rst │ └── manual-install.rst ├── overview │ ├── at-a-glance.rst │ ├── features.rst │ └── first-site.rst ├── reference │ ├── shell-commands.rst │ └── template-tags.rst ├── requirements.in ├── requirements.txt └── topics │ ├── apis.rst │ ├── celery.rst │ ├── docker.rst │ ├── iiif.rst │ ├── import-site-map.rst │ ├── portable-apps.rst │ └── search.rst ├── glamkit_collections ├── __init__.py ├── admin.py ├── apps.py ├── contrib │ ├── README │ ├── __init__.py │ └── work_creator │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── api.py │ │ ├── api_serializers.py │ │ ├── apps.py │ │ ├── managers.py │ │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_workbase_department.py │ │ ├── 0003_auto_20161026_1606.py │ │ ├── 0004_auto_20161026_1828.py │ │ ├── 0005_workbase_images.py │ │ ├── 0006_auto_20161026_2259.py │ │ ├── 0007_auto_20161028_1904.py │ │ ├── 0008_auto_20161114_1240.py │ │ ├── 0009_auto_20161117_1757.py │ │ ├── 0010_auto_20161128_1049.py │ │ ├── 0011_role_title_plural.py │ │ ├── 0012_auto_20170412_1744.py │ │ ├── 0013_auto_20170412_1724.py │ │ ├── 0014_auto_20170412_1745.py │ │ ├── 0015_auto_20170412_1816.py │ │ ├── 0016_auto_20170412_2338.py │ │ ├── 0017_workbase_origin_locations.py │ │ ├── 0018_workbase_external_ref.py │ │ ├── 0019_auto_20170515_2004.py │ │ ├── 0020_auto_20170518_2017.py │ │ ├── 0021_auto_20170518_2023.py │ │ ├── 0022_auto_20170518_2034.py │ │ ├── 0023_auto_20170522_1508.py │ │ ├── 0024_auto_20170502_2209.py │ │ ├── 0025_creatorbase_name_full.py │ │ ├── 0026_auto_20170516_1518.py │ │ ├── 0027_auto_20170518_1611.py │ │ ├── 0028_auto_20170523_1141.py │ │ ├── 0029_auto_20170523_1149.py │ │ ├── 0030_auto_20170523_1243.py │ │ ├── 0031_auto_20170606_1126.py │ │ ├── 0032_tidy_names.py │ │ ├── 0033_auto_20170615_2002.py │ │ └── __init__.py │ │ ├── models.py │ │ ├── plugins │ │ ├── __init__.py │ │ ├── artwork │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── api.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_remove_artwork_department.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ └── work_type_plugins.py │ │ ├── film │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── api.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_film_trailer.py │ │ │ │ ├── 0003_auto_20161117_1801.py │ │ │ │ ├── 0004_auto_20161130_1109.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ └── work_type_plugins.py │ │ ├── game │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── api.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_game_trailer.py │ │ │ │ ├── 0003_auto_20161117_1801.py │ │ │ │ ├── 0004_auto_20161130_1109.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ └── work_type_plugins.py │ │ ├── links │ │ │ ├── __init__.py │ │ │ ├── apps.py │ │ │ ├── content_plugins.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_auto_20161117_1810.py │ │ │ │ └── __init__.py │ │ │ └── models.py │ │ ├── moving_image │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_auto_20161026_1312.py │ │ │ │ ├── 0003_movingimagework_trailer.py │ │ │ │ ├── 0004_auto_20161110_1419.py │ │ │ │ ├── 0005_auto_20161117_1801.py │ │ │ │ ├── 0006_auto_20161130_1142.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ └── work_type_plugins.py │ │ ├── organization │ │ │ ├── __init__.py │ │ │ ├── api.py │ │ │ ├── apps.py │ │ │ ├── creator_type_plugins.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ └── models.py │ │ └── person │ │ │ ├── __init__.py │ │ │ ├── api.py │ │ │ ├── apps.py │ │ │ ├── creator_type_plugins.py │ │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_remove_personcreator_name_full.py │ │ │ ├── 0003_auto_20170606_1158.py │ │ │ └── __init__.py │ │ │ └── models.py │ │ ├── search_indexes.py │ │ ├── templates │ │ └── gk_collections │ │ │ ├── creator.html │ │ │ └── work.html │ │ ├── urls.py │ │ └── views.py ├── etl │ ├── __init__.py │ ├── base.py │ └── readme.rst ├── management │ ├── __init__.py │ └── commands │ │ ├── __init__.py │ │ └── analyze_json.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto_20170412_1520.py │ ├── 0003_auto_20170412_1742.py │ ├── 0004_geographiclocation_slug.py │ └── __init__.py ├── models.py ├── utils.py └── utils │ ├── __init__.py │ └── countries.py ├── glamkit_sponsors ├── __init__.py ├── admin.py ├── apps.py ├── content_plugins.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_beginsponsorblockitem_endsponsorblockitem_sponsorpromoitem.py │ └── __init__.py ├── models.py └── templates │ └── plugins │ └── sponsor_block │ ├── begin.html │ ├── end.html │ └── sponsor.html ├── icekit ├── __init__.py ├── abstract_models.py ├── admin.py ├── admin_forms.py ├── admin_mixins.py ├── admin_tools │ ├── __init__.py │ ├── apps.py │ ├── filters.py │ ├── forms.py │ ├── mixins.py │ ├── models.py │ ├── polymorphic.py │ ├── previews.py │ ├── static │ │ └── admin │ │ │ ├── css │ │ │ ├── icekit_dashboard.less │ │ │ ├── override.less │ │ │ └── preview-field-admin.css │ │ │ ├── img │ │ │ └── header-brand.png │ │ │ └── js │ │ │ ├── fluent_layouts.js │ │ │ ├── icekit_dashboard.js │ │ │ ├── jquery.matchHeight.js │ │ │ └── preview-field-admin.js │ ├── templates │ │ ├── admin │ │ │ ├── base_site.html │ │ │ ├── dashboard_widgets │ │ │ │ ├── _widget.html │ │ │ │ ├── _widget_assigned_to_link.html │ │ │ │ ├── _widget_recent_actions_link.html │ │ │ │ ├── assigned_to_me.html │ │ │ │ ├── featured_app.html │ │ │ │ └── recent_actions.html │ │ │ ├── fluent_layouts_change_form.html │ │ │ ├── index.html │ │ │ ├── password_reset_email.html │ │ │ └── polymorphic_tree │ │ │ │ └── jstree_list_results.html │ │ └── icekit │ │ │ └── admin │ │ │ └── fluent_layouts_change_form.html │ ├── templatetags │ │ ├── __init__.py │ │ └── dashboard_tags.py │ ├── utils.py │ └── widgets.py ├── api │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── base_filters.py │ ├── base_serializers.py │ ├── base_tests.py │ ├── base_views.py │ ├── images │ │ ├── __init__.py │ │ ├── serializers.py │ │ ├── tests.py │ │ └── views.py │ ├── management │ │ └── commands │ │ │ ├── dump_collection_api.py │ │ │ └── dump_collection_csv.py │ ├── media_category │ │ ├── __init__.py │ │ ├── serializers.py │ │ ├── tests.py │ │ └── views.py │ ├── pages │ │ ├── __init__.py │ │ ├── serializers.py │ │ ├── tests.py │ │ └── views.py │ ├── pagination.py │ ├── test_collections.py │ └── urls.py ├── apps.py ├── appsettings.py ├── bin │ ├── bash.sh │ ├── bower-install.sh │ ├── celery.sh │ ├── celerybeat.sh │ ├── celeryflower.sh │ ├── cronlock.sh │ ├── entrypoint.sh │ ├── gunicorn.sh │ ├── help.sh │ ├── manage.py │ ├── migrate.sh │ ├── nginx.sh │ ├── npm-install.sh │ ├── pip-install.sh │ ├── runserver.sh │ ├── runtests.sh │ ├── setup-django.sh │ ├── setup-git-secret.sh │ ├── setup-postgres.sh │ ├── supervisorctl.sh │ ├── supervisord.sh │ ├── transfer.sh │ └── waitlock.sh ├── content_collections │ ├── __init__.py │ ├── abstract_models.py │ ├── admin.py │ ├── apps.py │ ├── page_type_plugins.py │ ├── templates │ │ └── icekit_content_collections │ │ │ └── layouts │ │ │ └── default.html │ └── tests.py ├── etc │ ├── nginx.conf │ ├── supervisord-django.conf │ ├── supervisord-no-docker.conf │ └── supervisord.conf ├── fields.py ├── formats │ ├── __init__.py │ └── en │ │ ├── __init__.py │ │ └── formats.py ├── integration │ ├── __init__.py │ └── reversion │ │ ├── __init__.py │ │ ├── apps.py │ │ └── templates │ │ └── admin │ │ └── fluent_pages │ │ └── page │ │ └── change_list.html ├── layouts │ ├── __init__.py │ └── templates │ │ └── icekit │ │ └── layouts │ │ └── default.html ├── management │ ├── __init__.py │ └── commands │ │ ├── __init__.py │ │ ├── add_missing_placeholders.py │ │ ├── fluent_plugins.py │ │ ├── import_site_map.py │ │ ├── print_mptt_tree.py │ │ ├── publishing_migrate_from_publisher.py │ │ ├── rebuild_page_tree.py │ │ ├── resync_published_page_tree.py │ │ └── truncate_postgres_dbdump.py ├── managers.py ├── middleware.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_layout.py │ ├── 0003_layout_content_types.py │ ├── 0004_auto_20150611_2044.py │ ├── 0005_remove_layout_key.py │ ├── 0006_auto_20150911_0744.py │ ├── 0007_auto_20170310_1220.py │ └── __init__.py ├── mixins.py ├── models.py ├── navigation │ ├── __init__.py │ ├── abstract_models.py │ ├── admin.py │ ├── apps.py │ ├── content_plugins.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── templates │ │ └── icekit │ │ │ └── navigation │ │ │ ├── accounts_navigation_item.html │ │ │ ├── navigation.html │ │ │ └── navigation_item.html │ └── tests │ │ ├── __init__.py │ │ └── test_navigation.py ├── page_types │ ├── __init__.py │ ├── article │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20161019_1906.py │ │ │ ├── 0003_auto_20161110_1125.py │ │ │ ├── 0004_article_hero_image.py │ │ │ ├── 0005_add_hero.py │ │ │ ├── 0006_auto_20161117_1800.py │ │ │ ├── 0007_auto_20161130_1109.py │ │ │ ├── 0008_auto_20170518_1629.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── page_type_plugins.py │ │ └── search_indexes.py │ ├── author │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20161011_1522.py │ │ │ ├── 0003_auto_20161115_1118.py │ │ │ ├── 0004_auto_20161117_1201.py │ │ │ ├── 0005_auto_20161117_1824.py │ │ │ ├── 0006_auto_20161117_1825.py │ │ │ ├── 0007_auto_20161125_1720.py │ │ │ ├── 0008_auto_20161128_1049.py │ │ │ ├── 0009_auto_20170317_1655.py │ │ │ ├── 0010_auto_20170317_1656.py │ │ │ ├── 0011_auto_20170518_1629.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── page_type_plugins.py │ │ ├── search_indexes.py │ │ ├── templates │ │ │ └── icekit_authors │ │ │ │ ├── admin │ │ │ │ └── change_form.html │ │ │ │ └── detail.html │ │ └── tests.py │ ├── layout_page │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20160419_2209.py │ │ │ ├── 0003_auto_20160810_1856.py │ │ │ ├── 0004_auto_20161110_1737.py │ │ │ ├── 0005_auto_20161125_1709.py │ │ │ ├── 0006_auto_20161130_1109.py │ │ │ ├── 0007_auto_20170509_1148.py │ │ │ ├── 0008_auto_20170518_1629.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── page_type_plugins.py │ │ └── templates │ │ │ └── search │ │ │ └── indexes │ │ │ └── layout_page │ │ │ └── layoutpage_text.txt │ └── search_page │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_auto_20160420_0029.py │ │ ├── 0003_auto_20160810_1856.py │ │ ├── 0004_auto_20161122_2121.py │ │ ├── 0005_auto_20161125_1720.py │ │ ├── 0006_searchpage_default_search_type.py │ │ ├── 0007_auto_20170518_1629.py │ │ └── __init__.py │ │ ├── models.py │ │ ├── page_type_plugins.py │ │ ├── templates │ │ └── icekit │ │ │ └── page_types │ │ │ └── search_page │ │ │ ├── _facet.html │ │ │ └── default.html │ │ └── tests.py ├── plugins │ ├── __init__.py │ ├── base.py │ ├── brightcove │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20150527_0022.py │ │ │ ├── 0003_auto_20151026_1805.py │ │ │ └── __init__.py │ │ ├── models.py │ │ └── templates │ │ │ └── icekit │ │ │ └── plugins │ │ │ └── brightcove │ │ │ └── default.html │ ├── child_pages │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20160821_2140.py │ │ │ ├── 0003_auto_20161123_1827.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ └── icekit │ │ │ │ └── plugins │ │ │ │ └── child_pages │ │ │ │ └── default.html │ │ └── tests.py │ ├── contact_person │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20161110_1531.py │ │ │ ├── 0003_auto_20170605_1109.py │ │ │ └── __init__.py │ │ ├── models.py │ │ └── templates │ │ │ └── icekit │ │ │ └── plugins │ │ │ └── contact_person │ │ │ └── default.html │ ├── content_listing │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── forms.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_contentlistingitem_limit.py │ │ │ ├── 0003_contentlistingitem_no_items_message.py │ │ │ └── __init__.py │ │ ├── models.py │ │ └── templates │ │ │ └── icekit │ │ │ └── plugins │ │ │ └── content_listing │ │ │ ├── _item.html │ │ │ └── default.html │ ├── descriptors.py │ ├── faq │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20151013_1330.py │ │ │ ├── 0003_auto_20160821_2140.py │ │ │ └── __init__.py │ │ ├── models.py │ │ └── templates │ │ │ └── icekit │ │ │ └── plugins │ │ │ └── faq │ │ │ └── default.html │ ├── file │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20160821_2140.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ └── icekit │ │ │ │ └── plugins │ │ │ │ └── file │ │ │ │ └── default.html │ │ └── tests.py │ ├── horizontal_rule │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20160821_2140.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ └── icekit │ │ │ │ └── plugins │ │ │ │ └── horizontal_rule │ │ │ │ └── default.html │ │ └── tests.py │ ├── iiif │ │ ├── __init__.py │ │ ├── apps.py │ │ ├── appsettings.py │ │ ├── tests.py │ │ ├── urls.py │ │ ├── utils.py │ │ └── views.py │ ├── image │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20150527_0022.py │ │ │ ├── 0003_auto_20150623_0115.py │ │ │ ├── 0004_auto_20151001_2023.py │ │ │ ├── 0005_imageitem_caption_override.py │ │ │ ├── 0006_auto_20160309_0453.py │ │ │ ├── 0007_auto_20160920_1626.py │ │ │ ├── 0008_auto_20160920_2114.py │ │ │ ├── 0009_auto_20161026_2044.py │ │ │ ├── 0010_auto_20170307_1458.py │ │ │ ├── 0011_auto_20170310_1220.py │ │ │ ├── 0011_auto_20170310_1853.py │ │ │ ├── 0012_imagerepurposeconfig_is_cropping_allowed.py │ │ │ ├── 0013_image_is_cropping_allowed.py │ │ │ ├── 0014_image_external_ref.py │ │ │ ├── 0015_auto_20170310_2004.py │ │ │ ├── 0016_auto_20170314_1306.py │ │ │ ├── 0016_auto_20170316_2021.py │ │ │ ├── 0017_auto_20170314_1352.py │ │ │ ├── 0018_auto_20170314_1401.py │ │ │ ├── 0019_merge.py │ │ │ ├── 0020_auto_20170317_1655.py │ │ │ ├── 0021_merge.py │ │ │ ├── 0022_auto_20170622_1024.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ ├── icekit │ │ │ │ └── plugins │ │ │ │ │ └── image │ │ │ │ │ ├── _caption.html │ │ │ │ │ └── default.html │ │ │ └── image │ │ │ │ └── admin │ │ │ │ └── change_form.html │ │ └── tests.py │ ├── image_gallery │ │ ├── __init__.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20160927_2305.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── static │ │ │ └── icekit │ │ │ │ └── plugins │ │ │ │ └── image_gallery │ │ │ │ └── init.js │ │ └── templates │ │ │ └── icekit │ │ │ └── plugins │ │ │ └── image_gallery │ │ │ ├── admin │ │ │ └── change_form.html │ │ │ └── default.html │ ├── instagram_embed │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── forms.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20150723_1939.py │ │ │ ├── 0003_auto_20150724_0213.py │ │ │ ├── 0004_auto_20160821_2140.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ └── icekit │ │ │ │ └── plugins │ │ │ │ └── instagram_embed │ │ │ │ └── default.html │ │ └── tests.py │ ├── links │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── appsettings.py │ │ ├── content_plugins.py │ │ ├── managers.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20161117_1221.py │ │ │ ├── 0003_auto_20161117_1810.py │ │ │ ├── 0004_auto_20170306_1529.py │ │ │ ├── 0004_auto_20170314_1401.py │ │ │ ├── 0005_auto_20170511_1909.py │ │ │ ├── 0006_authorlink_exclude_from_contributions.py │ │ │ ├── 0007_authorlink_exclude_from_authorship.py │ │ │ └── __init__.py │ │ ├── models.py │ │ └── templates │ │ │ └── plugins │ │ │ └── link │ │ │ └── default.html │ ├── location │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20170724_1019.py │ │ │ ├── 0003_locationitem.py │ │ │ ├── 0004_auto_20170905_1129.py │ │ │ ├── 0005_auto_20170905_1136.py │ │ │ ├── 0006_auto_20171005_1525.py │ │ │ ├── 0007_auto_20171005_1708.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ └── icekit │ │ │ │ └── plugins │ │ │ │ └── location │ │ │ │ ├── index.html │ │ │ │ ├── item.html │ │ │ │ └── location.html │ │ ├── tests.py │ │ ├── urls.py │ │ └── views.py │ ├── map │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20160821_2140.py │ │ │ ├── 0003_auto_20170531_1359.py │ │ │ ├── 0004_auto_20170604_2148.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ └── icekit │ │ │ │ └── plugins │ │ │ │ └── map │ │ │ │ └── embed.html │ │ └── tests.py │ ├── oembed_with_caption │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20160821_2140.py │ │ │ ├── 0003_oembedwithcaptionitem_is_16by9.py │ │ │ ├── 0004_auto_20160919_2008.py │ │ │ ├── 0005_auto_20161027_1711.py │ │ │ ├── 0006_auto_20161027_2330.py │ │ │ ├── 0007_auto_20161110_1513.py │ │ │ ├── 0008_oembedwithcaptionitem_content_title.py │ │ │ └── __init__.py │ │ ├── models.py │ │ └── templates │ │ │ └── icekit │ │ │ └── plugins │ │ │ └── oembed │ │ │ └── default.html │ ├── oembeditem │ │ ├── __init__.py │ │ └── apps.py │ ├── page_anchor │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20160821_2140.py │ │ │ ├── 0003_auto_20161125_1538.py │ │ │ ├── 0004_auto_20161130_0741.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ └── icekit │ │ │ │ └── plugins │ │ │ │ └── page_anchor │ │ │ │ └── default.html │ │ └── tests.py │ ├── page_anchor_list │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20160821_2140.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ └── icekit │ │ │ │ └── plugins │ │ │ │ └── page_anchor_list │ │ │ │ └── default.html │ │ └── tests.py │ ├── quote │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20160821_2140.py │ │ │ ├── 0003_auto_20160912_2218.py │ │ │ ├── 0004_auto_20161027_1717.py │ │ │ └── __init__.py │ │ ├── models.py │ │ └── templates │ │ │ └── icekit │ │ │ └── plugins │ │ │ └── quote │ │ │ └── default.html │ ├── reusable_form │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20160821_2140.py │ │ │ └── __init__.py │ │ ├── models.py │ │ └── templates │ │ │ └── icekit │ │ │ └── plugins │ │ │ └── reusable_form │ │ │ └── default.html │ ├── slideshow │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── appsettings.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20150623_0115.py │ │ │ ├── 0003_auto_20160404_0118.py │ │ │ ├── 0004_auto_20160821_2140.py │ │ │ ├── 0005_auto_20160927_2305.py │ │ │ ├── 0006_auto_20170518_1629.py │ │ │ └── __init__.py │ │ ├── models.py │ │ └── templates │ │ │ └── icekit │ │ │ └── plugins │ │ │ └── slideshow │ │ │ ├── admin │ │ │ └── change_form.html │ │ │ └── default.html │ ├── tests.py │ ├── text │ │ ├── __init__.py │ │ ├── appsettings.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_textitem_style.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ └── icekit │ │ │ │ └── plugins │ │ │ │ └── text │ │ │ │ ├── admin │ │ │ │ └── admin_init.html │ │ │ │ └── default.html │ │ └── tests.py │ └── twitter_embed │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── forms.py │ │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_auto_20150724_0213.py │ │ ├── 0003_auto_20160821_2140.py │ │ └── __init__.py │ │ ├── models.py │ │ └── templates │ │ └── icekit │ │ └── plugins │ │ └── twitter_embed │ │ └── default.html ├── project │ ├── __init__.py │ ├── celery.py │ ├── context_processors.py │ ├── glamkit_urls.py │ ├── hosts.py │ ├── jinja2.py │ ├── settings │ │ ├── __init__.py │ │ ├── _base.py │ │ ├── _develop.py │ │ ├── _production.py │ │ ├── _test.py │ │ ├── _tox.py │ │ ├── calculated.py │ │ ├── glamkit.py │ │ └── icekit.py │ ├── urls.py │ └── wsgi.py ├── publishing │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── managers.py │ ├── middleware.py │ ├── models.py │ ├── monkey_patches.py │ ├── signals.py │ ├── static │ │ └── publishing │ │ │ └── publishing.js │ ├── templates │ │ └── admin │ │ │ └── publishing │ │ │ ├── _change_list_publishing_column.html │ │ │ └── publishing_change_form.html │ ├── templatetags │ │ ├── __init__.py │ │ └── publishing_tags.py │ ├── tests.py │ ├── tests_base.py │ └── utils.py ├── response_pages │ ├── __init__.py │ ├── abstract_models.py │ ├── admin.py │ ├── appsettings.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── templates │ │ └── icekit │ │ │ └── response_pages │ │ │ ├── 404.html │ │ │ └── 500.html │ └── views.py ├── search_indexes.py ├── static │ └── icekit │ │ ├── js │ │ ├── google_map.js │ │ └── link_share.js │ │ └── styles │ │ ├── components │ │ └── preview-ribbon.scss │ │ ├── icekit.scss │ │ └── site.scss ├── tasks.py ├── templates │ ├── base.html │ ├── fluent_pages │ │ └── intro_page.html │ ├── icekit │ │ ├── 404.html │ │ ├── 500.html │ │ ├── 503.html │ │ ├── analytics.html │ │ ├── auth │ │ │ ├── logged_out.html │ │ │ ├── login.html │ │ │ ├── password_change_done.html │ │ │ ├── password_change_form.html │ │ │ ├── password_reset.html │ │ │ ├── password_reset_complete.html │ │ │ ├── password_reset_confirm.html │ │ │ ├── password_reset_done.html │ │ │ ├── password_reset_email.html │ │ │ └── password_reset_subject.txt │ │ ├── base.html │ │ ├── layouts │ │ │ └── fallback_default.html │ │ ├── messages.html │ │ ├── partials │ │ │ ├── pagination.html │ │ │ └── preview_link.html │ │ └── templatetags │ │ │ └── link_share.html │ └── search │ │ ├── indexes │ │ └── icekit │ │ │ └── default.txt │ │ └── search.html ├── templatetags │ ├── __init__.py │ ├── icekit_tags.py │ └── search_tags.py ├── tests │ ├── __init__.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_unpublishablelayoutpage.py │ │ ├── 0003_auto_20160810_2054.py │ │ ├── 0004_auto_20160925_0758.py │ │ ├── 0005_auto_20161027_1428.py │ │ ├── 0006_auto_20161115_1219.py │ │ ├── 0007_auto_20161118_1044.py │ │ ├── 0008_auto_20161204_1456.py │ │ ├── 0009_auto_20170519_1232.py │ │ ├── 0010_auto_20170522_1600.py │ │ └── __init__.py │ ├── models.py │ ├── templates │ │ ├── base.html │ │ ├── icekit │ │ │ └── layouts │ │ │ │ ├── default.html │ │ │ │ └── test_slot_contents.html │ │ └── layout_page │ │ │ └── layoutpage │ │ │ └── layouts │ │ │ └── default.html │ ├── tests.py │ └── urls.py ├── utils │ ├── __init__.py │ ├── admin │ │ ├── __init__.py │ │ ├── mixins.py │ │ └── urls.py │ ├── api.py │ ├── attributes.py │ ├── csv_unicode.py │ ├── deprecation.py │ ├── fluent_contents.py │ ├── images.py │ ├── implementation.py │ ├── management │ │ ├── __init__.py │ │ └── base.py │ ├── migrations.py │ ├── pagination.py │ ├── readability │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── __init__.py │ │ ├── readability.py │ │ ├── readability_utils.py │ │ └── syllables_en.py │ ├── search │ │ ├── __init__.py │ │ ├── backends.py │ │ ├── facets.py │ │ ├── search_indexes.py │ │ └── views.py │ ├── sequences.py │ ├── storage.py │ ├── strings.py │ ├── testing.py │ └── tests.py ├── validators.py ├── views.py └── workflow │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── appsettings.py │ ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto_20161128_1105.py │ ├── 0003_auto_20161130_0741.py │ ├── 0004_auto_20170130_1146.py │ ├── 0005_auto_20170208_1146.py │ ├── 0006_auto_20170308_2044.py │ └── __init__.py │ ├── models.py │ ├── templatetags │ ├── __init__.py │ └── workflow_tags.py │ └── tests.py ├── icekit_events ├── __init__.py ├── admin.py ├── admin_forms.py ├── apps.py ├── appsettings.py ├── event_types │ ├── __init__.py │ └── simple │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── event_type_plugins.py │ │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_simpleevent_layout.py │ │ ├── 0003_auto_20161125_1701.py │ │ ├── 0004_auto_20170727_1403.py │ │ └── __init__.py │ │ ├── models.py │ │ └── templates │ │ └── icekit_event_types_simple │ │ └── layouts │ │ └── default.html ├── forms.py ├── management │ ├── __init__.py │ └── commands │ │ ├── __init__.py │ │ └── create_event_occurrences.py ├── managers.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_recurrence_rules.py │ ├── 0003_auto_20161021_1658.py │ ├── 0004_eventbase_part_of.py │ ├── 0005_auto_20161024_1742.py │ ├── 0006_auto_20161107_1747.py │ ├── 0007_type_fixtures.py │ ├── 0008_occurrence_external_ref.py │ ├── 0009_auto_20161125_1538.py │ ├── 0010_eventbase_is_drop_in.py │ ├── 0011_auto_20161128_1049.py │ ├── 0012_eventtype_title_plural.py │ ├── 0012_occurrence_status.py │ ├── 0013_merge.py │ ├── 0014_eventbase_human_times.py │ ├── 0015_auto_20161208_0029.py │ ├── 0016_auto_20161208_0030.py │ ├── 0017_eventtype_color.py │ ├── 0018_auto_20170307_1458.py │ ├── 0018_auto_20170314_1401.py │ ├── 0019_auto_20170310_1220.py │ ├── 0020_auto_20170317_1341.py │ ├── 0021_merge.py │ ├── 0022_auto_20170320_1807.py │ ├── 0023_auto_20170320_1820.py │ ├── 0024_auto_20170320_1824.py │ ├── 0025_auto_20170519_1327.py │ ├── 0026_eventbase_location.py │ ├── 0027_auto_20170721_1613.py │ ├── 0028_eventbase_price_detailed.py │ ├── 0029_fix_malformed_rrules_20170830_1101.py │ ├── 0030_auto_20171002_1551.py │ └── __init__.py ├── models.py ├── page_types │ ├── __init__.py │ ├── advancedeventlisting │ │ ├── __init__.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── page_type_plugins.py │ │ └── templates │ │ │ └── advancedeventlisting │ │ │ └── layouts │ │ │ └── default.html │ └── eventlistingfordate │ │ ├── __init__.py │ │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_auto_20161018_1113.py │ │ ├── 0003_auto_20161019_1906.py │ │ ├── 0004_auto_20161115_1118.py │ │ ├── 0005_auto_20161130_1109.py │ │ ├── 0006_auto_20170519_1345.py │ │ └── __init__.py │ │ ├── models.py │ │ ├── page_type_plugins.py │ │ └── templates │ │ └── eventlistingfordate │ │ └── layouts │ │ └── default.html ├── plugins │ ├── __init__.py │ ├── event_content_listing │ │ ├── __init__.py │ │ ├── abstract_models.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── forms.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20170222_1136.py │ │ │ ├── 0003_eventcontentlistingitem_no_items_message.py │ │ │ └── __init__.py │ │ ├── models.py │ │ └── templates │ │ │ └── icekit_events │ │ │ └── plugins │ │ │ └── event_content_listing │ │ │ ├── _event.html │ │ │ └── default.html │ ├── links │ │ ├── __init__.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20170314_1401.py │ │ │ ├── 0003_auto_20170511_1909.py │ │ │ ├── 0004_eventlink_include_even_when_finished.py │ │ │ └── __init__.py │ │ └── models.py │ └── todays_occurrences │ │ ├── __init__.py │ │ ├── apps.py │ │ ├── content_plugins.py │ │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_auto_20161207_1928.py │ │ └── __init__.py │ │ └── models.py ├── sample_data │ ├── __init__.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ └── models.py ├── search_indexes.py ├── static │ ├── admin │ │ └── js │ │ │ └── event_all_day_field.js │ └── icekit_events │ │ ├── css │ │ ├── events_datepicker.css │ │ └── recurrence_rule_widget.css │ │ ├── img │ │ ├── fade.png │ │ └── stripe.png │ │ └── js │ │ ├── events_datepicker.js │ │ └── jquery-querystring.js ├── templates │ ├── admin │ │ └── icekit_events │ │ │ └── eventbase │ │ │ ├── calendar.html │ │ │ ├── change_form.html │ │ │ └── change_list.html │ ├── icekit_events │ │ ├── event.html │ │ ├── index.html │ │ ├── layouts │ │ │ └── default.html │ │ ├── recurrence_rule_widget │ │ │ ├── format_output.html │ │ │ └── render.html │ │ └── type.html │ └── plugins │ │ ├── link │ │ └── event.html │ │ └── todays_occurrences │ │ └── default.html ├── templatetags │ ├── __init__.py │ └── events_tags.py ├── tests │ ├── __init__.py │ ├── apps.py │ └── tests.py ├── urls.py ├── utils │ ├── __init__.py │ ├── permissions.py │ └── timeutils.py ├── validators.py └── views.py ├── icekit_press_releases ├── __init__.py ├── admin.py ├── apps.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto_20160810_1832.py │ ├── 0003_auto_20160810_1856.py │ ├── 0004_auto_20160926_2341.py │ ├── 0005_auto_20161110_1531.py │ ├── 0006_auto_20161115_1118.py │ ├── 0007_auto_20161117_1201.py │ ├── 0008_auto_20161128_1049.py │ ├── 0009_auto_20170519_1308.py │ ├── 0010_add_brief.py │ └── __init__.py ├── models.py ├── page_type_plugins.py ├── search_indexes.py └── templates │ └── icekit_press_releases │ ├── pressrelease │ └── layouts │ │ └── default.html │ └── pressreleaselisting │ └── layouts │ └── default.html ├── mkdocs.yml ├── project_template ├── .coveragerc ├── .dockerignore ├── .editorconfig ├── .env.local.sample ├── .env.production ├── .env.staging ├── .gitignore ├── .travis.yml ├── Dockerfile ├── bower.json ├── docker-cloud.yml ├── docker-compose.override.sample.yml ├── docker-compose.travis.yml ├── docker-compose.yml ├── go.sh ├── package.json ├── project_settings.py ├── project_settings_local.sample.py ├── requirements-icekit.txt ├── requirements.in ├── requirements.txt └── test_initial_data.sql ├── requirements.txt ├── setup.cfg ├── setup.py ├── startproject.sh └── tox.ini /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | data_file = project_template/var/.coverage 4 | omit = */migrations/*, */tests.py, */tests/* 5 | source = glamkit_collections, glamkit_sponsors, icekit, icekit_events, icekit_press_releases 6 | 7 | [report] 8 | exclude_lines = 9 | def __repr__ 10 | pragma: no cover 11 | raise AssertionError 12 | raise NotImplementedError 13 | show_missing = True 14 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/*.md5 2 | **/*.orig 3 | **/*.pyc 4 | **/*.pyo 5 | **/*.swp 6 | **/.coverage 7 | **/.DS_Store 8 | **/npm-debug.log 9 | **/requirements-local.txt 10 | *.egg-info/ 11 | .eggs/ 12 | .env 13 | .env.local 14 | .idea/ 15 | .tox/ 16 | dist/ 17 | docker-compose.override.yml 18 | project_template/bower_components/ 19 | project_template/node_modules/ 20 | project_template/static_root/ 21 | project_template/var/ 22 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | indent_size = 4 8 | indent_style = tab 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | end_of_line = lf 12 | 13 | [*.{bat,iss}] 14 | end_of_line = crlf 15 | 16 | [*.{css,html,js,json,less,sass,scss}] 17 | indent_size = 2 18 | indent_style = tab 19 | 20 | [*.{md,py}] 21 | indent_style = space 22 | 23 | [*.sh] 24 | indent_style = tab 25 | 26 | [*.yml] 27 | indent_size = 2 28 | indent_style = space 29 | 30 | [*.rst] 31 | indent_size = 3 32 | indent_style = space 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/*.md5 2 | **/*.orig 3 | **/*.py[co] 4 | **/*.swp 5 | **/.coverage 6 | **/.DS_Store 7 | **/npm-debug.log 8 | **/requirements-local.txt 9 | /*.egg-info/ 10 | /.eggs/ 11 | /.env 12 | /.env.local 13 | /.idea/ 14 | /.tox/ 15 | /build/ 16 | /dist/ 17 | /docker-compose.override.yml 18 | /htmlcov/ 19 | /project_template/bower_components/ 20 | /project_template/node_modules/ 21 | /project_template/static_root/ 22 | /project_template/var/ 23 | /docs/_build*/ 24 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include icekit * 2 | recursive-include icekit_events * 3 | recursive-include glamkit_sponsors * 4 | recursive-include glamkit_collections * 5 | recursive-include icekit_press_releases * 6 | recursive-exclude icekit *.md5 *.orig *.pyc *.pyo *.swp .DS_Store requirements.txt requirements-local.txt 7 | prune icekit/bower_components 8 | prune icekit/node_modules 9 | -------------------------------------------------------------------------------- /docker-compose.override.sample.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | base: 4 | environment: 5 | GPG_PASSPHRASE: # Get from environment 6 | MASTER_PASSWORD: # Get from environment 7 | celery: 8 | extends: base 9 | celerybeat: 10 | extends: base 11 | celeryflower: 12 | extends: base 13 | django: 14 | extends: base 15 | -------------------------------------------------------------------------------- /docker-compose.travis.yml: -------------------------------------------------------------------------------- 1 | django: 2 | command: runtests.sh 3 | environment: 4 | QUICK: 1 5 | TRAVIS: # Get from environment 6 | TRAVIS_BRANCH: # Get from environment 7 | TRAVIS_JOB_ID: # Get from environment 8 | image: interaction/icekit:${TAG} 9 | links: 10 | - elasticsearch 11 | - postgres 12 | - redis 13 | volumes: 14 | - ./.git:/opt/django-icekit/.git 15 | - ./project_template/var:/opt/django-icekit/project_template/var 16 | elasticsearch: 17 | image: interaction/elasticsearch-icu:1-alpine 18 | postgres: 19 | image: postgres:9.4-alpine 20 | redis: 21 | command: redis-server --appendonly yes 22 | image: redis:3-alpine 23 | -------------------------------------------------------------------------------- /docs/_ext/autodoc_raw.py: -------------------------------------------------------------------------------- 1 | from sphinx.ext import autodoc 2 | 3 | class SimpleDocumenter(autodoc.MethodDocumenter): 4 | """ 5 | http://stackoverflow.com/questions/7825263/including-docstring-in-sphinx-documentation 6 | """ 7 | objtype = "simple" 8 | 9 | #do not indent the content 10 | content_indent = "" 11 | 12 | #do not add a header to the docstring 13 | def add_directive_header(self, sig): 14 | pass 15 | 16 | def setup(app): 17 | app.add_autodocumenter(SimpleDocumenter) 18 | -------------------------------------------------------------------------------- /docs/architecture/content/listable.rst: -------------------------------------------------------------------------------- 1 | ListableMixin 2 | ============= 3 | 4 | .. autoclass:: icekit.mixins.ListableMixin 5 | :members: 6 | 7 | -------------------------------------------------------------------------------- /docs/architecture/index.rst: -------------------------------------------------------------------------------- 1 | The Architecture of GLAMkit 2 | =========================== 3 | 4 | .. include:: ../includes/intro.rst 5 | 6 | This section documents some of the architectural principles underpinning 7 | GLAMkit. 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | 12 | conventions 13 | content/index 14 | 15 | 16 | .. TODO: add assets, navigation, dashboard 17 | -------------------------------------------------------------------------------- /docs/customising/index.rst: -------------------------------------------------------------------------------- 1 | Customising your site 2 | ===================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | :caption: Contents: 7 | 8 | files 9 | configure 10 | concepts 11 | rich-content-models 12 | content-plugins 13 | -------------------------------------------------------------------------------- /docs/reference/template-tags.rst: -------------------------------------------------------------------------------- 1 | Template tags 2 | ============= 3 | 4 | .. TODO: see also Django/Fluent tags 5 | .. TODO: describe {% load %} commands 6 | 7 | .. automodule:: icekit.templatetags.icekit_tags 8 | :members: grammatical_join, update_GET, oembed, admin_link, admin_url, link 9 | :undoc-members: 10 | -------------------------------------------------------------------------------- /docs/requirements.in: -------------------------------------------------------------------------------- 1 | recommonmark 2 | sphinx 3 | sphinx-autobuild 4 | -------------------------------------------------------------------------------- /glamkit_collections/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /glamkit_collections/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | from django.utils.module_loading import autodiscover_modules 3 | 4 | from any_urlfield.forms import SimpleRawIdWidget 5 | 6 | from icekit.fields import ICEkitURLField 7 | 8 | 9 | class AppConfig(AppConfig): 10 | name = '.'.join(__name__.split('.')[:-1]) 11 | label = 'glamkit_collections' 12 | verbose_name = "Collection" 13 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/contrib/__init__.py -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/migrations/0002_workbase_department.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('gk_collections_work_creator', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='workbase', 16 | name='department', 17 | field=models.CharField(max_length=255, blank=True, help_text=b'The curatorial unit responsible for the object, e.g., "Western Painting."'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/migrations/0007_auto_20161028_1904.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('gk_collections_work_creator', '0006_auto_20161026_2259'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='workimage', 16 | options={'ordering': ('order',), 'verbose_name': 'Image'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/migrations/0009_auto_20161117_1757.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('gk_collections_work_creator', '0008_auto_20161114_1240'), 11 | ] 12 | 13 | operations = [ 14 | migrations.RenameField( 15 | model_name='workbase', 16 | old_name='one_liner', 17 | new_name='oneliner', 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/migrations/0011_role_title_plural.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('gk_collections_work_creator', '0010_auto_20161128_1049'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='role', 16 | name='title_plural', 17 | field=models.CharField(max_length=255, blank=True, help_text=b"Optional plural version of title (if appending 's' isn't correct)"), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/migrations/0015_auto_20170412_1816.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('gk_collections_work_creator', '0014_auto_20170412_1745'), 11 | ] 12 | 13 | operations = [ 14 | migrations.RenameField( 15 | model_name='workorigin', 16 | old_name='sort', 17 | new_name='order', 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/migrations/0016_auto_20170412_2338.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('gk_collections_work_creator', '0015_auto_20170412_1816'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='workorigin', 16 | options={'ordering': ('order',)}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/migrations/0027_auto_20170518_1611.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('gk_collections_work_creator', '0026_auto_20170516_1518'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='workbase', 16 | name='title', 17 | field=models.CharField(help_text=b'The official title of this object. Includes series title when appropriate.', max_length=511), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/migrations/0028_auto_20170523_1141.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | import edtf.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('gk_collections_work_creator', '0027_auto_20170518_1611'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='workbase', 17 | name='external_ref', 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/contrib/work_creator/migrations/__init__.py -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/contrib/work_creator/plugins/__init__.py -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/artwork/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/artwork/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = 'gk_collections_artwork' 7 | verbose_name = "Artwork" -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/artwork/migrations/0002_remove_artwork_department.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('gk_collections_artwork', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | # The add has been removed from initial migrations. 14 | # migrations.RemoveField( 15 | # model_name='artwork', 16 | # name='department', 17 | # ), 18 | ] 19 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/artwork/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/contrib/work_creator/plugins/artwork/migrations/__init__.py -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/artwork/work_type_plugins.py: -------------------------------------------------------------------------------- 1 | import models, admin 2 | from glamkit_collections.contrib.work_creator.admin import \ 3 | WorkChildModelPlugin 4 | 5 | class ArtworkPlugin(WorkChildModelPlugin): 6 | model = models.Artwork 7 | model_admin = admin.ArtworkAdmin 8 | sort_priority = 1 9 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/film/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/film/admin.py: -------------------------------------------------------------------------------- 1 | import models 2 | from django.contrib import admin 3 | from ..moving_image.admin import MovingImageWorkAdmin 4 | from icekit.content_collections.admin import TitleSlugAdmin 5 | 6 | class FilmAdmin(MovingImageWorkAdmin): 7 | fieldsets = MovingImageWorkAdmin.fieldsets[0:3] + ( 8 | ('Film', { 9 | 'fields': ( 10 | 'formats', 11 | ) 12 | }), 13 | ) + MovingImageWorkAdmin.fieldsets[3:] 14 | filter_horizontal = ('formats',) 15 | 16 | admin.site.register(models.Format, TitleSlugAdmin) 17 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/film/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = 'gk_collections_film' 7 | verbose_name = "Film" -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/film/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/contrib/work_creator/plugins/film/migrations/__init__.py -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/film/work_type_plugins.py: -------------------------------------------------------------------------------- 1 | import models, admin 2 | from glamkit_collections.contrib.work_creator.admin import \ 3 | WorkChildModelPlugin 4 | 5 | class FilmPlugin(WorkChildModelPlugin): 6 | model = models.Film 7 | model_admin = admin.FilmAdmin 8 | sort_priority = 1 9 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/game/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/game/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = 'gk_collections_game' 7 | verbose_name = "Game" -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/game/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/contrib/work_creator/plugins/game/migrations/__init__.py -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/game/work_type_plugins.py: -------------------------------------------------------------------------------- 1 | import models, admin 2 | from glamkit_collections.contrib.work_creator.admin import \ 3 | WorkChildModelPlugin 4 | 5 | class GamePlugin(WorkChildModelPlugin): 6 | model = models.Game 7 | model_admin = admin.GameAdmin 8 | sort_priority = 2 9 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/links/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/links/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "gk_collections_links" 7 | verbose_name = 'Links' 8 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/links/content_plugins.py: -------------------------------------------------------------------------------- 1 | from icekit.plugins.links.abstract_models import LinkPlugin 2 | from . import models 3 | from fluent_contents.extensions import plugin_pool 4 | 5 | 6 | @plugin_pool.register 7 | class WorkLinkPlugin(LinkPlugin): 8 | model = models.WorkLink 9 | 10 | 11 | @plugin_pool.register 12 | class CreatorLinkPlugin(LinkPlugin): 13 | model = models.CreatorLink 14 | 15 | 16 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/links/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/contrib/work_creator/plugins/links/migrations/__init__.py -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/links/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from icekit.plugins.links.abstract_models import AbstractLinkItem 3 | 4 | 5 | class WorkLink(AbstractLinkItem): 6 | item = models.ForeignKey("gk_collections_work_creator.WorkBase") 7 | 8 | class Meta: 9 | verbose_name = "Work link" 10 | 11 | 12 | class CreatorLink(AbstractLinkItem): 13 | item = models.ForeignKey("gk_collections_work_creator.CreatorBase", on_delete=models.CASCADE) 14 | 15 | class Meta: 16 | verbose_name = "Creator link" 17 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/moving_image/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/moving_image/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = 'gk_collections_moving_image' 7 | verbose_name = "Moving image" -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/moving_image/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/contrib/work_creator/plugins/moving_image/migrations/__init__.py -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/moving_image/work_type_plugins.py: -------------------------------------------------------------------------------- 1 | import models, admin 2 | from glamkit_collections.contrib.work_creator.admin import \ 3 | WorkChildModelPlugin 4 | 5 | class MovingImagePlugin(WorkChildModelPlugin): 6 | model = models.MovingImageWork 7 | model_admin = admin.MovingImageWorkAdmin 8 | sort_priority = 10 9 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/organization/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/organization/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = 'gk_collections_organization' 7 | verbose_name = "Organization" -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/organization/creator_type_plugins.py: -------------------------------------------------------------------------------- 1 | import models 2 | from glamkit_collections.contrib.work_creator.admin import \ 3 | CreatorChildModelPlugin 4 | 5 | class OrganizationCreatorPlugin(CreatorChildModelPlugin): 6 | model = models.OrganizationCreator 7 | sort_priority = 10 8 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/organization/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/contrib/work_creator/plugins/organization/migrations/__init__.py -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/organization/models.py: -------------------------------------------------------------------------------- 1 | from glamkit_collections.contrib.work_creator.models import CreatorBase 2 | 3 | 4 | class OrganizationCreator(CreatorBase): 5 | class Meta: 6 | verbose_name = "organization" 7 | 8 | def get_type(self): 9 | roles = self.get_primary_roles() 10 | if roles: 11 | return roles[0].role.title 12 | return "company" 13 | 14 | def get_type_plural(self): 15 | roles = self.get_primary_roles() 16 | if roles: 17 | return roles[0].role.get_plural() 18 | return "companies" 19 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/person/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/person/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = 'gk_collections_person' 7 | verbose_name = "Person" -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/person/creator_type_plugins.py: -------------------------------------------------------------------------------- 1 | import models 2 | from glamkit_collections.contrib.work_creator.admin import \ 3 | CreatorChildModelPlugin 4 | 5 | class PersonCreatorPlugin(CreatorChildModelPlugin): 6 | model = models.PersonCreator 7 | sort_priority = 1 8 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/person/migrations/0002_remove_personcreator_name_full.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('gk_collections_person', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | # No-op, see migrations 0001 for explanation 15 | # migrations.RemoveField( 16 | # model_name='personcreator', 17 | # name='name_full', 18 | # ), 19 | ] 20 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/plugins/person/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/contrib/work_creator/plugins/person/migrations/__init__.py -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/search_indexes.py: -------------------------------------------------------------------------------- 1 | from haystack import indexes 2 | from icekit.utils.search import AbstractLayoutIndex 3 | from . import models 4 | 5 | class WorkIndex(AbstractLayoutIndex, indexes.Indexable): 6 | def get_model(self): 7 | return models.WorkBase 8 | 9 | class CreatorIndex(AbstractLayoutIndex, indexes.Indexable): 10 | def get_model(self): 11 | return models.CreatorBase 12 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/templates/gk_collections/creator.html: -------------------------------------------------------------------------------- 1 |

{{ page }}

2 | 3 | {% for work in page.get_works %} 4 | {# show unpublished works without links #} 5 | {% if work.is_visible %} 6 |
  • {{ work }}
  • 7 | {% else %} 8 |
  • {{ work.get_draft_payload }}
  • 9 | {% endif %} 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/templates/gk_collections/work.html: -------------------------------------------------------------------------------- 1 |

    {{ page }}

    2 | 3 | {% for creator in page.get_creators %} 4 | {# show unpublished creators without links #} 5 | {% if creator.is_visible %} 6 |
  • {{ creator }}
  • 7 | {% else %} 8 |
  • {{ creator.get_draft_payload }}
  • 9 | {% endif %} 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /glamkit_collections/contrib/work_creator/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URLconf for ``icekit_events`` app. 3 | """ 4 | 5 | # Prefix URL names with the app name. Avoid URL namespaces unless it is likely 6 | # this app will be installed multiple times in a single project. 7 | 8 | from django.conf.urls import url 9 | from . import views 10 | 11 | urlpatterns = [ 12 | url(r'^works/(?P[\w-]+)/$', 13 | views.work, name='gk_collections_work'), 14 | url(r'^creators/(?P[\w-]+)/$', 15 | views.creator, name='gk_collections_creator'), 16 | ] 17 | -------------------------------------------------------------------------------- /glamkit_collections/etl/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/etl/__init__.py -------------------------------------------------------------------------------- /glamkit_collections/etl/readme.rst: -------------------------------------------------------------------------------- 1 | Beginnings of factoring out an ETL pattern for repeatable data migration and sync in future. 2 | 3 | TODO: 4 | ===== 5 | Enable threads 6 | Make generic management command 7 | Helpers for extracting from/loading to: 8 | XML 9 | JSON 10 | Helpers for deleting destination models that weren't in the source data - set timestamp on a given property 11 | Django-admin-style "fields" to indicate simple transforms from source to destination 12 | Include data-cleansing tools 13 | Logging/debugging/analysis 14 | Cron job/supervisor helpers 15 | Tests! 16 | -------------------------------------------------------------------------------- /glamkit_collections/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/management/__init__.py -------------------------------------------------------------------------------- /glamkit_collections/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/management/commands/__init__.py -------------------------------------------------------------------------------- /glamkit_collections/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/migrations/__init__.py -------------------------------------------------------------------------------- /glamkit_collections/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_collections/utils/__init__.py -------------------------------------------------------------------------------- /glamkit_sponsors/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /glamkit_sponsors/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | class AppConfig(AppConfig): 4 | name = '.'.join(__name__.split('.')[:-1]) 5 | label = "glamkit_sponsors" 6 | verbose_name = "Sponsors" 7 | -------------------------------------------------------------------------------- /glamkit_sponsors/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/glamkit_sponsors/migrations/__init__.py -------------------------------------------------------------------------------- /glamkit_sponsors/templates/plugins/sponsor_block/begin.html: -------------------------------------------------------------------------------- 1 |
    {# avoid 'sponsors' in HTML due to adblockers #} 2 | {% if instance.text %}

    {{ instance.text|safe }}

    {% endif %} 3 |
    4 | {# closes in end.html #} 5 | -------------------------------------------------------------------------------- /glamkit_sponsors/templates/plugins/sponsor_block/end.html: -------------------------------------------------------------------------------- 1 |
    2 | {% if instance.text %}

    {{ instance.text|safe }}

    {% endif %} 3 |
    4 | -------------------------------------------------------------------------------- /icekit/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'icekit.apps.AppConfig' 2 | -------------------------------------------------------------------------------- /icekit/admin_forms.py: -------------------------------------------------------------------------------- 1 | import warnings 2 | 3 | warnings.warn( 4 | "the icekit.admin_forms module is deprecated. Use icekit.admin_tools.forms instead.", 5 | DeprecationWarning, 6 | stacklevel=2) 7 | 8 | 9 | from icekit.utils.deprecation import deprecated 10 | 11 | from icekit.admin_tools.forms import PasswordResetForm as new_PasswordResetForm 12 | 13 | @deprecated 14 | class PasswordResetForm(new_PasswordResetForm): 15 | """ 16 | .. deprecated:: 17 | Use :class:`icekit.admin_tools.forms.PasswordResetForm` instead. 18 | """ 19 | pass 20 | -------------------------------------------------------------------------------- /icekit/admin_tools/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | This module is named icekit.admin_tools in order not to clash with the 3 | existing icekit.admin, which registers admins for icekit.models. 4 | """ 5 | 6 | default_app_config = '%s.apps.AppConfig' % __name__ # Portable 7 | -------------------------------------------------------------------------------- /icekit/admin_tools/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) # Portable 6 | label = 'icekit_dashboard' 7 | 8 | verbose_name = 'Dashboard' 9 | -------------------------------------------------------------------------------- /icekit/admin_tools/models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/admin_tools/models.py -------------------------------------------------------------------------------- /icekit/admin_tools/static/admin/css/preview-field-admin.css: -------------------------------------------------------------------------------- 1 | form .preview-field .error { 2 | color: red; 3 | font-weight: bold; 4 | } 5 | 6 | form .preview-field .warning { 7 | color: orange; 8 | font-weight: bold; 9 | } 10 | 11 | form .preview-field ul { 12 | padding-left: 0; 13 | } 14 | 15 | form .preview-field ul li a { 16 | float: left; 17 | padding: 3px; 18 | margin-right: 3px; 19 | width: 156px; 20 | background-color: #fdfdfd; 21 | display: inline-block; 22 | text-align: center; 23 | } 24 | 25 | form .preview-field img { 26 | max-width: 150px; 27 | max-height: 150px; 28 | } 29 | -------------------------------------------------------------------------------- /icekit/admin_tools/static/admin/img/header-brand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/admin_tools/static/admin/img/header-brand.png -------------------------------------------------------------------------------- /icekit/admin_tools/templates/admin/dashboard_widgets/_widget.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    {% block title %}{{ title }}{% endblock %}

    4 | {# drag and drop handles, one day #} 5 | {% comment %} 6 |
      7 |
    • ×
    • 8 |
    • 9 |
    10 | {% endcomment %} 11 |
    12 | 13 | {% block content %} 14 | {% endblock %} 15 |
    16 | -------------------------------------------------------------------------------- /icekit/admin_tools/templates/admin/dashboard_widgets/_widget_assigned_to_link.html: -------------------------------------------------------------------------------- 1 | {% load i18n icekit_tags %} 2 |
  • 3 | {{ entry.content_object|admin_link }} 4 |
    5 | {% if entry.content_type %} 6 | {% filter capfirst %}{{ entry.content_type }}{% endfilter %} 7 | {% else %} 8 | {% trans 'Unknown content' %} 9 | {% endif %} 10 |
  • 11 | -------------------------------------------------------------------------------- /icekit/admin_tools/templates/admin/fluent_layouts_change_form.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/polymorphic/change_form.html" %} 2 | 3 | {% block extrahead %} 4 | {{ block.super }} 5 | 9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /icekit/admin_tools/templates/admin/password_reset_email.html: -------------------------------------------------------------------------------- 1 | {% autoescape off %} 2 | 3 | You're receiving this email because you requested a password reset for your user account at {{ site_name }}. 4 | 5 | Please go to the following page and choose a new password: 6 | 7 | {% block reset_link %} 8 | {{ protocol }}://{{ domain }}{% url 'admin_password_reset_confirm' uidb64=uid token=token %} 9 | {% endblock %} 10 | 11 | 12 | The {{ site_name }} team. 13 | 14 | {% endautoescape %} 15 | -------------------------------------------------------------------------------- /icekit/admin_tools/templates/icekit/admin/fluent_layouts_change_form.html: -------------------------------------------------------------------------------- 1 | The "icekit/admin/fluent_layouts_change_form.html" template has moved to 2 | "admin/fluent_layouts_change_form.html". Please update your references. 3 | -------------------------------------------------------------------------------- /icekit/admin_tools/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/admin_tools/templatetags/__init__.py -------------------------------------------------------------------------------- /icekit/api/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.APIConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/api/admin.py: -------------------------------------------------------------------------------- 1 | # Token admin for Django REST framework's `TokenAuthentication`, see 2 | # http://www.django-rest-framework.org/api-guide/authentication/#with-django-admin 3 | from rest_framework.authtoken.admin import TokenAdmin 4 | TokenAdmin.raw_id_fields = ('user',) 5 | -------------------------------------------------------------------------------- /icekit/api/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class APIConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) # Package with `apps` module 6 | label = '_'.join(__name__.split('.')[:-1]) 7 | verbose_name = 'ICEkitAPI' 8 | -------------------------------------------------------------------------------- /icekit/api/images/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/api/images/__init__.py -------------------------------------------------------------------------------- /icekit/api/media_category/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/api/media_category/__init__.py -------------------------------------------------------------------------------- /icekit/api/media_category/serializers.py: -------------------------------------------------------------------------------- 1 | from django.apps import apps 2 | 3 | from rest_framework import serializers 4 | from drf_queryfields import QueryFieldsMixin 5 | 6 | 7 | MediaCategory = apps.get_model('icekit.MediaCategory') 8 | 9 | 10 | class MediaCategorySerializer(QueryFieldsMixin, serializers.ModelSerializer): 11 | """ 12 | A serializer for an ICEkit MediaCategory. 13 | """ 14 | class Meta: 15 | model = MediaCategory 16 | fields = ['id', 'name'] 17 | -------------------------------------------------------------------------------- /icekit/api/pages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/api/pages/__init__.py -------------------------------------------------------------------------------- /icekit/appsettings.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | 3 | ICEKIT = getattr(settings, 'ICEKIT', {}) 4 | 5 | # Sources for `icekit.plugins.FileSystemLayoutPlugin`. 6 | LAYOUT_TEMPLATES = ICEKIT.get('LAYOUT_TEMPLATES', []) 7 | 8 | # File class referenced by `icekit.plugins.file.abstract_models.AbstractFileItem`. 9 | FILE_CLASS = ICEKIT.get('FILE_CLASS', 'icekit_plugins_file.File') 10 | 11 | DASHBOARD_FEATURED_APPS = ICEKIT.get('DASHBOARD_FEATURED_APPS', ()) 12 | DASHBOARD_SORTED_APPS = ICEKIT.get('DASHBOARD_SORTED_APPS', ()) 13 | -------------------------------------------------------------------------------- /icekit/bin/celery.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | export C_FORCE_ROOT=1 6 | 7 | exec celery --app=icekit.project worker --loglevel=INFO 8 | -------------------------------------------------------------------------------- /icekit/bin/celerybeat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | exec celery --app=icekit.project beat --loglevel=INFO -S djcelery.schedulers.DatabaseScheduler --pidfile= 6 | -------------------------------------------------------------------------------- /icekit/bin/celeryflower.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | exec celery --app=icekit.project flower 6 | -------------------------------------------------------------------------------- /icekit/bin/gunicorn.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # See: http://docs.gunicorn.org/en/stable/design.html#how-many-workers 6 | let "GUNICORN_WORKERS = ${GUNICORN_WORKERS:-${CPU_CORES:-1} * 2 + 1}" 7 | 8 | if [[ -n "${NEW_RELIC_ENVIRONMENT+1}" ]]; then 9 | exec newrelic-admin run-program gunicorn --bind 0.0.0.0:8080 --timeout "${GUNICORN_TIMEOUT:-60}" --workers "$GUNICORN_WORKERS" "${@:-icekit.project.wsgi:application}" 10 | else 11 | exec gunicorn --bind 0.0.0.0:8080 --timeout "${GUNICORN_TIMEOUT:-60}" --workers "$GUNICORN_WORKERS" "${@:-icekit.project.wsgi:application}" 12 | fi 13 | -------------------------------------------------------------------------------- /icekit/bin/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os 4 | import sys 5 | 6 | if __name__ == "__main__": 7 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "icekit.project.settings") 8 | 9 | from django.core.management import execute_from_command_line 10 | 11 | execute_from_command_line(sys.argv) 12 | -------------------------------------------------------------------------------- /icekit/bin/migrate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Apply Django migrations, if they are out of date. 4 | 5 | cat < "$DIR/migrate.txt" 17 | 18 | if [[ ! -s "$DIR/migrate.txt.md5" ]] || ! md5sum --status -c "$DIR/migrate.txt.md5" > /dev/null 2>&1; then 19 | echo 'Migrations are out of date.' 20 | manage.py migrate --noinput 21 | manage.py migrate --list > "$DIR/migrate.txt" 22 | md5sum "$DIR/migrate.txt" > "$DIR/migrate.txt.md5" 23 | fi 24 | -------------------------------------------------------------------------------- /icekit/bin/nginx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # See: http://nginx.org/en/docs/ngx_core_module.html#worker_processes 6 | NGINX_WORKER_PROCESSES="${NGINX_WORKER_PROCESSES:-${CPU_CORES:-1}}" 7 | 8 | exec nginx -c "$ICEKIT_DIR/etc/nginx.conf" -g "worker_processes $NGINX_WORKER_PROCESSES;" "$@" 9 | -------------------------------------------------------------------------------- /icekit/bin/runserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | exec manage.py runserver "${@:-0.0.0.0:8000}" 6 | -------------------------------------------------------------------------------- /icekit/bin/supervisorctl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | exec supervisorctl --configuration "$ICEKIT_DIR/etc/supervisord.conf" "$@" 6 | -------------------------------------------------------------------------------- /icekit/bin/supervisord.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | exec supervisord --configuration "$ICEKIT_DIR/etc/supervisord.conf" "$@" 6 | -------------------------------------------------------------------------------- /icekit/bin/transfer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | if [ $# -eq 0 ]; then 6 | cat <<-EOF 7 | Usage: 8 | $(basename "$0") /tmp/test.md 9 | cat /tmp/test.md | $(basename "$0") test.md 10 | EOF 11 | exit 1 12 | fi 13 | 14 | if tty -s; then 15 | BASENAME=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g') 16 | URL=$(cat "$1" | xz | gpg -aco - | curl --progress-bar --upload-file - "https://transfer.sh/$BASENAME") 17 | else 18 | URL=$(xz - | gpg -aco - | curl --progress-bar --upload-file - "https://transfer.sh/$1") 19 | fi 20 | 21 | cat < $BASENAME 24 | EOF 25 | -------------------------------------------------------------------------------- /icekit/content_collections/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/content_collections/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | 4 | class TitleSlugAdmin(admin.ModelAdmin): 5 | prepopulated_fields = {"slug": ("title",)} 6 | search_fields = ('title', 'slug', 'id',) 7 | -------------------------------------------------------------------------------- /icekit/content_collections/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | class AppConfig(AppConfig): 4 | name = '.'.join(__name__.split('.')[:-1]) 5 | label = "icekit_content_collections" 6 | -------------------------------------------------------------------------------- /icekit/etc/nginx.conf: -------------------------------------------------------------------------------- 1 | daemon off; 2 | 3 | error_log /dev/stderr; 4 | 5 | events {} 6 | 7 | http { 8 | access_log /dev/stdout; 9 | 10 | client_max_body_size 500m; 11 | 12 | proxy_set_header Host $http_host; 13 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 14 | proxy_set_header X-Real-IP $remote_addr; 15 | 16 | server { 17 | listen 8000; 18 | 19 | location / { 20 | proxy_pass http://127.0.0.1:8080; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /icekit/etc/supervisord-django.conf: -------------------------------------------------------------------------------- 1 | [program:nginx] 2 | autorestart = true 3 | autostart = true 4 | command = %(ENV_ICEKIT_DIR)s/bin/nginx.sh 5 | killasgroup = true 6 | stderr_logfile = /dev/stderr 7 | stderr_logfile_maxbytes = 0 8 | stdout_logfile = /dev/stdout 9 | stdout_logfile_maxbytes = 0 10 | 11 | [program:gunicorn] 12 | autorestart = true 13 | autostart = true 14 | command = %(ENV_ICEKIT_DIR)s/bin/gunicorn.sh 15 | killasgroup = true 16 | stderr_logfile = /dev/stderr 17 | stderr_logfile_maxbytes = 0 18 | stdout_logfile = /dev/stdout 19 | stdout_logfile_maxbytes = 0 20 | -------------------------------------------------------------------------------- /icekit/etc/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | logfile = /dev/null 3 | nodaemon = true 4 | pidfile = %(ENV_ICEKIT_PROJECT_DIR)s/var/supervisord.pid 5 | 6 | [inet_http_server] 7 | port = *:9001 8 | 9 | [rpcinterface:supervisor] 10 | supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface 11 | 12 | [supervisorctl] 13 | history_file = %(ENV_ICEKIT_PROJECT_DIR)s/var/supervisord.history 14 | 15 | [include] 16 | files = %(ENV_SUPERVISORD_CONFIG_INCLUDE)s 17 | -------------------------------------------------------------------------------- /icekit/formats/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/formats/__init__.py -------------------------------------------------------------------------------- /icekit/formats/en/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/formats/en/__init__.py -------------------------------------------------------------------------------- /icekit/integration/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/integration/__init__.py -------------------------------------------------------------------------------- /icekit/integration/reversion/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/integration/reversion/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = 'icekit_integration_reversion' 7 | verbose_name = 'ICEkit Reversion Integration' 8 | -------------------------------------------------------------------------------- /icekit/integration/reversion/templates/admin/fluent_pages/page/change_list.html: -------------------------------------------------------------------------------- 1 | {% extends "fluent_pages:admin/fluent_pages/page/change_list.html" %} 2 | 3 | {% comment %} 4 | Add blocks from `reversion/change_list.html`. 5 | {% endcomment %} 6 | 7 | {% load i18n admin_urls %} 8 | 9 | {% block object-tools-items %} 10 | {% if not is_popup and has_add_permission and has_change_permission %} 11 |
  • {% blocktrans with cl.opts.verbose_name_plural|escape as name %}Recover deleted {{name}}{% endblocktrans %}
  • 12 | {% endif %} 13 | {{block.super}} 14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /icekit/layouts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/layouts/__init__.py -------------------------------------------------------------------------------- /icekit/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/management/__init__.py -------------------------------------------------------------------------------- /icekit/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/management/commands/__init__.py -------------------------------------------------------------------------------- /icekit/migrations/0003_layout_content_types.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('contenttypes', '0001_initial'), 11 | ('icekit', '0002_layout'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='layout', 17 | name='content_types', 18 | field=models.ManyToManyField(to='contenttypes.ContentType'), 19 | preserve_default=True, 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /icekit/migrations/0004_auto_20150611_2044.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit', '0003_layout_content_types'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='layout', 16 | name='content_types', 17 | field=models.ManyToManyField(help_text=b'Types of content for which this layout will be allowed.', to='contenttypes.ContentType'), 18 | preserve_default=True, 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /icekit/migrations/0005_remove_layout_key.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit', '0004_auto_20150611_2044'), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name='layout', 16 | name='key', 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/migrations/0006_auto_20150911_0744.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | import icekit.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('icekit', '0005_remove_layout_key'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='layout', 17 | name='template_name', 18 | field=icekit.fields.TemplateNameField(unique=True, max_length=255, verbose_name='template', choices=[(b'', b'')]), 19 | preserve_default=True, 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /icekit/migrations/0007_auto_20170310_1220.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit', '0006_auto_20150911_0744'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='mediacategory', 16 | options={'verbose_name_plural': 'Asset categories', 'verbose_name': 'Asset category'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | try: 2 | from django.db import migrations 3 | except ImportError: 4 | from django.core.exceptions import ImproperlyConfigured 5 | raise ImproperlyConfigured( 6 | 'These migrations are for use with Django 1.7 and above. For Django ' 7 | '1.6 and below, upgrade to South 1.0.') 8 | -------------------------------------------------------------------------------- /icekit/navigation/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/navigation/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from fluent_contents.admin import PlaceholderFieldAdmin 3 | from icekit.navigation.models import Navigation 4 | 5 | 6 | class NavigationAdmin(PlaceholderFieldAdmin): 7 | prepopulated_fields = {'slug': ('name',), } 8 | list_display = ('name', 'slug',) 9 | search_fields = ('name', 'slug',) 10 | 11 | def has_change_permission(self, request, obj=None): 12 | return request.user.is_superuser 13 | 14 | def has_delete_permission(self, request, obj=None): 15 | return request.user.is_superuser 16 | 17 | admin.site.register(Navigation, NavigationAdmin) 18 | -------------------------------------------------------------------------------- /icekit/navigation/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = 'icekit_navigation' 7 | verbose_name = 'Navigation' 8 | -------------------------------------------------------------------------------- /icekit/navigation/content_plugins.py: -------------------------------------------------------------------------------- 1 | from fluent_contents.extensions import ContentPlugin, plugin_pool 2 | from icekit.navigation.models import NavigationItem, AccountsNavigationItem 3 | 4 | 5 | @plugin_pool.register 6 | class NavigationItemPlugin(ContentPlugin): 7 | model = NavigationItem 8 | category = 'Navigation' 9 | render_template = 'icekit/navigation/navigation_item.html' 10 | 11 | 12 | @plugin_pool.register 13 | class AccountsNavigationItemPlugin(ContentPlugin): 14 | model = AccountsNavigationItem 15 | category = 'Navigation' 16 | render_template = 'icekit/navigation/accounts_navigation_item.html' 17 | -------------------------------------------------------------------------------- /icekit/navigation/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/navigation/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/navigation/models.py: -------------------------------------------------------------------------------- 1 | from icekit.navigation.abstract_models import ( 2 | AbstractNavigation, AbstractNavigationItem, AbstractAccountsNavigationItem 3 | ) 4 | 5 | 6 | class Navigation(AbstractNavigation): 7 | pass 8 | 9 | 10 | class NavigationItem(AbstractNavigationItem): 11 | pass 12 | 13 | 14 | class AccountsNavigationItem(AbstractAccountsNavigationItem): 15 | pass 16 | -------------------------------------------------------------------------------- /icekit/navigation/templates/icekit/navigation/navigation_item.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /icekit/navigation/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/navigation/tests/__init__.py -------------------------------------------------------------------------------- /icekit/page_types/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/page_types/__init__.py -------------------------------------------------------------------------------- /icekit/page_types/article/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/page_types/article/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | from any_urlfield.forms import SimpleRawIdWidget 4 | 5 | from icekit.fields import ICEkitURLField 6 | 7 | 8 | class AppConfig(AppConfig): 9 | name = '.'.join(__name__.split('.')[:-1]) 10 | label = 'icekit_article' 11 | verbose_name = 'Articles' 12 | 13 | def ready(self): 14 | from .models import Article 15 | ICEkitURLField.register_model( 16 | Article, widget=SimpleRawIdWidget(Article), title='Article') 17 | -------------------------------------------------------------------------------- /icekit/page_types/article/migrations/0002_auto_20161019_1906.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_article', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='articlecategorypage', 16 | options={'verbose_name': 'Article category page'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/page_types/article/migrations/0006_auto_20161117_1800.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_article', '0005_add_hero'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='articlecategorypage', 16 | options={}, 17 | ), 18 | migrations.AlterModelTable( 19 | name='articlecategorypage', 20 | table='icekit_articlecategorypage', 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /icekit/page_types/article/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/page_types/article/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/page_types/article/page_type_plugins.py: -------------------------------------------------------------------------------- 1 | from fluent_pages.extensions import page_type_pool 2 | from icekit.content_collections.page_type_plugins import ListingPagePlugin 3 | 4 | from .models import ArticleCategoryPage 5 | 6 | 7 | @page_type_pool.register 8 | class ArticleCategoryPagePlugin(ListingPagePlugin): 9 | model = ArticleCategoryPage 10 | -------------------------------------------------------------------------------- /icekit/page_types/article/search_indexes.py: -------------------------------------------------------------------------------- 1 | from haystack import indexes 2 | from icekit.utils.search import AbstractLayoutIndex 3 | from . import models 4 | 5 | class ArticleIndex(AbstractLayoutIndex, indexes.Indexable): 6 | def get_model(self): 7 | return models.Article 8 | -------------------------------------------------------------------------------- /icekit/page_types/author/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/page_types/author/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | from any_urlfield.forms import SimpleRawIdWidget 4 | 5 | from icekit.fields import ICEkitURLField 6 | 7 | 8 | class AppConfig(AppConfig): 9 | name = '.'.join(__name__.split('.')[:-1]) 10 | label = 'icekit_authors' 11 | verbose_name = "Authors" 12 | 13 | def ready(self): 14 | from .models import Author 15 | ICEkitURLField.register_model( 16 | Author, widget=SimpleRawIdWidget(Author), title='Author') 17 | -------------------------------------------------------------------------------- /icekit/page_types/author/migrations/0005_auto_20161117_1824.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_authors', '0004_auto_20161117_1201'), 11 | ] 12 | 13 | operations = [ 14 | migrations.RenameField( 15 | model_name='author', 16 | old_name='introduction', 17 | new_name='oneliner', 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/page_types/author/migrations/0006_auto_20161117_1825.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_authors', '0005_auto_20161117_1824'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='author', 16 | name='oneliner', 17 | field=models.CharField(max_length=255, help_text='An introduction about the author used on list pages.', blank=True), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/page_types/author/migrations/0007_auto_20161125_1720.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_authors', '0006_auto_20161117_1825'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='authorlisting', 16 | options={}, 17 | ), 18 | migrations.AlterModelTable( 19 | name='authorlisting', 20 | table='icekit_authorlisting', 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /icekit/page_types/author/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/page_types/author/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/page_types/author/page_type_plugins.py: -------------------------------------------------------------------------------- 1 | from fluent_pages.extensions import page_type_pool 2 | from icekit.content_collections.page_type_plugins import ListingPagePlugin 3 | from .models import AuthorListing 4 | 5 | 6 | @page_type_pool.register 7 | class AuthorListingPlugin(ListingPagePlugin): 8 | model = AuthorListing 9 | sort_priority = 100 10 | -------------------------------------------------------------------------------- /icekit/page_types/author/search_indexes.py: -------------------------------------------------------------------------------- 1 | from haystack import indexes 2 | from icekit.utils.search import AbstractLayoutIndex 3 | from . import models 4 | 5 | class AuthorIndex(AbstractLayoutIndex, indexes.Indexable): 6 | def get_model(self): 7 | return models.Author 8 | -------------------------------------------------------------------------------- /icekit/page_types/author/templates/icekit_authors/admin/change_form.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/change_form.html" %} 2 | 3 | {% load wysiwyg %} 4 | 5 | {% block extrahead %} 6 | {{ block.super }} 7 | {% wysiwyg_setup %} 8 | {% endblock %} 9 | 10 | {% block content %} 11 | {{ block.super }} 12 | {% wysiwyg_editor "id_introduction" %} 13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /icekit/page_types/layout_page/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/page_types/layout_page/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "layout_page" 7 | verbose_name = 'Page' 8 | -------------------------------------------------------------------------------- /icekit/page_types/layout_page/migrations/0003_auto_20160810_1856.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('layout_page', '0002_auto_20160419_2209'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='layoutpage', 16 | options={'verbose_name': 'Layout page'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/page_types/layout_page/migrations/0005_auto_20161125_1709.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('layout_page', '0004_auto_20161110_1737'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelTable( 15 | name='layoutpage', 16 | table='icekit_layoutpage', 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/page_types/layout_page/migrations/0007_auto_20170509_1148.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('layout_page', '0006_auto_20161130_1109'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='layoutpage', 16 | options={'verbose_name': 'Page'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/page_types/layout_page/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/page_types/layout_page/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/page_types/layout_page/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | class LayoutPage(abstract_models.AbstractLayoutPage): 4 | 5 | class Meta: 6 | verbose_name = "Page" 7 | # Fluent prepends `pagetype_` to the db table. This seems to break 8 | # Django's inference of m2m table names during migrations, when the 9 | # m2m is defined on an abstract model that's mixed in. Instead we 10 | # give the table a name that's different from the default. 11 | # https://github.com/django-fluent/django-fluent-pages/issues/89 12 | db_table = "icekit_layoutpage" 13 | -------------------------------------------------------------------------------- /icekit/page_types/layout_page/page_type_plugins.py: -------------------------------------------------------------------------------- 1 | from fluent_pages.extensions import page_type_pool 2 | 3 | from . import admin, models 4 | from icekit.plugins import ICEkitFluentContentsPagePlugin 5 | 6 | 7 | # Register this plugin to the page plugin pool. 8 | @page_type_pool.register 9 | class LayoutPagePlugin(ICEkitFluentContentsPagePlugin): 10 | model = models.LayoutPage 11 | model_admin = admin.LayoutPageAdmin 12 | sort_priority = 1 13 | -------------------------------------------------------------------------------- /icekit/page_types/layout_page/templates/search/indexes/layout_page/layoutpage_text.txt: -------------------------------------------------------------------------------- 1 | {% load fluent_contents_tags search_tags %} 2 | {{ object.title }} 3 | {{ object.author.get_full_name }} 4 | {# As fluent requires a request object to process the page place holders we need to fake a request object here #} 5 | {% fake_request %} 6 | {% page_placeholder object "main" role="m" %} 7 | -------------------------------------------------------------------------------- /icekit/page_types/search_page/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/page_types/search_page/admin.py: -------------------------------------------------------------------------------- 1 | from fluent_pages.integration.fluent_contents.admin \ 2 | import FluentContentsPageAdmin 3 | 4 | from icekit.admin import ICEkitContentsAdmin 5 | 6 | 7 | class SearchPageAdmin(FluentContentsPageAdmin, ICEkitContentsAdmin): 8 | placeholder_layout_template = 'icekit/page_types/search_page/default.html' 9 | -------------------------------------------------------------------------------- /icekit/page_types/search_page/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "search_page" 7 | -------------------------------------------------------------------------------- /icekit/page_types/search_page/migrations/0003_auto_20160810_1856.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('search_page', '0002_auto_20160420_0029'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='searchpage', 16 | options={'verbose_name': 'Search page'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/page_types/search_page/migrations/0005_auto_20161125_1720.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('search_page', '0004_auto_20161122_2121'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='searchpage', 16 | options={}, 17 | ), 18 | migrations.AlterModelTable( 19 | name='searchpage', 20 | table='icekit_searchpage', 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /icekit/page_types/search_page/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/page_types/search_page/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/page_types/search_page/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class SearchPage(abstract_models.AbstractSearchPage): 5 | class Meta: 6 | db_table = "icekit_searchpage" -------------------------------------------------------------------------------- /icekit/plugins/brightcove/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/brightcove/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_plugins_brightcove" 7 | verbose_name = "Brightcove video" 8 | -------------------------------------------------------------------------------- /icekit/plugins/brightcove/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/brightcove/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/brightcove/templates/icekit/plugins/brightcove/default.html: -------------------------------------------------------------------------------- 1 | {% load brightcove %} 2 |
    3 |
    4 | {% brightcove_player instance.video.brightcove_id %} 5 |
    6 |
    7 | -------------------------------------------------------------------------------- /icekit/plugins/child_pages/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/child_pages/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_plugins_child_pages" 7 | verbose_name = "Child pages" 8 | -------------------------------------------------------------------------------- /icekit/plugins/child_pages/content_plugins.py: -------------------------------------------------------------------------------- 1 | """ 2 | Definition of the plugin. 3 | """ 4 | from django.utils.translation import ugettext_lazy as _ 5 | from fluent_contents.extensions import ContentPlugin, plugin_pool 6 | 7 | from . import models 8 | 9 | 10 | @plugin_pool.register 11 | class ChildPagesPlugin(ContentPlugin): 12 | model = models.ChildPageItem 13 | category = _('Navigation') 14 | render_template = 'icekit/plugins/child_pages/default.html' 15 | -------------------------------------------------------------------------------- /icekit/plugins/child_pages/migrations/0003_auto_20161123_1827.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_child_pages', '0002_auto_20160821_2140'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='childpageitem', 16 | options={'verbose_name': 'Child Pages'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/plugins/child_pages/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/child_pages/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/child_pages/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class ChildPageItem(abstract_models.AbstractChildPagesItem): 5 | pass 6 | -------------------------------------------------------------------------------- /icekit/plugins/child_pages/templates/icekit/plugins/child_pages/default.html: -------------------------------------------------------------------------------- 1 | {% if instance.get_child_pages %} 2 |
    3 | 12 |
    13 | {% endif %} 14 | -------------------------------------------------------------------------------- /icekit/plugins/contact_person/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/contact_person/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from . import models 4 | 5 | 6 | class ContactPersonAdmin(admin.ModelAdmin): 7 | pass 8 | 9 | admin.site.register(models.ContactPerson, ContactPersonAdmin) 10 | -------------------------------------------------------------------------------- /icekit/plugins/contact_person/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | class AppConfig(AppConfig): 4 | name = '.'.join(__name__.split('.')[:-1]) 5 | label = "icekit_plugins_contact_person" 6 | verbose_name = "Contact person" 7 | verbose_name_plural = "Contact people" 8 | -------------------------------------------------------------------------------- /icekit/plugins/contact_person/content_plugins.py: -------------------------------------------------------------------------------- 1 | from django.utils.translation import ugettext_lazy as _ 2 | from fluent_contents.extensions import plugin_pool, ContentPlugin 3 | from .models import ContactPersonItem 4 | 5 | 6 | @plugin_pool.register 7 | class ContactPersonPlugin(ContentPlugin): 8 | model = ContactPersonItem 9 | raw_id_fields = ('contact', ) 10 | render_template = 'icekit/plugins/contact_person/default.html' 11 | category = _('Assets') 12 | -------------------------------------------------------------------------------- /icekit/plugins/contact_person/migrations/0002_auto_20161110_1531.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_contact_person', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='contactpersonitem', 16 | options={'verbose_name': 'Contact Person'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/plugins/contact_person/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/contact_person/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/content_listing/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/content_listing/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_plugins_content_listing" 7 | verbose_name = "Collected Content Listing" 8 | -------------------------------------------------------------------------------- /icekit/plugins/content_listing/content_plugins.py: -------------------------------------------------------------------------------- 1 | """ 2 | Definition of the plugin. 3 | """ 4 | from django.utils.translation import ugettext_lazy as _ 5 | 6 | from fluent_contents.extensions import ContentPlugin, plugin_pool 7 | 8 | from . import forms, models 9 | 10 | 11 | @plugin_pool.register 12 | class ContentListingPlugin(ContentPlugin): 13 | model = models.ContentListingItem 14 | category = _('Assets') 15 | render_template = 'icekit/plugins/content_listing/default.html' 16 | form = forms.ContentListingAdminForm 17 | cache_output = False 18 | -------------------------------------------------------------------------------- /icekit/plugins/content_listing/migrations/0002_contentlistingitem_limit.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_content_listing', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='contentlistingitem', 16 | name='limit', 17 | field=models.IntegerField(help_text=b'How many items to show? No limit is applied if this field is not set', blank=True, null=True), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/plugins/content_listing/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/content_listing/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/content_listing/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class ContentListingItem(abstract_models.AbstractContentListingItem): 5 | """ 6 | An embedded listing of arbitrary content items. 7 | """ 8 | pass 9 | -------------------------------------------------------------------------------- /icekit/plugins/content_listing/templates/icekit/plugins/content_listing/_item.html: -------------------------------------------------------------------------------- 1 |
  • 2 | {{ item.title|safe }} 3 |
  • 4 | 5 | -------------------------------------------------------------------------------- /icekit/plugins/content_listing/templates/icekit/plugins/content_listing/default.html: -------------------------------------------------------------------------------- 1 |
    2 | {% for item in instance.get_items %} 3 | {% include "icekit/plugins/content_listing/_item.html" %} 4 | {% empty %} 5 |
  • {{ instance.no_items_message|default:"There are no items to show" }}
  • 6 | {% endfor %} 7 |
    8 | 9 | -------------------------------------------------------------------------------- /icekit/plugins/faq/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/faq/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_plugins_faq" 7 | verbose_name = "FAQs" 8 | -------------------------------------------------------------------------------- /icekit/plugins/faq/content_plugins.py: -------------------------------------------------------------------------------- 1 | """ 2 | Definition of the plugin. 3 | """ 4 | from django.utils.translation import ugettext_lazy as _ 5 | from fluent_contents.extensions import ContentPlugin, plugin_pool 6 | 7 | from . import models 8 | 9 | 10 | @plugin_pool.register 11 | class FAQPlugin(ContentPlugin): 12 | model = models.FAQItem 13 | category = _('Text') 14 | render_template = 'icekit/plugins/faq/default.html' 15 | -------------------------------------------------------------------------------- /icekit/plugins/faq/migrations/0003_auto_20160821_2140.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_faq', '0002_auto_20151013_1330'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelTable( 15 | name='faqitem', 16 | table='contentitem_icekit_plugins_faq_faqitem', 17 | ), 18 | migrations.RunSQL( 19 | "UPDATE django_content_type SET app_label='icekit_plugins_faq' WHERE app_label='faq';" 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /icekit/plugins/faq/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/faq/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/faq/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class FAQItem(abstract_models.AbstractFAQItem): 5 | """ 6 | A one off FAQ. 7 | """ 8 | pass 9 | -------------------------------------------------------------------------------- /icekit/plugins/faq/templates/icekit/plugins/faq/default.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | {{ instance.question|safe }} 4 |
    5 |
    6 | {{ instance.answer|safe }} 7 |
    8 |
    9 | -------------------------------------------------------------------------------- /icekit/plugins/file/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/file/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from . import models 4 | 5 | 6 | class FileAdmin(admin.ModelAdmin): 7 | filter_horizontal = ['categories', ] 8 | list_display = ['__str__', 'extension', 'file_size', 'is_active', ] 9 | list_filter = ['categories', 'is_active', ] 10 | search_fields = ['title', 'file', 'admin_notes', ] 11 | 12 | 13 | admin.site.register(models.File, FileAdmin) 14 | -------------------------------------------------------------------------------- /icekit/plugins/file/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_plugins_file" 7 | verbose_name = "File" 8 | -------------------------------------------------------------------------------- /icekit/plugins/file/content_plugins.py: -------------------------------------------------------------------------------- 1 | """ 2 | Definition of the plugin. 3 | """ 4 | from django.utils.translation import ugettext_lazy as _ 5 | from fluent_contents.extensions import ContentPlugin, plugin_pool 6 | 7 | from . import models 8 | 9 | 10 | @plugin_pool.register 11 | class FilePlugin(ContentPlugin): 12 | model = models.FileItem 13 | category = _('Assets') 14 | render_template = 'icekit/plugins/file/default.html' 15 | raw_id_fields = ['file', ] 16 | -------------------------------------------------------------------------------- /icekit/plugins/file/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/file/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/file/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class File(abstract_models.AbstractFile): 5 | """ 6 | A reusable file. 7 | """ 8 | pass 9 | 10 | 11 | class FileItem(abstract_models.AbstractFileItem): 12 | """ 13 | A file from the File model. 14 | """ 15 | pass 16 | -------------------------------------------------------------------------------- /icekit/plugins/file/templates/icekit/plugins/file/default.html: -------------------------------------------------------------------------------- 1 | {% block file %} 2 | {% if instance.file.is_active %} 3 |

    4 | 5 | 6 | {{ instance.file }}
    7 | 10 |
    11 |

    12 | {% endif %} 13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /icekit/plugins/horizontal_rule/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/horizontal_rule/abstract_models.py: -------------------------------------------------------------------------------- 1 | from django.utils.encoding import python_2_unicode_compatible 2 | from django.utils.translation import ugettext_lazy as _ 3 | from fluent_contents.models import ContentItem 4 | 5 | 6 | @python_2_unicode_compatible 7 | class AbstractHorizontalRuleItem(ContentItem): 8 | class Meta: 9 | abstract = True 10 | verbose_name = _('Horizontal Rule') 11 | 12 | def __str__(self): 13 | return 'Horizontal Rule' 14 | -------------------------------------------------------------------------------- /icekit/plugins/horizontal_rule/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_plugins_horizontal_rule" 7 | verbose_name = "Horizontal rule" 8 | -------------------------------------------------------------------------------- /icekit/plugins/horizontal_rule/content_plugins.py: -------------------------------------------------------------------------------- 1 | from django.utils.translation import ugettext_lazy as _ 2 | from fluent_contents.extensions import plugin_pool, ContentPlugin 3 | 4 | from . import models 5 | 6 | 7 | @plugin_pool.register 8 | class HorizontalRulePlugin(ContentPlugin): 9 | model = models.HorizontalRuleItem 10 | render_template = 'icekit/plugins/horizontal_rule/default.html' 11 | category = _('Text') 12 | -------------------------------------------------------------------------------- /icekit/plugins/horizontal_rule/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/horizontal_rule/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/horizontal_rule/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class HorizontalRuleItem(abstract_models.AbstractHorizontalRuleItem): 5 | pass 6 | -------------------------------------------------------------------------------- /icekit/plugins/horizontal_rule/templates/icekit/plugins/horizontal_rule/default.html: -------------------------------------------------------------------------------- 1 |
    2 | -------------------------------------------------------------------------------- /icekit/plugins/iiif/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/iiif/appsettings.py: -------------------------------------------------------------------------------- 1 | # Configuration options for ``iiif`` app, refer to docs/topics/iiif.rst 2 | from django.conf import settings 3 | 4 | 5 | try: 6 | IIIF_STORAGE = settings.IIIF_STORAGE 7 | except AttributeError: 8 | IIIF_STORAGE = settings.DEFAULT_FILE_STORAGE 9 | -------------------------------------------------------------------------------- /icekit/plugins/iiif/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import include, patterns, url 2 | 3 | from .views import iiif_image_api_info, iiif_image_api 4 | 5 | urlpatterns = patterns( 6 | '', 7 | url( 8 | r'(?P.+)/info.json', 9 | iiif_image_api_info, 10 | name='iiif_image_api_info', 11 | ), 12 | url( 13 | r'(?P[^/]+)/(?P[^/]+)' 14 | r'/(?P[^/]+)/(?P[^/]+)' 15 | r'/(?P[^.]+).(?P.+)', 16 | iiif_image_api, 17 | name='iiif_image_api', 18 | ), 19 | ) 20 | -------------------------------------------------------------------------------- /icekit/plugins/image/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/image/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = 'icekit_plugins_image' 7 | verbose_name = "Image" 8 | -------------------------------------------------------------------------------- /icekit/plugins/image/migrations/0002_auto_20150527_0022.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_image', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='imageitem', 16 | options={'verbose_name': 'Reusable image', 'verbose_name_plural': 'Reusable images'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/plugins/image/migrations/0003_auto_20150623_0115.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_image', '0002_auto_20150527_0022'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='imageitem', 16 | options={'verbose_name': 'Image', 'verbose_name_plural': 'Images'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/plugins/image/migrations/0005_imageitem_caption_override.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_image', '0004_auto_20151001_2023'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='imageitem', 16 | name='caption_override', 17 | field=models.TextField(blank=True), 18 | preserve_default=True, 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /icekit/plugins/image/migrations/0009_auto_20161026_2044.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_image', '0008_auto_20160920_2114'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='image', 16 | name='image', 17 | field=models.ImageField(verbose_name='Image file', upload_to=b'uploads/images/'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/plugins/image/migrations/0012_imagerepurposeconfig_is_cropping_allowed.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_image', '0011_auto_20170310_1853'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='imagerepurposeconfig', 16 | name='is_cropping_allowed', 17 | field=models.BooleanField(help_text=b'Can we crop the image to be exactly width x height?', default=False), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/plugins/image/migrations/0013_image_is_cropping_allowed.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_image', '0012_imagerepurposeconfig_is_cropping_allowed'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='image', 16 | name='is_cropping_allowed', 17 | field=models.BooleanField(help_text=b'Can this image be cropped?', default=False), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/plugins/image/migrations/0014_image_external_ref.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_image', '0013_image_is_cropping_allowed'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='image', 16 | name='external_ref', 17 | field=models.CharField(max_length=255, help_text='The reference for this image in a 3rd-party system', blank=True), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/plugins/image/migrations/0016_auto_20170316_2021.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_image', '0015_auto_20170310_2004'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /icekit/plugins/image/migrations/0017_auto_20170314_1352.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_image', '0016_auto_20170314_1306'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='imagerepurposeconfig', 16 | options={'ordering': ('id',), 'verbose_name': 'Image derivative'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/plugins/image/migrations/0018_auto_20170314_1401.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_image', '0017_auto_20170314_1352'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /icekit/plugins/image/migrations/0019_merge.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_image', '0016_auto_20170316_2021'), 11 | ('icekit_plugins_image', '0018_auto_20170314_1401'), 12 | ] 13 | 14 | operations = [ 15 | ] 16 | -------------------------------------------------------------------------------- /icekit/plugins/image/migrations/0020_auto_20170317_1655.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_image', '0019_merge'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='imagerepurposeconfig', 16 | options={'verbose_name': 'Image derivative'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/plugins/image/migrations/0022_auto_20170622_1024.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_image', '0021_merge'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='image', 16 | name='external_ref', 17 | field=models.CharField(blank=True, help_text='The reference for this image in a 3rd-party system', max_length=1024), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/plugins/image/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/image/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/image/templates/icekit/plugins/image/_caption.html: -------------------------------------------------------------------------------- 1 | {# used on the front end AND to preview in admin #} 2 | {% if instance.caption or instance.title %} 3 |
    4 | {% if instance.title %}

    {{ instance.title }}

    {% endif %} 5 | {% if instance.credit %}

    {{ instance.credit }}

    {% endif %} 6 | {% if instance.caption %}

    {{ instance.caption }}

    {% endif %} 7 |
    8 | {% endif %} 9 | -------------------------------------------------------------------------------- /icekit/plugins/image/templates/icekit/plugins/image/default.html: -------------------------------------------------------------------------------- 1 | {% block image %} 2 | {% load thumbnail %} 3 | {% thumbnail instance.image.image "content_image" as thumb %} 4 |
    5 |
    6 | {{ instance.image.alt_text }} 7 |
    8 | {% include instance.caption_template %} 9 |
    10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /icekit/plugins/image/templates/image/admin/change_form.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/change_form.html" %} 2 | {% load wysiwyg %} 3 | 4 | {% block extrahead %} 5 | {{ block.super }} 6 | {% wysiwyg_setup %} 7 | {% endblock %} 8 | 9 | {% block extrastyle %} 10 | {{ block.super }} 11 | {% endblock %} 12 | 13 | {% block content %} 14 | {{ block.super }} 15 | {% wysiwyg_editor "id_caption" %} 16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /icekit/plugins/image_gallery/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/image_gallery/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/image_gallery/content_plugins.py: -------------------------------------------------------------------------------- 1 | """ 2 | Definition of the plugin. 3 | """ 4 | from django.utils.translation import ugettext_lazy as _ 5 | from fluent_contents.extensions import ContentPlugin, plugin_pool 6 | 7 | from . import models 8 | 9 | 10 | @plugin_pool.register 11 | class ImageGalleryPlugin(ContentPlugin): 12 | model = models.ImageGalleryShowItem 13 | category = _('Assets') 14 | render_template = 'icekit/plugins/image_gallery/default.html' 15 | raw_id_fields = ['slide_show', ] 16 | 17 | class FrontendMedia: 18 | js = ( 19 | 'icekit/plugins/image_gallery/init.js', 20 | ) 21 | -------------------------------------------------------------------------------- /icekit/plugins/image_gallery/migrations/0002_auto_20160927_2305.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('image_gallery', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='imagegalleryshowitem', 16 | name='slide_show', 17 | field=models.ForeignKey(help_text='An image gallery.', to='icekit_plugins_slideshow.SlideShow'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/plugins/image_gallery/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/image_gallery/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/image_gallery/models.py: -------------------------------------------------------------------------------- 1 | from django.utils.translation import ugettext_lazy as _ 2 | from ..slideshow import abstract_models 3 | 4 | 5 | class ImageGalleryShowItem(abstract_models.AbstractSlideShowItem): 6 | """ 7 | An image gallery from the SlideShow model. 8 | """ 9 | class Meta: 10 | verbose_name = _('Image Gallery') 11 | verbose_name_plural = _('Image Galleries') 12 | -------------------------------------------------------------------------------- /icekit/plugins/image_gallery/static/icekit/plugins/image_gallery/init.js: -------------------------------------------------------------------------------- 1 | // no js by default, but the file is specified so that projects can easily 2 | // provide their own 3 | -------------------------------------------------------------------------------- /icekit/plugins/image_gallery/templates/icekit/plugins/image_gallery/admin/change_form.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/change_form.html" %} 2 | 3 | {% load wysiwyg %} 4 | 5 | {% block extrahead %} 6 | 7 | {{ block.super }} 8 | 9 | {% wysiwyg_setup %} 10 | 11 | {% endblock %} 12 | 13 | {% block extrastyle %} 14 | 15 | {{ block.super }} 16 | 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /icekit/plugins/instagram_embed/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/instagram_embed/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_plugins_instagram_embed" 7 | verbose_name = "Instagram embed" 8 | -------------------------------------------------------------------------------- /icekit/plugins/instagram_embed/forms.py: -------------------------------------------------------------------------------- 1 | import re 2 | from django import forms 3 | from fluent_contents.forms import ContentItemForm 4 | 5 | 6 | class InstagramEmbedAdminForm(ContentItemForm): 7 | 8 | def clean_url(self): 9 | """ 10 | Make sure the URL provided matches the instagram URL format. 11 | """ 12 | url = self.cleaned_data['url'] 13 | 14 | if url: 15 | pattern = re.compile(r'https?://(www\.)?instagr(\.am|am\.com)/p/\S+') 16 | if not pattern.match(url): 17 | raise forms.ValidationError('Please provide a valid instagram link.') 18 | 19 | return url 20 | -------------------------------------------------------------------------------- /icekit/plugins/instagram_embed/migrations/0002_auto_20150723_1939.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_instagram_embed', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='instagramembeditem', 16 | name='url', 17 | field=models.URLField(verbose_name='URL'), 18 | preserve_default=True, 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /icekit/plugins/instagram_embed/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/instagram_embed/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/instagram_embed/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class InstagramEmbedItem(abstract_models.AbstractInstagramEmbedItem): 5 | """ 6 | An embeded instagram image. 7 | """ 8 | pass 9 | -------------------------------------------------------------------------------- /icekit/plugins/instagram_embed/templates/icekit/plugins/instagram_embed/default.html: -------------------------------------------------------------------------------- 1 |
    2 | {{ instance.get_default_embed }} 3 |
    4 | -------------------------------------------------------------------------------- /icekit/plugins/links/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/links/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "ik_links" 7 | verbose_name = 'Links' 8 | -------------------------------------------------------------------------------- /icekit/plugins/links/appsettings.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | 3 | ICEKIT = getattr(settings, 'ICEKIT', {}) 4 | 5 | RELATION_STYLE_CHOICES = ICEKIT.get('RELATION_STYLE_CHOICES', (("", "Normal"), )) -------------------------------------------------------------------------------- /icekit/plugins/links/managers.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | class LinkManager(models.Manager): 4 | def get_queryset(self): 5 | return super(LinkManager, self).get_queryset().select_related('item') 6 | LinkManager.use_for_related_fields = True 7 | -------------------------------------------------------------------------------- /icekit/plugins/links/migrations/0006_authorlink_exclude_from_contributions.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('ik_links', '0005_auto_20170511_1909'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='authorlink', 16 | name='exclude_from_contributions', 17 | field=models.BooleanField(default=False, help_text=b"Exclude this content from the author's contributions."), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/plugins/links/migrations/0007_authorlink_exclude_from_authorship.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('ik_links', '0006_authorlink_exclude_from_contributions'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='authorlink', 16 | name='exclude_from_authorship', 17 | field=models.BooleanField(default=False, help_text=b'Exclude this author from the list of authors on the page.'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/plugins/links/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/links/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/location/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/location/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = 'icekit_plugins_location' 7 | verbose_name = 'Location' 8 | -------------------------------------------------------------------------------- /icekit/plugins/location/content_plugins.py: -------------------------------------------------------------------------------- 1 | """ 2 | Definition of the plugin. 3 | """ 4 | from django.utils.translation import ugettext_lazy as _ 5 | from fluent_contents.extensions import ContentPlugin, plugin_pool 6 | 7 | from . import models 8 | 9 | 10 | @plugin_pool.register 11 | class LocationPlugin(ContentPlugin): 12 | model = models.LocationItem 13 | category = _('Assets') 14 | render_template = 'icekit/plugins/location/item.html' 15 | raw_id_fields = ['location', ] 16 | -------------------------------------------------------------------------------- /icekit/plugins/location/migrations/0006_auto_20171005_1525.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_location', '0005_auto_20170905_1136'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='location', 16 | options={'ordering': ('title',)}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/plugins/location/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/location/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/location/templates/icekit/plugins/location/item.html: -------------------------------------------------------------------------------- 1 | {% block location %} 2 | {% with visible_location=instance.location.get_visible %} 3 | {% if visible_location %} 4 |

    5 | 6 | {{ visible_location.title }}
    7 | 10 |
    11 |

    12 | {% endif %} 13 | {% endwith %} 14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /icekit/plugins/location/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import patterns, url 2 | 3 | from .views import index, location 4 | 5 | urlpatterns = patterns( 6 | '', 7 | url( 8 | r'(?P[\w-]+)/$', location, name='icekit_plugins_location_detail', 9 | ), 10 | url( 11 | r'$', index, name='icekit_plugins_location_index', 12 | ), 13 | ) 14 | -------------------------------------------------------------------------------- /icekit/plugins/map/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/map/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_plugins_map" 7 | verbose_name = "Map" 8 | -------------------------------------------------------------------------------- /icekit/plugins/map/content_plugins.py: -------------------------------------------------------------------------------- 1 | from django.utils.translation import ugettext_lazy as _ 2 | from fluent_contents.extensions import plugin_pool, ContentPlugin 3 | 4 | from . import models 5 | 6 | 7 | @plugin_pool.register 8 | class MapPlugin(ContentPlugin): 9 | model = models.MapItem 10 | render_template = 'icekit/plugins/map/embed.html' 11 | category = _('Assets') 12 | -------------------------------------------------------------------------------- /icekit/plugins/map/migrations/0002_auto_20160821_2140.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_map', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelTable( 15 | name='mapitem', 16 | table='contentitem_icekit_plugins_map_mapitem', 17 | ), 18 | migrations.RunSQL( 19 | "UPDATE django_content_type SET app_label='icekit_plugins_map' WHERE app_label='reusable_map';" 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /icekit/plugins/map/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/map/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/map/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class MapItem(abstract_models.AbstractMapItem): 5 | """ 6 | Embeds a Google Map inside an iframe from the Share URL. 7 | 8 | Rather than store the width/height in the DB, update the template 9 | used or override with CSS. 10 | """ 11 | pass 12 | -------------------------------------------------------------------------------- /icekit/plugins/map/templates/icekit/plugins/map/embed.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 | {{ instance.get_embed_code|safe }} 5 |
    6 |
    7 |
    8 | -------------------------------------------------------------------------------- /icekit/plugins/oembed_with_caption/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | 3 | -------------------------------------------------------------------------------- /icekit/plugins/oembed_with_caption/migrations/0003_oembedwithcaptionitem_is_16by9.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_oembed_with_caption', '0002_auto_20160821_2140'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='oembedwithcaptionitem', 16 | name='is_16by9', 17 | field=models.BooleanField(default=True, help_text=b'Render this content in a 16x9 box (as opposed to 4x3)'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/plugins/oembed_with_caption/migrations/0004_auto_20160919_2008.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_oembed_with_caption', '0003_oembedwithcaptionitem_is_16by9'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='oembedwithcaptionitem', 16 | name='is_16by9', 17 | field=models.BooleanField(default=True, help_text=b'Render this item in a 16x9 box (as opposed to 4x3)'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/plugins/oembed_with_caption/migrations/0005_auto_20161027_1711.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_oembed_with_caption', '0004_auto_20160919_2008'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelTable( 15 | name='oembedwithcaptionitem', 16 | table='contentitem_icekit_plugins_oembed_with_caption_oembedwithcaptionitem', 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/plugins/oembed_with_caption/migrations/0007_auto_20161110_1513.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_oembed_with_caption', '0006_auto_20161027_2330'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='oembedwithcaptionitem', 16 | options={ 17 | 'verbose_name': 'Embedded media', 18 | 'verbose_name_plural': 'Embedded media' 19 | }, 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /icekit/plugins/oembed_with_caption/migrations/0008_oembedwithcaptionitem_content_title.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_oembed_with_caption', '0007_auto_20161110_1513'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='oembedwithcaptionitem', 16 | name='content_title', 17 | field=models.CharField(blank=True, verbose_name=b'title', max_length=1000), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/plugins/oembed_with_caption/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/oembed_with_caption/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/oembed_with_caption/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class OEmbedWithCaptionItem(abstract_models.AbstractOEmbedWithCaptionItem): 5 | class Meta: 6 | db_table = "contentitem_oembed_with_caption_item" 7 | verbose_name = "Embedded media" 8 | verbose_name_plural = "Embedded media" -------------------------------------------------------------------------------- /icekit/plugins/oembed_with_caption/templates/icekit/plugins/oembed/default.html: -------------------------------------------------------------------------------- 1 |
    2 |
    {{ instance.html|safe }}
    3 | {% if instance.title or instance.caption %} 4 |
    5 | {% if instance.content_title %} 6 |

    {{ instance.content_title }}

    7 | {% endif %} 8 | {% if instance.caption %} 9 |

    {{ instance.caption|safe }}

    10 | {% endif %} 11 |
    12 | {% endif %} 13 |
    14 | -------------------------------------------------------------------------------- /icekit/plugins/oembeditem/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/page_anchor/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/page_anchor/abstract_models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.utils.encoding import python_2_unicode_compatible 3 | from django.utils.translation import ugettext_lazy as _ 4 | from fluent_contents.models import ContentItem 5 | 6 | 7 | @python_2_unicode_compatible 8 | class AbstractPageAnchorItem(ContentItem): 9 | anchor_name = models.CharField(max_length=60, help_text="ID to use for this section, e.g. `foo`, without the `#`. Link to it with `#foo`.") 10 | 11 | class Meta: 12 | abstract = True 13 | verbose_name = _('Page Anchor') 14 | 15 | def __str__(self): 16 | return self.anchor_name 17 | -------------------------------------------------------------------------------- /icekit/plugins/page_anchor/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_plugins_page_anchor" 7 | verbose_name = "Page anchor" 8 | -------------------------------------------------------------------------------- /icekit/plugins/page_anchor/content_plugins.py: -------------------------------------------------------------------------------- 1 | from django.utils.translation import ugettext_lazy as _ 2 | from fluent_contents.extensions import plugin_pool, ContentPlugin 3 | 4 | from . import models 5 | 6 | 7 | @plugin_pool.register 8 | class PageAnchorPlugin(ContentPlugin): 9 | model = models.PageAnchorItem 10 | render_template = 'icekit/plugins/page_anchor/default.html' 11 | category = _('Advanced') 12 | -------------------------------------------------------------------------------- /icekit/plugins/page_anchor/migrations/0003_auto_20161125_1538.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_page_anchor', '0002_auto_20160821_2140'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='pageanchoritem', 16 | name='anchor_name', 17 | field=models.CharField(help_text=b'ID to use for this section, e.g. `foo`. Link to it with `#foo`.', max_length=60), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/plugins/page_anchor/migrations/0004_auto_20161130_0741.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_page_anchor', '0003_auto_20161125_1538'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='pageanchoritem', 16 | name='anchor_name', 17 | field=models.CharField(help_text=b'ID to use for this section, e.g. `foo`, without the `#`. Link to it with `#foo`.', max_length=60), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/plugins/page_anchor/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/page_anchor/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/page_anchor/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class PageAnchorItem(abstract_models.AbstractPageAnchorItem): 5 | pass 6 | -------------------------------------------------------------------------------- /icekit/plugins/page_anchor/templates/icekit/plugins/page_anchor/default.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /icekit/plugins/page_anchor_list/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/page_anchor_list/abstract_models.py: -------------------------------------------------------------------------------- 1 | from django.utils.encoding import python_2_unicode_compatible 2 | from django.utils.translation import ugettext_lazy as _ 3 | from fluent_contents.models import ContentItem 4 | 5 | 6 | @python_2_unicode_compatible 7 | class AbstractPageAnchorListItem(ContentItem): 8 | class Meta: 9 | abstract = True 10 | verbose_name = _('Page Anchor List') 11 | 12 | def __str__(self): 13 | return 'Page Anchor List' 14 | 15 | def get_anchors(self): 16 | return self.parent.contentitem_set.filter(pageanchoritem__anchor_name__isnull=False) 17 | -------------------------------------------------------------------------------- /icekit/plugins/page_anchor_list/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_plugins_page_anchor_list" 7 | verbose_name = "Page anchor" 8 | -------------------------------------------------------------------------------- /icekit/plugins/page_anchor_list/content_plugins.py: -------------------------------------------------------------------------------- 1 | from django.utils.translation import ugettext_lazy as _ 2 | from fluent_contents.extensions import plugin_pool, ContentPlugin 3 | 4 | from . import models 5 | 6 | 7 | @plugin_pool.register 8 | class PageAnchorListPlugin(ContentPlugin): 9 | model = models.PageAnchorListItem 10 | render_template = 'icekit/plugins/page_anchor_list/default.html' 11 | category = _('Advanced') 12 | -------------------------------------------------------------------------------- /icekit/plugins/page_anchor_list/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/page_anchor_list/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/page_anchor_list/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class PageAnchorListItem(abstract_models.AbstractPageAnchorListItem): 5 | pass 6 | -------------------------------------------------------------------------------- /icekit/plugins/page_anchor_list/templates/icekit/plugins/page_anchor_list/default.html: -------------------------------------------------------------------------------- 1 |
    2 | {% for anchor in instance.get_anchors %} 3 | {{ anchor }} 4 | {% endfor %} 5 |
    6 | -------------------------------------------------------------------------------- /icekit/plugins/quote/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/quote/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_plugins_quote" 7 | verbose_name = "Quote" 8 | -------------------------------------------------------------------------------- /icekit/plugins/quote/migrations/0002_auto_20160821_2140.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_quote', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelTable( 15 | name='quoteitem', 16 | table='contentitem_icekit_plugins_quote_quoteitem', 17 | ), 18 | migrations.RunSQL( 19 | "UPDATE django_content_type SET app_label='icekit_plugins_quote' WHERE app_label='quote';" 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /icekit/plugins/quote/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/quote/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/quote/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class QuoteItem(abstract_models.AbstractQuoteItem): 5 | pass 6 | -------------------------------------------------------------------------------- /icekit/plugins/reusable_form/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/reusable_form/abstract_models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.utils.encoding import python_2_unicode_compatible 3 | from django.utils.translation import ugettext_lazy as _ 4 | from fluent_contents.models import ContentItem 5 | 6 | 7 | @python_2_unicode_compatible 8 | class AbstractFormItem(ContentItem): 9 | form = models.ForeignKey( 10 | 'forms.Form', 11 | on_delete=models.CASCADE, 12 | ) 13 | 14 | class Meta: 15 | abstract = True 16 | verbose_name = _('Form') 17 | 18 | def __str__(self): 19 | return self.form.title 20 | -------------------------------------------------------------------------------- /icekit/plugins/reusable_form/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_plugins_reusable_form" 7 | verbose_name = "Reusable form" 8 | -------------------------------------------------------------------------------- /icekit/plugins/reusable_form/content_plugins.py: -------------------------------------------------------------------------------- 1 | """ 2 | Definition of the plugin. 3 | """ 4 | from django.utils.translation import ugettext_lazy as _ 5 | from fluent_contents.extensions import ContentPlugin, plugin_pool 6 | 7 | from . import models 8 | 9 | 10 | @plugin_pool.register 11 | class FormPlugin(ContentPlugin): 12 | model = models.FormItem 13 | category = _('Forms') 14 | render_template = 'icekit/plugins/reusable_form/default.html' 15 | raw_id_fields = ['form', ] 16 | cache_output = False 17 | -------------------------------------------------------------------------------- /icekit/plugins/reusable_form/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/reusable_form/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/reusable_form/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class FormItem(abstract_models.AbstractFormItem): 5 | pass 6 | -------------------------------------------------------------------------------- /icekit/plugins/reusable_form/templates/icekit/plugins/reusable_form/default.html: -------------------------------------------------------------------------------- 1 | {% load forms_builder_tags %} 2 | 3 |
    4 | {% render_built_form instance.form %} 5 |
    6 | -------------------------------------------------------------------------------- /icekit/plugins/slideshow/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/slideshow/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_plugins_slideshow" 7 | verbose_name = "Image galleries" 8 | -------------------------------------------------------------------------------- /icekit/plugins/slideshow/appsettings.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | 3 | 4 | SLIDE_SHOW_CONTENT_PLUGINS = getattr( 5 | settings, 6 | 'ICEKIT_SLIDE_SHOWPLUGINS', 7 | ['ImagePlugin', ] 8 | ) 9 | -------------------------------------------------------------------------------- /icekit/plugins/slideshow/content_plugins.py: -------------------------------------------------------------------------------- 1 | """ 2 | Definition of the plugin. 3 | """ 4 | from django.utils.translation import ugettext_lazy as _ 5 | from fluent_contents.extensions import ContentPlugin, plugin_pool 6 | 7 | from . import models 8 | 9 | 10 | @plugin_pool.register 11 | class SlideShowPlugin(ContentPlugin): 12 | model = models.SlideShowItem 13 | category = _('Assets') 14 | render_template = 'icekit/plugins/slideshow/default.html' 15 | raw_id_fields = ['slide_show', ] 16 | -------------------------------------------------------------------------------- /icekit/plugins/slideshow/migrations/0002_auto_20150623_0115.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_plugins_slideshow', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='slideshowitem', 16 | options={'verbose_name': 'Slide show', 'verbose_name_plural': 'Slide shows'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit/plugins/slideshow/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/slideshow/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/slideshow/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class SlideShow(abstract_models.AbstractSlideShow): 5 | """ 6 | A reusable Slide Show. 7 | """ 8 | pass 9 | 10 | 11 | class SlideShowItem(abstract_models.AbstractSlideShowItem): 12 | """ 13 | An slide show from the SlideShow model. 14 | """ 15 | pass 16 | -------------------------------------------------------------------------------- /icekit/plugins/slideshow/templates/icekit/plugins/slideshow/admin/change_form.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/change_form.html" %} 2 | 3 | {% load wysiwyg %} 4 | 5 | {% block extrahead %} 6 | 7 | {{ block.super }} 8 | 9 | {% wysiwyg_setup %} 10 | 11 | {% endblock %} 12 | 13 | {% block extrastyle %} 14 | 15 | {{ block.super }} 16 | 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /icekit/plugins/text/__init__.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | from django.core.exceptions import ImproperlyConfigured 3 | 4 | VERSION = (0, 1) 5 | 6 | backendapp = 'django_wysiwyg' 7 | 8 | # Do some settings checks. 9 | if backendapp not in settings.INSTALLED_APPS: 10 | raise ImproperlyConfigured("The '{0}' application is required to use the '{1}' plugin.".format(backendapp, 'text')) 11 | 12 | try: 13 | import django_wysiwyg 14 | except ImportError: 15 | raise ImportError("The 'django-wysiwyg' package is required to use the 'text' plugin.") 16 | -------------------------------------------------------------------------------- /icekit/plugins/text/appsettings.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | 3 | FLUENT_TEXT_CLEAN_HTML = getattr(settings, "FLUENT_TEXT_CLEAN_HTML", False) 4 | FLUENT_TEXT_SANITIZE_HTML = getattr(settings, "FLUENT_TEXT_SANITIZE_HTML", False) 5 | 6 | ICEKIT = getattr(settings, 'ICEKIT', {}) 7 | 8 | TEXT_STYLE_CHOICES = ICEKIT.get('TEXT_STYLE_CHOICES', (('', 'Normal'),)) 9 | -------------------------------------------------------------------------------- /icekit/plugins/text/content_plugins.py: -------------------------------------------------------------------------------- 1 | """ 2 | Definition of the plugin. 3 | """ 4 | from django.utils.safestring import mark_safe 5 | from fluent_contents.extensions import ContentPlugin, plugin_pool 6 | from icekit.plugins.text.models import TextItem 7 | 8 | 9 | @plugin_pool.register 10 | class TextPlugin(ContentPlugin): 11 | model = TextItem 12 | admin_init_template = "icekit/plugins/text/admin/admin_init.html" # TODO: remove the need for this. 13 | admin_form_template = ContentPlugin.ADMIN_TEMPLATE_WITHOUT_LABELS 14 | render_template = 'icekit/plugins/text/default.html' 15 | -------------------------------------------------------------------------------- /icekit/plugins/text/migrations/0002_textitem_style.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | from icekit.plugins.text import appsettings 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('text', '0001_initial'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AddField( 17 | model_name='textitem', 18 | name='style', 19 | field=models.CharField(blank=True, max_length=255, choices=appsettings.TEXT_STYLE_CHOICES), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /icekit/plugins/text/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/text/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/text/templates/icekit/plugins/text/admin/admin_init.html: -------------------------------------------------------------------------------- 1 | {% load wysiwyg %} 2 | {% wysiwyg_setup %} 3 | -------------------------------------------------------------------------------- /icekit/plugins/text/templates/icekit/plugins/text/default.html: -------------------------------------------------------------------------------- 1 |
    2 | {% if instance.text.style %} 3 |
    {{ instance.text|safe }}
    4 | {% else %} 5 | {{ instance.text|safe }} 6 | {% endif %} 7 |
    8 | -------------------------------------------------------------------------------- /icekit/plugins/twitter_embed/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/plugins/twitter_embed/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_plugins_twitter_embed" 7 | verbose_name = "Twitter embed" 8 | -------------------------------------------------------------------------------- /icekit/plugins/twitter_embed/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/plugins/twitter_embed/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/plugins/twitter_embed/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class TwitterEmbedItem(abstract_models.AbstractTwitterEmbedItem): 5 | """ 6 | An embeded twitter tweet. 7 | """ 8 | pass 9 | -------------------------------------------------------------------------------- /icekit/plugins/twitter_embed/templates/icekit/plugins/twitter_embed/default.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /icekit/project/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # This will make sure the app is always imported when 4 | # Django starts so that shared_task will use this app. 5 | from .celery import app as celery_app # noqa 6 | -------------------------------------------------------------------------------- /icekit/project/context_processors.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | 3 | 4 | def environment(request=None): 5 | """ 6 | Return ``COMPRESS_ENABLED``, ``SITE_NAME``, and any settings listed 7 | in ``ICEKIT_CONTEXT_PROCESSOR_SETTINGS`` as context. 8 | """ 9 | context = { 10 | 'COMPRESS_ENABLED': settings.COMPRESS_ENABLED, 11 | 'SITE_NAME': settings.SITE_NAME, 12 | } 13 | for key in settings.ICEKIT_CONTEXT_PROCESSOR_SETTINGS: 14 | context[key] = getattr(settings, key, None) 15 | return context 16 | -------------------------------------------------------------------------------- /icekit/project/glamkit_urls.py: -------------------------------------------------------------------------------- 1 | import warnings 2 | from .urls import urlpatterns 3 | 4 | warnings.warn("icekit.project.glamkit_urls has been incorporated into icekit.urls. Use the latter instead.", DeprecationWarning) 5 | -------------------------------------------------------------------------------- /icekit/project/hosts.py: -------------------------------------------------------------------------------- 1 | from django_hosts import patterns, host 2 | from django.conf import settings 3 | 4 | host_patterns = patterns( 5 | '', 6 | host(r'www', settings.ROOT_URLCONF, name='www'), 7 | host(r'api', 'icekit.api.urls', name='api'), 8 | ) 9 | -------------------------------------------------------------------------------- /icekit/project/settings/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | try: 4 | try: 5 | # Local (override) project settings. 6 | from project_settings_local import * 7 | except ImportError: 8 | # Project settings. 9 | from project_settings import * 10 | except ImportError: 11 | # ICEkit settings. 12 | from .icekit import * 13 | -------------------------------------------------------------------------------- /icekit/project/settings/_develop.py: -------------------------------------------------------------------------------- 1 | from ._base import * 2 | 3 | SITE_PORT = 8000 4 | 5 | # DJANGO ###################################################################### 6 | 7 | ALLOWED_HOSTS = ('*', ) 8 | CACHES['default'].update({'BACKEND': 'redis_lock.django_cache.RedisCache'}) 9 | 10 | CSRF_COOKIE_SECURE = False # Don't require HTTPS for CSRF cookie 11 | SESSION_COOKIE_SECURE = False # Don't require HTTPS for session cookie 12 | 13 | DEBUG = True # Show detailed error pages when exceptions are raised 14 | 15 | # WSGI ################################################################## 16 | 17 | WSGI_WORKERS = 2 # Default: 2x CPU cores + 1 18 | -------------------------------------------------------------------------------- /icekit/project/settings/_tox.py: -------------------------------------------------------------------------------- 1 | from ._test import * 2 | 3 | # DJANGO ###################################################################### 4 | 5 | CACHES['default'].update({'BACKEND': 'redis_lock.django_cache.RedisCache'}) 6 | 7 | # CELERY ###################################################################### 8 | 9 | BROKER_URL = 'redis://%s/0' % REDIS_ADDRESS 10 | -------------------------------------------------------------------------------- /icekit/project/settings/glamkit.py: -------------------------------------------------------------------------------- 1 | import warnings 2 | 3 | from .calculated import * 4 | 5 | warnings.warn("ICEkit settings are default. Import settings.calculated instead.", DeprecationWarning) 6 | -------------------------------------------------------------------------------- /icekit/project/settings/icekit.py: -------------------------------------------------------------------------------- 1 | import warnings 2 | 3 | from .calculated import * 4 | 5 | warnings.warn("GLAMkit settings have been made default. Import settings.calculated instead.", DeprecationWarning) 6 | -------------------------------------------------------------------------------- /icekit/project/wsgi.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from django.core.wsgi import get_wsgi_application 4 | 5 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "icekit.project.settings") 6 | 7 | application = get_wsgi_application() 8 | -------------------------------------------------------------------------------- /icekit/publishing/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/publishing/static/publishing/publishing.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | var $ = django.jQuery; 3 | $(function() { 4 | $('input:checkbox.publish-checkbox').change(function() { 5 | var elem = $(this); 6 | if (elem.is(':checked')) { 7 | var url = elem.attr('data-publish'); 8 | } else { 9 | var url = elem.attr('data-unpublish'); 10 | } 11 | $.get(url, function(data) { 12 | if (data.success) { 13 | elem.parent().find('.published-icon img').toggle(); 14 | } 15 | }); 16 | }); 17 | }); 18 | })(); 19 | -------------------------------------------------------------------------------- /icekit/publishing/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/publishing/templatetags/__init__.py -------------------------------------------------------------------------------- /icekit/publishing/templatetags/publishing_tags.py: -------------------------------------------------------------------------------- 1 | from django import template 2 | 3 | from icekit.publishing import utils 4 | 5 | 6 | register = template.Library() 7 | 8 | 9 | @register.filter 10 | def get_draft_url(url): 11 | """ 12 | Return the given URL with a draft mode HMAC in its querystring. 13 | """ 14 | return utils.get_draft_url(url) 15 | -------------------------------------------------------------------------------- /icekit/response_pages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/response_pages/__init__.py -------------------------------------------------------------------------------- /icekit/response_pages/appsettings.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | 3 | 4 | # Configuration options for ``response_pages`` app. 5 | 6 | 7 | RESPONSE_PAGE_CONTENT_PLUGINS = getattr( 8 | settings, 9 | 'RESPONSE_PAGE_PLUGINS', 10 | ['ImagePlugin', 'TextPlugin', ] 11 | ) 12 | -------------------------------------------------------------------------------- /icekit/response_pages/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/response_pages/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/response_pages/models.py: -------------------------------------------------------------------------------- 1 | from . import abstract_models 2 | 3 | 4 | class ResponsePage(abstract_models.AbstractResponsePage): 5 | """ 6 | Response Pages are designed to be custom pages that allow the user 7 | to manage the content for pages such and 404 and 500. 8 | """ 9 | pass 10 | -------------------------------------------------------------------------------- /icekit/response_pages/templates/icekit/response_pages/404.html: -------------------------------------------------------------------------------- 1 | {% extends 'icekit/404.html' %} 2 | 3 | {% load fluent_contents_tags %} 4 | 5 | {% block title %}{{ page.title }}{% endblock %} 6 | 7 | {% block body %} 8 |
    9 |

    {{ page.title }}

    10 |
    11 | {% render_placeholder page.content %} 12 |
    13 |
    14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /icekit/response_pages/templates/icekit/response_pages/500.html: -------------------------------------------------------------------------------- 1 | {% extends 'icekit/500.html' %} 2 | 3 | {% load fluent_contents_tags %} 4 | 5 | {% block title %}{{ page.title }}{% endblock %} 6 | 7 | {% block body %} 8 |
    9 |

    {{ page.title }}

    10 | {% render_placeholder page.content %} 11 |
    12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /icekit/static/icekit/styles/icekit.scss: -------------------------------------------------------------------------------- 1 | @import "components/preview-ribbon"; 2 | // more features to come 3 | -------------------------------------------------------------------------------- /icekit/static/icekit/styles/site.scss: -------------------------------------------------------------------------------- 1 | .item-preview { 2 | position: relative; 3 | margin-top: 20px; 4 | } 5 | -------------------------------------------------------------------------------- /icekit/templates/base.html: -------------------------------------------------------------------------------- 1 | {% extends "icekit/base.html" %} 2 | -------------------------------------------------------------------------------- /icekit/templates/icekit/404.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}File Not Found (404){% endblock %} 4 | 5 | {% block body %} 6 |
    7 |

    File Not found (404)

    8 |
    9 |

    Sorry, but the page you were trying to view does not exist.

    10 |

    It looks like this was the result of either:

    11 |
      12 |
    • a mistyped address
    • 13 |
    • an out-of-date link
    • 14 |
    15 |
    16 |
    17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /icekit/templates/icekit/503.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Down for Maintenance (503){% endblock %} 4 | 5 | {% block body %} 6 |
    7 |

    We are Sorry, this site is currently down for maintenance!

    8 |

    Please check back soon!

    9 |
    10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /icekit/templates/icekit/auth/logged_out.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 | 7 |

    Thanks for spending some quality time with the Web site today. 8 |

    Log in again

    9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /icekit/templates/icekit/auth/password_change_done.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 | 7 | 8 |

    Your password was changed.

    9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /icekit/templates/icekit/auth/password_change_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% load bootstrap3 %} 4 | 5 | {% block content %} 6 | 9 |

    10 | Please enter your old password, for security's sake, and then enter your new 11 | password twice so we can verify you typed it in correctly. 12 |

    13 | 14 |
    15 | {% csrf_token %} 16 | {% bootstrap_form form %} 17 | 18 | 19 |
    20 | 21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /icekit/templates/icekit/auth/password_reset.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% load bootstrap3 %} 4 | 5 | {% block content %} 6 | 9 | 10 |

    11 | Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one. 12 |

    13 | 14 |
    15 | {% csrf_token %} 16 | {% bootstrap_form form %} 17 | 18 |
    19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /icekit/templates/icekit/auth/password_reset_complete.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 | 7 | 8 |

    9 | Your password has been set. You may go ahead and log in now. 10 |

    11 | 12 |

    13 | Log in 14 |

    15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /icekit/templates/icekit/auth/password_reset_done.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 | 7 | 8 |

    9 | We've emailed you instructions for setting your password, if an account exists with 10 | the email you entered. You should receive them shortly. 11 |

    12 | 13 |

    14 | If you don't receive an email, please make sure you've entered the address you registered 15 | with, and check your spam folder. 16 |

    17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /icekit/templates/icekit/auth/password_reset_email.html: -------------------------------------------------------------------------------- 1 | {% autoescape off %} 2 | 3 | You're receiving this email because you requested a password reset for your user account at {{ site_name }}. 4 | 5 | Please go to the following page and choose a new password: 6 | 7 | {% block reset_link %} 8 | {{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} 9 | {% endblock %} 10 | 11 | 12 | The {{ site_name }} team. 13 | 14 | {% endautoescape %} 15 | -------------------------------------------------------------------------------- /icekit/templates/icekit/auth/password_reset_subject.txt: -------------------------------------------------------------------------------- 1 | {% autoescape off %} 2 | Password reset on {{ site_name }} 3 | {% endautoescape %} 4 | -------------------------------------------------------------------------------- /icekit/templates/icekit/layouts/fallback_default.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | No layout has been selected. 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /icekit/templates/icekit/messages.html: -------------------------------------------------------------------------------- 1 | {% if messages %} 2 | {% for message in messages %} 3 | 6 | {% endfor %} 7 | {% endif %} 8 | -------------------------------------------------------------------------------- /icekit/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/templatetags/__init__.py -------------------------------------------------------------------------------- /icekit/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/tests/__init__.py -------------------------------------------------------------------------------- /icekit/tests/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/tests/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/tests/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% block title %}{% endblock %} 4 | 5 | 6 | {% block content %}{% endblock content %} 7 | {% block body_js %} 8 | {% block external_js %}{% endblock %} 9 | {% block base_js %}{% endblock %} 10 | {% block js %}{% endblock %} 11 | {% endblock %} 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /icekit/tests/templates/icekit/layouts/default.html: -------------------------------------------------------------------------------- 1 | {% load fluent_contents_tags %} 2 | 3 |

    {{ page.title }}

    4 | 5 | {% block content %} 6 | {% page_placeholder "main" role="m" %} 7 | {% endblock %} 8 | 9 | {% render_content_items_media %} 10 | -------------------------------------------------------------------------------- /icekit/tests/templates/layout_page/layoutpage/layouts/default.html: -------------------------------------------------------------------------------- 1 | {% load fluent_contents_tags %} 2 | 3 | {% page_placeholder "main" role="m" %} 4 | 5 | {% render_content_items_media %} 6 | -------------------------------------------------------------------------------- /icekit/tests/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import patterns, url, include 2 | from icekit.project.urls import urlpatterns 3 | 4 | urlpatterns = patterns( 5 | '', 6 | # API is made available at api.HOSTNAME domain by `icekit.project.hosts` 7 | # normally, but this is a massive PITA to get working for unit tests so 8 | # here we're punting and just using standard URL paths. 9 | url(r'^api/', include('icekit.api.urls')), 10 | 11 | url(r'^404/$', 'icekit.response_pages.views.page_not_found', name='404'), 12 | url(r'^500/$', 'icekit.response_pages.views.server_error', name='500'), 13 | url(r'^', include(urlpatterns)), 14 | ) 15 | -------------------------------------------------------------------------------- /icekit/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/utils/__init__.py -------------------------------------------------------------------------------- /icekit/utils/admin/__init__.py: -------------------------------------------------------------------------------- 1 | import warnings 2 | warnings.warn("the icekit.utils.admin module is deprecated. Use icekit.admin_tools.* instead.", DeprecationWarning, 3 | stacklevel=2) 4 | -------------------------------------------------------------------------------- /icekit/utils/api.py: -------------------------------------------------------------------------------- 1 | from rest_framework.permissions import DjangoModelPermissions 2 | 3 | 4 | custom_perms_map = DjangoModelPermissions.perms_map 5 | custom_perms_map.update({ 6 | 'GET': ['%(app_label)s.change_%(model_name)s'], 7 | 'OPTIONS': ['%(app_label)s.change_%(model_name)s'], 8 | 'HEAD': ['%(app_label)s.change_%(model_name)s'], 9 | }) 10 | 11 | 12 | class DjangoModelPermissionsRestrictedListing(DjangoModelPermissions): 13 | perms_map = custom_perms_map 14 | -------------------------------------------------------------------------------- /icekit/utils/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/utils/management/__init__.py -------------------------------------------------------------------------------- /icekit/utils/readability/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 2001-2011 NLTK Project 2 | 3 | Licensed under the Apache License, Version 2.0 (the 'License'); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an 'AS IS' BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /icekit/utils/readability/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/utils/readability/__init__.py -------------------------------------------------------------------------------- /icekit/utils/search/__init__.py: -------------------------------------------------------------------------------- 1 | from views import ICEkitSearchView 2 | from search_indexes import AbstractLayoutIndex -------------------------------------------------------------------------------- /icekit/utils/strings.py: -------------------------------------------------------------------------------- 1 | def is_empty(value): 2 | """ 3 | Return `True` if the given value is `None` or empty after `strip()` 4 | """ 5 | return value is None or not value.strip() 6 | -------------------------------------------------------------------------------- /icekit/workflow/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit/workflow/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = 'icekit_workflow' 7 | verbose_name = "Workflow" 8 | -------------------------------------------------------------------------------- /icekit/workflow/migrations/0003_auto_20161130_0741.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_workflow', '0002_auto_20161128_1105'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='workflowstate', 16 | name='status', 17 | field=models.CharField(choices=[(b'new', b'New'), (b'ready_to_review', b'Ready to review'), (b'approved', b'Approved')], default=b'new', max_length=254), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit/workflow/migrations/0004_auto_20170130_1146.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_workflow', '0003_auto_20161130_0741'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelTable( 15 | name='workflowstate', 16 | table=None, 17 | ), 18 | migrations.RunSQL( 19 | "UPDATE django_content_type SET app_label='icekit_workflow' WHERE app_label='workflow';" 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /icekit/workflow/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/workflow/migrations/__init__.py -------------------------------------------------------------------------------- /icekit/workflow/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit/workflow/templatetags/__init__.py -------------------------------------------------------------------------------- /icekit_events/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'icekit_events.apps.AppConfig' 2 | -------------------------------------------------------------------------------- /icekit_events/event_types/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/event_types/__init__.py -------------------------------------------------------------------------------- /icekit_events/event_types/simple/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit_events/event_types/simple/admin.py: -------------------------------------------------------------------------------- 1 | from icekit_events.admin import EventWithLayoutsAdmin 2 | from icekit.admin_tools.mixins import ListableMixinAdmin, HeroMixinAdmin 3 | 4 | 5 | class SimpleEventAdmin( 6 | EventWithLayoutsAdmin, 7 | ListableMixinAdmin, 8 | HeroMixinAdmin 9 | ): 10 | raw_id_fields = EventWithLayoutsAdmin.raw_id_fields + \ 11 | HeroMixinAdmin.raw_id_fields 12 | 13 | fieldsets = EventWithLayoutsAdmin.fieldsets + \ 14 | HeroMixinAdmin.FIELDSETS + \ 15 | ListableMixinAdmin.FIELDSETS 16 | -------------------------------------------------------------------------------- /icekit_events/event_types/simple/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_event_types_simple" 7 | verbose_name = "Events" 8 | -------------------------------------------------------------------------------- /icekit_events/event_types/simple/event_type_plugins.py: -------------------------------------------------------------------------------- 1 | from icekit_events.admin import EventChildModelPlugin 2 | 3 | import models 4 | import admin 5 | 6 | 7 | class BasicEventPlugin(EventChildModelPlugin): 8 | model = models.SimpleEvent 9 | model_admin = admin.SimpleEventAdmin 10 | sort_priority = 11 11 | -------------------------------------------------------------------------------- /icekit_events/event_types/simple/migrations/0003_auto_20161125_1701.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_event_types_simple', '0002_simpleevent_layout'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelTable( 15 | name='simpleevent', 16 | table=None, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit_events/event_types/simple/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/event_types/simple/migrations/__init__.py -------------------------------------------------------------------------------- /icekit_events/event_types/simple/models.py: -------------------------------------------------------------------------------- 1 | from icekit_events.models import AbstractEventWithLayouts 2 | from icekit.mixins import ListableMixin, HeroMixin 3 | 4 | 5 | class SimpleEvent( 6 | AbstractEventWithLayouts, 7 | ListableMixin, 8 | HeroMixin 9 | ): 10 | class Meta: 11 | verbose_name = "Simple event" 12 | -------------------------------------------------------------------------------- /icekit_events/event_types/simple/templates/icekit_event_types_simple/layouts/default.html: -------------------------------------------------------------------------------- 1 | {% extends "icekit_events/event.html" %} 2 | {% load fluent_contents_tags %} 3 | 4 | {% block content %} 5 | {{ block.super }} 6 | {% page_placeholder event "main" role="m" %} 7 | {% endblock content %} 8 | -------------------------------------------------------------------------------- /icekit_events/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/management/__init__.py -------------------------------------------------------------------------------- /icekit_events/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/management/commands/__init__.py -------------------------------------------------------------------------------- /icekit_events/migrations/0003_auto_20161021_1658.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_events', '0002_recurrence_rules'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='eventbase', 16 | name='human_dates', 17 | field=models.CharField(blank=True, help_text='Describe event dates in everyday language, e.g. "Every Sunday in March".', max_length=255), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit_events/migrations/0004_eventbase_part_of.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_events', '0003_auto_20161021_1658'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='eventbase', 16 | name='part_of', 17 | field=models.ForeignKey(to='icekit_events.EventBase', null=True, blank=True, related_name='contained_events'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit_events/migrations/0008_occurrence_external_ref.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_events', '0007_type_fixtures'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='occurrence', 16 | name='external_ref', 17 | field=models.CharField(max_length=255, blank=True, null=True), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit_events/migrations/0010_eventbase_is_drop_in.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_events', '0009_auto_20161125_1538'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='eventbase', 16 | name='is_drop_in', 17 | field=models.BooleanField(default=False, help_text=b'Check to indicate that the event/activity can be attended at any time within the given time range.'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit_events/migrations/0012_eventtype_title_plural.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_events', '0011_auto_20161128_1049'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='eventtype', 16 | name='title_plural', 17 | field=models.CharField(help_text=b"Optional plural version of title (if appending 's' isn't correct)", max_length=255, blank=True), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit_events/migrations/0012_occurrence_status.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_events', '0011_auto_20161128_1049'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='occurrence', 16 | name='status', 17 | field=models.CharField(max_length=255, null=True, blank=True), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit_events/migrations/0013_merge.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_events', '0012_occurrence_status'), 11 | ('icekit_events', '0012_eventtype_title_plural'), 12 | ] 13 | 14 | operations = [ 15 | ] 16 | -------------------------------------------------------------------------------- /icekit_events/migrations/0014_eventbase_human_times.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_events', '0013_merge'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='eventbase', 16 | name='human_times', 17 | field=models.CharField(blank=True, help_text='Describe event times in everyday language, e.g. "10am–5pm, 8pm on Thursdays".', max_length=255), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit_events/migrations/0015_auto_20161208_0029.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_events', '0014_eventbase_human_times'), 11 | ] 12 | 13 | operations = [ 14 | migrations.RenameField( 15 | model_name='occurrence', 16 | old_name='is_user_modified', 17 | new_name='is_protected_from_regeneration', 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit_events/migrations/0017_eventtype_color.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | import colorful.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('icekit_events', '0016_auto_20161208_0030'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='eventtype', 17 | name='color', 18 | field=colorful.fields.RGBColorField(default=b'#cccccc'), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /icekit_events/migrations/0021_merge.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_events', '0018_auto_20170314_1401'), 11 | ('icekit_events', '0020_auto_20170317_1341'), 12 | ] 13 | 14 | operations = [ 15 | ] 16 | -------------------------------------------------------------------------------- /icekit_events/migrations/0028_eventbase_price_detailed.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_events', '0027_auto_20170721_1613'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='eventbase', 16 | name='price_detailed', 17 | field=models.TextField(blank=True, help_text=b'A multi-line description of the price for this event. This is shown instead of the one-line price description if set'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit_events/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/migrations/__init__.py -------------------------------------------------------------------------------- /icekit_events/page_types/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/page_types/__init__.py -------------------------------------------------------------------------------- /icekit_events/page_types/advancedeventlisting/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/page_types/advancedeventlisting/__init__.py -------------------------------------------------------------------------------- /icekit_events/page_types/advancedeventlisting/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/page_types/advancedeventlisting/migrations/__init__.py -------------------------------------------------------------------------------- /icekit_events/page_types/eventlistingfordate/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/page_types/eventlistingfordate/__init__.py -------------------------------------------------------------------------------- /icekit_events/page_types/eventlistingfordate/migrations/0002_auto_20161018_1113.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('eventlistingfordate', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='eventlistingpage', 16 | options={'verbose_name': 'Event Listing for date'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit_events/page_types/eventlistingfordate/migrations/0003_auto_20161019_1906.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('eventlistingfordate', '0002_auto_20161018_1113'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name='eventlistingpage', 16 | options={'verbose_name': 'Event listing for date'}, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /icekit_events/page_types/eventlistingfordate/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/page_types/eventlistingfordate/migrations/__init__.py -------------------------------------------------------------------------------- /icekit_events/page_types/eventlistingfordate/models.py: -------------------------------------------------------------------------------- 1 | from icekit_events.models import AbstractEventListingForDatePage 2 | 3 | 4 | class EventListingPage(AbstractEventListingForDatePage): 5 | class Meta: 6 | verbose_name = "Event listing for date" 7 | 8 | -------------------------------------------------------------------------------- /icekit_events/plugins/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/plugins/__init__.py -------------------------------------------------------------------------------- /icekit_events/plugins/event_content_listing/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit_events/plugins/event_content_listing/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "ik_event_listing" 7 | verbose_name = "Event Content Listing" 8 | -------------------------------------------------------------------------------- /icekit_events/plugins/event_content_listing/content_plugins.py: -------------------------------------------------------------------------------- 1 | """ 2 | Definition of the plugin. 3 | """ 4 | from django.utils.translation import ugettext_lazy as _ 5 | 6 | from fluent_contents.extensions import ContentPlugin, plugin_pool 7 | 8 | from . import forms, models 9 | 10 | 11 | @plugin_pool.register 12 | class EventContentListingPlugin(ContentPlugin): 13 | model = models.EventContentListingItem 14 | category = _('Assets') 15 | render_template = 'icekit_events/plugins/event_content_listing/default.html' 16 | form = forms.EventContentListingAdminForm 17 | cache_output = False 18 | -------------------------------------------------------------------------------- /icekit_events/plugins/event_content_listing/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/plugins/event_content_listing/migrations/__init__.py -------------------------------------------------------------------------------- /icekit_events/plugins/event_content_listing/models.py: -------------------------------------------------------------------------------- 1 | from .abstract_models import AbstractEventContentListingItem 2 | 3 | 4 | class EventContentListingItem(AbstractEventContentListingItem): 5 | """ 6 | An embedded listing of event content items. 7 | """ 8 | pass 9 | -------------------------------------------------------------------------------- /icekit_events/plugins/event_content_listing/templates/icekit_events/plugins/event_content_listing/_event.html: -------------------------------------------------------------------------------- 1 |
  • 2 | {{ event.title|safe }} 3 |
  • 4 | 5 | -------------------------------------------------------------------------------- /icekit_events/plugins/event_content_listing/templates/icekit_events/plugins/event_content_listing/default.html: -------------------------------------------------------------------------------- 1 |
    2 | {% for event in instance.get_items %} 3 | {% include "icekit_events/plugins/event_content_listing/_event.html" %} 4 | {% empty %} 5 |
  • {{ instance.no_items_message|default:"There are no items to show" }}
  • 6 | {% endfor %} 7 |
    8 | 9 | -------------------------------------------------------------------------------- /icekit_events/plugins/links/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit_events/plugins/links/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_events_links" 7 | verbose_name = 'Links' 8 | -------------------------------------------------------------------------------- /icekit_events/plugins/links/content_plugins.py: -------------------------------------------------------------------------------- 1 | from copy import deepcopy 2 | from icekit.plugins.links.abstract_models import LinkPlugin 3 | from . import models 4 | from fluent_contents.extensions import plugin_pool 5 | 6 | 7 | @plugin_pool.register 8 | class EventLinkPlugin(LinkPlugin): 9 | model = models.EventLink 10 | fieldsets = deepcopy(LinkPlugin.fieldsets) 11 | fieldsets[1][1]['fields'] += ("include_even_when_finished",) 12 | render_template = 'plugins/link/event.html' 13 | -------------------------------------------------------------------------------- /icekit_events/plugins/links/migrations/0002_auto_20170314_1401.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_events_links', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='eventlink', 16 | name='style', 17 | field=models.CharField(choices=[(b'', b'Normal')], max_length=255, verbose_name=b'Link style', blank=True), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit_events/plugins/links/migrations/0004_eventlink_include_even_when_finished.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('icekit_events_links', '0003_auto_20170511_1909'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='eventlink', 16 | name='include_even_when_finished', 17 | field=models.BooleanField(help_text=b'Show this link even when the event has finished.', default=False), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /icekit_events/plugins/links/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/plugins/links/migrations/__init__.py -------------------------------------------------------------------------------- /icekit_events/plugins/links/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from icekit.plugins.links.abstract_models import AbstractLinkItem 3 | 4 | 5 | class EventLink(AbstractLinkItem): 6 | item = models.ForeignKey("icekit_events.EventBase", on_delete=models.CASCADE) 7 | 8 | include_even_when_finished = models.BooleanField( 9 | help_text="Show this link even when the event has finished.", 10 | default=False 11 | ) 12 | 13 | class Meta: 14 | verbose_name = "Event link" 15 | -------------------------------------------------------------------------------- /icekit_events/plugins/todays_occurrences/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit_events/plugins/todays_occurrences/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "ik_events_todays_occurrences" 7 | verbose_name = "today's occurrences" 8 | -------------------------------------------------------------------------------- /icekit_events/plugins/todays_occurrences/content_plugins.py: -------------------------------------------------------------------------------- 1 | from fluent_contents.extensions import ContentPlugin 2 | from . import models 3 | from fluent_contents.extensions import plugin_pool 4 | 5 | 6 | @plugin_pool.register 7 | class TodaysOccurrencesPlugin(ContentPlugin): 8 | model = models.TodaysOccurrences 9 | 10 | filter_horizontal = ('types_to_show', ) 11 | category = "Events" 12 | render_template = 'plugins/todays_occurrences/default.html' 13 | 14 | -------------------------------------------------------------------------------- /icekit_events/plugins/todays_occurrences/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/plugins/todays_occurrences/migrations/__init__.py -------------------------------------------------------------------------------- /icekit_events/sample_data/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'icekit_events.sample_data.apps.AppConfig' 2 | -------------------------------------------------------------------------------- /icekit_events/sample_data/apps.py: -------------------------------------------------------------------------------- 1 | """ 2 | App configuration for ``icekit_events.sample_data`` app. 3 | """ 4 | 5 | # Register signal handlers, but avoid interacting with the database. 6 | # See: https://docs.djangoproject.com/en/1.8/ref/applications/#django.apps.AppConfig.ready 7 | 8 | from django.apps import AppConfig 9 | 10 | 11 | class AppConfig(AppConfig): 12 | name = 'icekit_events.sample_data' 13 | label = 'icekit_events_sample_data' 14 | -------------------------------------------------------------------------------- /icekit_events/sample_data/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/sample_data/migrations/__init__.py -------------------------------------------------------------------------------- /icekit_events/sample_data/models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/sample_data/models.py -------------------------------------------------------------------------------- /icekit_events/search_indexes.py: -------------------------------------------------------------------------------- 1 | import haystack 2 | from haystack import indexes 3 | from icekit.utils.search import AbstractLayoutIndex 4 | from . import models 5 | 6 | class EventBaseIndex(AbstractLayoutIndex, indexes.Indexable): 7 | def get_model(self): 8 | return models.EventBase 9 | 10 | def prepare_search_types(self, obj): 11 | return ["Events"] 12 | 13 | def prepare(self, obj): 14 | data = super(EventBaseIndex, self).prepare(obj) 15 | if obj.is_upcoming(): 16 | data['boost'] *= 1.25 17 | return data 18 | -------------------------------------------------------------------------------- /icekit_events/static/icekit_events/css/events_datepicker.css: -------------------------------------------------------------------------------- 1 | .events-datepicker { 2 | max-width: 272px; 3 | margin-top: 14px; 4 | text-align: center; 5 | } 6 | .events-datepicker .ui-datepicker-next { 7 | margin-left: 10px; 8 | } 9 | .events-datepicker td, 10 | .events-datepicker th { 11 | padding: 10px; 12 | text-align: center; 13 | } 14 | .events-datepicker .ui-datepicker-title { 15 | font-size: 2em; 16 | font-weight: bold; 17 | } 18 | -------------------------------------------------------------------------------- /icekit_events/static/icekit_events/img/fade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/static/icekit_events/img/fade.png -------------------------------------------------------------------------------- /icekit_events/static/icekit_events/img/stripe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/static/icekit_events/img/stripe.png -------------------------------------------------------------------------------- /icekit_events/templates/icekit_events/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block body %} 4 | {% if occurrences %} 5 | {% for occurrence in occurrences %} 6 |
      7 |
    • 8 | {{ occurrence.event.title }} — {{ occurrence.start }} - {{ occurrence.end }} 9 |
    • 10 |
    11 | {% endfor %} 12 | {% else %} 13 |
    There are no events.
    14 | {% endif %} 15 | {% endblock %} 16 | 17 | -------------------------------------------------------------------------------- /icekit_events/templates/icekit_events/layouts/default.html: -------------------------------------------------------------------------------- 1 | {% load fluent_contents_tags %} 2 | 3 | {% page_placeholder "main" role="m" %} 4 | 5 | {% render_content_items_media %} 6 | -------------------------------------------------------------------------------- /icekit_events/templates/icekit_events/type.html: -------------------------------------------------------------------------------- 1 | {{ type }} 2 | 3 |
      4 | 5 | {% for occ in occurrences %} 6 |
    • {{ occ }}
    • 7 | {% endfor %} 8 |
    9 | -------------------------------------------------------------------------------- /icekit_events/templates/plugins/link/event.html: -------------------------------------------------------------------------------- 1 | {% if instance.include_even_when_finished or not instance.item.has_finished %} 2 | {% if instance.get_item.has_finished %}
    {% endif %} 3 | {% include 'plugins/link/default.html' %} 4 | {% if instance.get_item.has_finished %}
    {% endif %} 5 | {% endif %} 6 | -------------------------------------------------------------------------------- /icekit_events/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/templatetags/__init__.py -------------------------------------------------------------------------------- /icekit_events/tests/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit_events/tests/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = '.'.join(__name__.split('.')[:-1]) 6 | label = "icekit_events_tests" 7 | -------------------------------------------------------------------------------- /icekit_events/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URLconf for ``icekit_events`` app. 3 | """ 4 | 5 | # Prefix URL names with the app name. Avoid URL namespaces unless it is likely 6 | # this app will be installed multiple times in a single project. 7 | 8 | from django.conf.urls import url 9 | 10 | from icekit_events.views import event, event_type 11 | 12 | urlpatterns = [ 13 | url(r'^(?P[\w-]+)/$', 14 | event, name='icekit_events_eventbase_detail'), 15 | url(r'^types/(?P[\w-]+)/$', 16 | event_type, name='icekit_events_eventtype_detail'), 17 | ] 18 | -------------------------------------------------------------------------------- /icekit_events/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_events/utils/__init__.py -------------------------------------------------------------------------------- /icekit_events/utils/permissions.py: -------------------------------------------------------------------------------- 1 | def allowed_to_preview(user): 2 | """ 3 | Is the user allowed to view the preview? 4 | 5 | Users are only allowed to view the preview if they are authenticated, active and staff. 6 | 7 | :param user: A User object instance. 8 | :return: Boolean. 9 | """ 10 | if ( 11 | user.is_authenticated and 12 | user.is_active and 13 | user.is_staff 14 | ): 15 | return True 16 | return False 17 | -------------------------------------------------------------------------------- /icekit_events/validators.py: -------------------------------------------------------------------------------- 1 | """ 2 | Validators for ``icekit_events`` app. 3 | """ 4 | 5 | from dateutil import rrule 6 | 7 | from django.core.exceptions import ValidationError 8 | from django.utils.translation import ugettext_lazy as _ 9 | 10 | 11 | def recurrence_rule(value): 12 | """ 13 | Validate that a ``rruleset`` object can be creted from ``value``. 14 | """ 15 | try: 16 | rrule.rrulestr(value) 17 | except ValueError: 18 | raise ValidationError( 19 | _('Enter a valid iCalendar (RFC2445) recurrence rule.'), 20 | code='invalid') 21 | -------------------------------------------------------------------------------- /icekit_press_releases/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = '%s.apps.AppConfig' % __name__ 2 | -------------------------------------------------------------------------------- /icekit_press_releases/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | from any_urlfield.forms import SimpleRawIdWidget 4 | 5 | from icekit.fields import ICEkitURLField 6 | 7 | 8 | class AppConfig(AppConfig): 9 | name = '.'.join(__name__.split('.')[:-1]) 10 | label = "icekit_press_releases" 11 | verbose_name = "Press releases" 12 | 13 | def ready(self): 14 | from .models import PressRelease 15 | ICEkitURLField.register_model( 16 | PressRelease, widget=SimpleRawIdWidget(PressRelease), 17 | title='Press Release') 18 | -------------------------------------------------------------------------------- /icekit_press_releases/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ic-labs/django-icekit/c507ea5b1864303732c53ad7c5800571fca5fa94/icekit_press_releases/migrations/__init__.py -------------------------------------------------------------------------------- /icekit_press_releases/page_type_plugins.py: -------------------------------------------------------------------------------- 1 | from fluent_pages.extensions import page_type_pool 2 | 3 | from icekit.content_collections.page_type_plugins import ListingPagePlugin 4 | from icekit.page_types.layout_page.admin import LayoutPageAdmin 5 | from .models import PressReleaseListing 6 | 7 | 8 | @page_type_pool.register 9 | class PressReleaseListingPlugin(ListingPagePlugin): 10 | model = PressReleaseListing 11 | sort_priority = 100 12 | -------------------------------------------------------------------------------- /icekit_press_releases/search_indexes.py: -------------------------------------------------------------------------------- 1 | from haystack import indexes 2 | from icekit.utils.search import AbstractLayoutIndex 3 | from . import models 4 | 5 | class PressReleaseIndex(AbstractLayoutIndex, indexes.Indexable): 6 | def get_model(self): 7 | return models.PressRelease 8 | -------------------------------------------------------------------------------- /icekit_press_releases/templates/icekit_press_releases/pressreleaselisting/layouts/default.html: -------------------------------------------------------------------------------- 1 | {% extends "icekit/layouts/default.html" %} 2 | 3 | {% load fluent_contents_tags %} 4 | 5 | {% block content %} 6 | {{ block.super }} 7 | 8 | 19 | 20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: 'ICEkit' -------------------------------------------------------------------------------- /project_template/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | data_file = var/.coverage 4 | omit = */migrations/*, */tests.py, */tests/*, var/* 5 | source = . 6 | 7 | [report] 8 | exclude_lines = 9 | def __repr__ 10 | pragma: no cover 11 | raise AssertionError 12 | raise NotImplementedError 13 | show_missing = True 14 | -------------------------------------------------------------------------------- /project_template/.dockerignore: -------------------------------------------------------------------------------- 1 | **/*.md5 2 | **/*.orig 3 | **/*.pyc 4 | **/*.pyo 5 | **/*.swp 6 | **/.DS_Store 7 | **/npm-debug.log 8 | **/pubring.gpg~ 9 | **/random_seed 10 | **/requirements-local.txt 11 | .env 12 | .env.local 13 | .env.production 14 | .env.staging 15 | .gnupg/gpg.conf 16 | .idea/ 17 | bower_components/ 18 | docker-cloud.*.yml 19 | docker-compose.override.yml 20 | node_modules/ 21 | project_settings_local.py 22 | static_root/ 23 | var/ 24 | -------------------------------------------------------------------------------- /project_template/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | indent_size = 4 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.{bat,iss}] 12 | end_of_line = crlf 13 | 14 | [*.{css,html,js,json,less,sass,scss}] 15 | indent_size = 2 16 | indent_style = tab 17 | 18 | [*.{md,py}] 19 | indent_style = space 20 | 21 | [*.sh] 22 | indent_style = tab 23 | 24 | [*.yml] 25 | indent_size = 2 26 | indent_style = space 27 | 28 | [*.rst] 29 | indent_size = 3 30 | indent_style = space 31 | -------------------------------------------------------------------------------- /project_template/.env.local.sample: -------------------------------------------------------------------------------- 1 | # BASE_SETTINGS_MODULE="" 2 | # EMAIL_HOST="" 3 | # EMAIL_HOST_PASSWORD="" 4 | # EMAIL_HOST_USER="" 5 | # GPG_PASSPHRASE="" 6 | # MASTER_PASSWORD="" 7 | # MEDIA_AWS_ACCESS_KEY_ID="" 8 | # MEDIA_AWS_SECRET_ACCESS_KEY="" 9 | # MEDIA_AWS_STORAGE_BUCKET_NAME="project_template-stg" 10 | # PGDATABASE="" 11 | # PGHOST="" 12 | # PGPASSWORD="" 13 | # PGPORT="" 14 | # PGUSER="" 15 | # SECRET_KEY="" 16 | # SENTRY_DSN="" 17 | # SITE_DOMAIN="project_template.lvh.me" 18 | # SITE_NAME="project_template (local)" 19 | -------------------------------------------------------------------------------- /project_template/.env.production: -------------------------------------------------------------------------------- 1 | BASE_SETTINGS_MODULE="production" 2 | # EMAIL_HOST="" 3 | # EMAIL_HOST_PASSWORD="" 4 | # EMAIL_HOST_USER="" 5 | # MASTER_PASSWORD="" 6 | # MEDIA_AWS_ACCESS_KEY_ID="" 7 | # MEDIA_AWS_SECRET_ACCESS_KEY="" 8 | # MEDIA_AWS_STORAGE_BUCKET_NAME="project_template" 9 | # PGDATABASE="" 10 | # PGHOST="" 11 | # PGPASSWORD="" 12 | # PGPORT="" 13 | # PGUSER="" 14 | # SECRET_KEY="" 15 | # SENTRY_DSN="" 16 | # SITE_DOMAIN="project_template.prd.ixcsandbox.com" 17 | # SITE_NAME="project_template" 18 | -------------------------------------------------------------------------------- /project_template/.env.staging: -------------------------------------------------------------------------------- 1 | BASE_SETTINGS_MODULE="production" 2 | # EMAIL_HOST="" 3 | # EMAIL_HOST_PASSWORD="" 4 | # EMAIL_HOST_USER="" 5 | # MASTER_PASSWORD="" 6 | # MEDIA_AWS_ACCESS_KEY_ID="" 7 | # MEDIA_AWS_SECRET_ACCESS_KEY="" 8 | # MEDIA_AWS_STORAGE_BUCKET_NAME="project_template-stg" 9 | # PGDATABASE="" 10 | # PGHOST="" 11 | # PGPASSWORD="" 12 | # PGPORT="" 13 | # PGUSER="" 14 | # SECRET_KEY="" 15 | # SENTRY_DSN="" 16 | # SITE_DOMAIN="project_template.stg.ixcsandbox.com" 17 | # SITE_NAME="project_template (staging)" 18 | -------------------------------------------------------------------------------- /project_template/.gitignore: -------------------------------------------------------------------------------- 1 | **/*.md5 2 | **/*.orig 3 | **/*.pyc 4 | **/*.pyo 5 | **/*.swp 6 | **/.DS_Store 7 | **/npm-debug.log 8 | **/pubring.gpg~ 9 | **/random_seed 10 | **/requirements-local.txt 11 | /.env 12 | /.env.local 13 | /.env.production 14 | /.env.staging 15 | /.gnupg/gpg.conf 16 | /.idea/ 17 | /bower_components/ 18 | /docker-cloud.*.yml 19 | /docker-compose.override.yml 20 | /node_modules/ 21 | /project_settings_local.py 22 | /static_root/ 23 | /var/ 24 | -------------------------------------------------------------------------------- /project_template/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "project_template", 3 | "dependencies": { 4 | "alloyeditor": "^1.2.3", 5 | "bootstrap": "^3.3.7", 6 | "eonasdan-bootstrap-datetimepicker": "^4.17.47", 7 | "font-awesome": "^4.6.3", 8 | "jquery": "^3.1.0", 9 | "lodash": "^4.14.2", 10 | "jquery-ui": "~1.11.4", 11 | "fullcalendar": "^3.0.1", 12 | "iframe-resizer": "~2.8.7", 13 | "skveege-rrule": "~2.1.3", 14 | "js-cookie": "^2.1.3" 15 | }, 16 | "private": true 17 | } 18 | -------------------------------------------------------------------------------- /project_template/docker-compose.override.sample.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | base: 4 | environment: 5 | GPG_PASSPHRASE: # Get from environment 6 | MASTER_PASSWORD: # Get from environment 7 | celery: 8 | extends: base 9 | celerybeat: 10 | extends: base 11 | celeryflower: 12 | extends: base 13 | django: 14 | extends: base 15 | -------------------------------------------------------------------------------- /project_template/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "project_template", 3 | "dependencies": { 4 | "bower": "^1.7.9", 5 | "less": "^2.7.1", 6 | "less-plugin-autoprefix": "^1.5.1", 7 | "node-sass": "^3.8.0" 8 | }, 9 | "private": true 10 | } 11 | -------------------------------------------------------------------------------- /project_template/project_settings.py: -------------------------------------------------------------------------------- 1 | # Do not commit secrets to VCS. 2 | 3 | # Environment variables will be loaded from `.env.$DOTENV` or `.env.local`. 4 | # Local settings will be imported from `project_settings_local.py` 5 | 6 | from icekit.project.settings.glamkit import * # glamkit, icekit 7 | 8 | # Override the default ICEkit settings to form project settings. 9 | 10 | 11 | # Prepend local apps, so that their static files are used in preference. 12 | # INSTALLED_APPS = ( 13 | # ) + INSTALLED_APPS 14 | -------------------------------------------------------------------------------- /project_template/project_settings_local.sample.py: -------------------------------------------------------------------------------- 1 | # This file is ignored by VCS. 2 | 3 | from project_settings import * 4 | 5 | # Override the default project settings. 6 | -------------------------------------------------------------------------------- /project_template/requirements.in: -------------------------------------------------------------------------------- 1 | # Top level project requirements only. 2 | # Unpinned, except to exclude known incompatible versions. 3 | 4 | # ICEkit is already installed in the `interaction/icekit` image or via `go.sh`. 5 | -------------------------------------------------------------------------------- /project_template/requirements.txt: -------------------------------------------------------------------------------- 1 | # 2 | # This file is autogenerated by pip-compile 3 | # To update, run: 4 | # 5 | # pip-compile --output-file requirements.txt requirements.in 6 | # 7 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | djangorestframework<3.7 # Avoid JSONField errors with Django 1.8 2 | django-filter<1.1 # Avoid get_filter_name() errors with Django 1.8 3 | 4 | -e .[api,brightcove,dev,docs,django18,forms,project,search,test,events,collections] 5 | 6 | -e git+https://github.com/ixc/django-dynamic-fixture.git@caeb3427399edd3b0d589516993c7da55e0de560#egg=django-dynamic-fixture 7 | -e git+https://github.com/ixc/python-edtf.git@develop#egg=edtf 8 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [devpi:upload] 2 | formats = bdist_wheel 3 | 4 | [nosetests] 5 | with-progressive = True 6 | nocapture = True 7 | nologcapture = True 8 | 9 | [wheel] 10 | universal = 1 11 | --------------------------------------------------------------------------------