4 | {# closes in end.html #}
5 |
--------------------------------------------------------------------------------
/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/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/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/map/templates/icekit/plugins/map/embed.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ instance.get_embed_code|safe }}
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/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_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/plugins/faq/templates/icekit/plugins/faq/default.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ instance.question|safe }}
4 |
5 |
6 | {{ instance.answer|safe }}
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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/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_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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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 |
--------------------------------------------------------------------------------
/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/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/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/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/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_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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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/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/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/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/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/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/icekit/navigation/templates/icekit/navigation/navigation_item.html:
--------------------------------------------------------------------------------
1 |
2 |
6 | {{ instance.title }}
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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/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_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/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 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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_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/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_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/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/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 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/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/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/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/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/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_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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/plugins/child_pages/templates/icekit/plugins/child_pages/default.html:
--------------------------------------------------------------------------------
1 | {% if instance.get_child_pages %}
2 |
3 |
4 | {% for child in instance.get_child_pages %}
5 |
6 |
7 | {{ child }}
8 |
9 |
10 | {% endfor %}
11 |
12 |
13 | {% endif %}
14 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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/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_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/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/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 |
7 |
8 | {% include instance.caption_template %}
9 |
10 | {% endblock %}
11 |
--------------------------------------------------------------------------------
/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/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/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/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_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/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/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_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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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_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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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 |
10 | {% endcomment %}
11 |
12 |
13 | {% block content %}
14 | {% endblock %}
15 |
16 |
--------------------------------------------------------------------------------
/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/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/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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/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/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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_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 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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/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/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_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/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/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 |
19 | {% endblock %}
20 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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_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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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_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/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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_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_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/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_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 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/plugins/file/templates/icekit/plugins/file/default.html:
--------------------------------------------------------------------------------
1 | {% block file %}
2 | {% if instance.file.is_active %}
3 |
4 |
5 |
6 | {{ instance.file }}
7 |
8 | ({{ instance.file.file_size }} .{{ instance.file.extension }} file )
9 |
10 |
11 |
12 | {% endif %}
13 | {% endblock %}
14 |
--------------------------------------------------------------------------------
/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/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_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 |
--------------------------------------------------------------------------------
/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/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 |
8 | ({{ visible_location.map_description }} )
9 |
10 |
11 |
12 | {% endif %}
13 | {% endwith %}
14 | {% endblock %}
15 |
--------------------------------------------------------------------------------
/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_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 |
--------------------------------------------------------------------------------
/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/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/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 |
--------------------------------------------------------------------------------
/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/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/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 |
20 |
21 | {% endblock %}
22 |
--------------------------------------------------------------------------------
/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/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/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/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/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/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_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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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/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/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/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/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/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/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/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/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/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/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/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_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/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/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/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/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/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/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/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/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/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/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/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/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/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_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/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/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_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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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/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 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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/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/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/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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_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/page_types/eventlistingfordate/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 .models import EventListingPage
5 |
6 |
7 | @page_type_pool.register
8 | class EventListingPagePlugin(ListingPagePlugin):
9 | model = EventListingPage
10 |
11 | def get_context(self, request, page, **kwargs):
12 | context = super(EventListingPagePlugin, self).get_context(
13 | request, page, **kwargs)
14 | context['start'] = page.get_start(request)
15 | context['days'] = page.get_days(request)
16 | return context
17 |
--------------------------------------------------------------------------------
/project_template/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/project_template:${TAG}
9 | links:
10 | - elasticsearch
11 | - postgres
12 | - redis
13 | volumes:
14 | - ./.git:/opt/project_template/.git
15 | - ./var:/opt/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 |
--------------------------------------------------------------------------------
/glamkit_collections/contrib/README:
--------------------------------------------------------------------------------
1 | The `contrib` folder is meant to be a primoridial soup of patterns and shapes for different collecting institutions.
2 |
3 | Some examples/ideas:
4 |
5 | work_creator - for modelling created works, such as art or design
6 | natural_history - for modelling natural organisms
7 | loc_classification - library of congress classification
8 |
9 | Try to make use of what is here already, and feel free to contribute your own!
10 |
11 | Over time, we will factor patterns out into more formal entities and standards that can then be tied together for each
12 | project in different ways.
13 | - e.g. Person > Creator > Author or Work > Artwork > Sculpture
14 |
--------------------------------------------------------------------------------
/icekit/templates/icekit/templatetags/link_share.html:
--------------------------------------------------------------------------------
1 | {# NOTE: Ensure jQuery and link_share.js are loaded on page #}
2 | {% if ICEKIT_SHARE_USERNAME and ICEKIT_SHARE_KEY %}
3 |
12 | {% endif %}
13 |
--------------------------------------------------------------------------------
/icekit/plugins/brightcove/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 BrightcovePlugin(ContentPlugin):
12 | model = models.BrightcoveItem
13 | category = _('Assets')
14 | render_template = 'icekit/plugins/brightcove/default.html'
15 |
16 | class FrontendMedia:
17 | js = (
18 | # currently breaks on compression - include in base.html instead
19 | # '//admin.brightcove.com/js/BrightcoveExperiences.js',
20 | )
21 |
--------------------------------------------------------------------------------
/icekit/plugins/instagram_embed/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 forms, models
8 |
9 |
10 | @plugin_pool.register
11 | class InstagramEmbedPlugin(ContentPlugin):
12 | model = models.InstagramEmbedItem
13 | category = _('Assets')
14 | render_template = 'icekit/plugins/instagram_embed/default.html'
15 | form = forms.InstagramEmbedAdminForm
16 |
17 | fieldsets = (
18 | (
19 | None, {
20 | 'fields': ('url', )
21 | }
22 | ),
23 | )
24 |
--------------------------------------------------------------------------------
/icekit/plugins/twitter_embed/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 forms, models
8 |
9 |
10 | @plugin_pool.register
11 | class TwitterEmbedPlugin(ContentPlugin):
12 | model = models.TwitterEmbedItem
13 | category = _('Assets')
14 | render_template = 'icekit/plugins/twitter_embed/default.html'
15 | form = forms.TwitterEmbedAdminForm
16 |
17 | fieldsets = (
18 | (
19 | None, {
20 | 'fields': ('twitter_url', )
21 | }
22 | ),
23 | )
24 |
--------------------------------------------------------------------------------
/icekit/page_types/author/migrations/0002_auto_20161011_1522.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', '0001_initial'),
11 | ]
12 |
13 | operations = [
14 | migrations.AlterModelOptions(
15 | name='author',
16 | options={'ordering': ('family_name', 'given_names')},
17 | ),
18 | migrations.RenameField(
19 | model_name='author',
20 | old_name='given_name',
21 | new_name='given_names',
22 | ),
23 | ]
24 |
--------------------------------------------------------------------------------
/icekit/templates/icekit/auth/login.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% load bootstrap3 %}
4 |
5 | {% block content %}
6 |
9 |
10 |
16 |
17 |
18 | Forgotten your password?
19 |
20 |
21 |
22 |
23 |
24 | {% endblock %}
25 |
--------------------------------------------------------------------------------
/icekit_events/plugins/links/migrations/0003_auto_20170511_1909.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import unicode_literals
3 |
4 | from django.db import migrations, models
5 | from icekit.plugins.links import appsettings
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('icekit_events_links', '0002_auto_20170314_1401'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterField(
16 | model_name='eventlink',
17 | name='style',
18 | field=models.CharField(choices=appsettings.RELATION_STYLE_CHOICES, max_length=255, verbose_name=b'Link style', blank=True),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/icekit_events/migrations/0024_auto_20170320_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_events', '0023_auto_20170320_1820'),
11 | ]
12 |
13 | operations = [
14 | migrations.AlterField(
15 | model_name='eventbase',
16 | name='external_ref',
17 | field=models.CharField(verbose_name=b'External reference', max_length=255, help_text=b'The reference identifier used by an external events/tickets management system.', blank=True, null=True),
18 | ),
19 | ]
20 |
--------------------------------------------------------------------------------
/icekit_events/migrations/0027_auto_20170721_1613.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import unicode_literals
3 |
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('icekit_events', '0026_eventbase_location'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterField(
16 | model_name='eventbase',
17 | name='location',
18 | field=models.ForeignKey(null=True, to='icekit_plugins_location.Location', blank=True, on_delete=django.db.models.deletion.SET_NULL, related_name='events'),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/docs/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line.
5 | SPHINXOPTS =
6 | SPHINXBUILD = sphinx-build
7 | SPHINXPROJ = GLAMkit
8 | SOURCEDIR = .
9 | BUILDDIR = _build
10 |
11 | # Put it first so that "make" without argument is like "make help".
12 | help:
13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 |
15 | .PHONY: help Makefile
16 |
17 | # Catch-all target: route all unknown targets to Sphinx using the new
18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19 | %: Makefile
20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 |
--------------------------------------------------------------------------------
/glamkit_sponsors/admin.py:
--------------------------------------------------------------------------------
1 | """
2 | Administration configuration for Sponser models.
3 | """
4 | from django.contrib import admin
5 | from icekit.admin_tools.mixins import ThumbnailAdminMixin
6 |
7 | from . import models
8 |
9 |
10 | class SponsorAdmin(admin.ModelAdmin, ThumbnailAdminMixin):
11 | """
12 | Administration configuration for the `Sponsor` model.
13 | """
14 | list_display = ('name', 'thumbnail', 'url')
15 | list_display_links = ("name", "thumbnail")
16 | raw_id_fields = ['logo', ]
17 |
18 | def get_thumbnail_source(self, obj):
19 | return obj.logo.image
20 |
21 | # Administration registration.
22 | admin.site.register(models.Sponsor, SponsorAdmin)
23 |
--------------------------------------------------------------------------------