Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from ixc/feature/rename-to-glamkit-collections
Browse files Browse the repository at this point in the history
Rename project to "glamkit-collections"
  • Loading branch information
cogat authored Aug 11, 2016
2 parents 1a8d9f6 + 5031d47 commit 0b8af45
Show file tree
Hide file tree
Showing 26 changed files with 26 additions and 23 deletions.
1 change: 0 additions & 1 deletion collectionkit/contrib/work_creator/__init__.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions glamkit_collections/contrib/work_creator/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
default_app_config = 'glamkit_collections.contrib.work_creator.apps.AppConfig'
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from django.contrib import admin
from icekit.admin import FluentLayoutsMixin

from collectionkit.contrib.work_creator.admin_utils import WorkThumbnailMixin, admin_link, \
admin_url
from glamkit_collections.contrib.work_creator.admin_utils import \
WorkThumbnailMixin, admin_link, admin_url


class WorkInline(admin.TabularInline, WorkThumbnailMixin):
"""
Expand All @@ -22,7 +23,6 @@ class WorkInline(admin.TabularInline, WorkThumbnailMixin):
)
extra = 0


def artwork_link(self, obj):
return admin_link(obj.artwork)
artwork_link.allow_tags = True
Expand All @@ -36,7 +36,8 @@ def has_add_permission(self, request):
def thumbnail_link(self, obj):
link = admin_url(obj.artwork)
style = ""
return "<a href='%s' style='%s'>%s</a>" % (link, style, self.thumbnail(obj) or "No thumbnail")
return "<a href='%s' style='%s'>%s</a>" % (
link, style, self.thumbnail(obj) or "No thumbnail")
thumbnail_link.allow_tags = True


Expand All @@ -56,5 +57,3 @@ class CreatorAdmin(FluentLayoutsMixin):
)

raw_id_fields = ['portrait', ]


Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.contrib import admin
from django.template.defaultfilters import filesizeformat
from django_object_actions import DjangoObjectActions
from collectionkit.contrib.work_creator.admin_utils import WorkThumbnailMixin, admin_url, \
admin_link
from glamkit_collections.contrib.work_creator.admin_utils import \
WorkThumbnailMixin, admin_url, admin_link


class WorkImageInline(admin.TabularInline, WorkThumbnailMixin):
Expand All @@ -11,7 +11,7 @@ class WorkImageInline(admin.TabularInline, WorkThumbnailMixin):
model = ArtworkImage
"""

thumbnail_options = {'size': (160,120)}
thumbnail_options = {'size': (160, 120)}
thumbnail_field = 'downloaded_image'

fields = (
Expand Down Expand Up @@ -49,8 +49,8 @@ def thumbnail_link(self, obj):
thumbnail_link.allow_tags = True


class WorkImageAdmin(DjangoObjectActions, admin.ModelAdmin, WorkThumbnailMixin):

class WorkImageAdmin(DjangoObjectActions, admin.ModelAdmin,
WorkThumbnailMixin):

list_display = (
'thumbnail',
Expand All @@ -63,7 +63,7 @@ class WorkImageAdmin(DjangoObjectActions, admin.ModelAdmin, WorkThumbnailMixin):
)

thumbnail_field = 'downloaded_image'
thumbnail_options = {'size': (250,250)}
thumbnail_options = {'size': (250, 250)}

search_fields = (
'netx_id',
Expand All @@ -72,7 +72,8 @@ class WorkImageAdmin(DjangoObjectActions, admin.ModelAdmin, WorkThumbnailMixin):
)

def image_link(self, obj):
return "<a href='%s'>%s</a>" % (obj.downloaded_image.url, self.thumbnail(obj))
return "<a href='%s'>%s</a>" % (
obj.downloaded_image.url, self.thumbnail(obj))
image_link.allow_tags = True
image_link.short_descrpition = "image"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from icekit.admin import FluentLayoutsMixin
from .image import WorkImageInline
from collectionkit.contrib.work_creator.admin_utils import WorkThumbnailMixin, admin_link
from glamkit_collections.contrib.work_creator.admin_utils import \
WorkThumbnailMixin, admin_link


class WorkAdmin(FluentLayoutsMixin, WorkThumbnailMixin):

Expand Down Expand Up @@ -44,9 +46,9 @@ def admin_thumbnail(self, obj):
if obj.admin_hero_image == obj.hero_image:
message = ""
else:
message ="<br><span style='font-weight: normal'>(not public)</span>"
message = \
"<br><span style='font-weight: normal'>(not public)</span>"
return "%s%s" % (t, message)
return ""
admin_thumbnail.allow_tags = True
admin_thumbnail.short_description = "thumbnail"

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.apps import AppConfig


class AppConfig(AppConfig):
name = 'collectionkit.contrib.work_creator'
name = 'glamkit_collections.contrib.work_creator'
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from django.db.models.query import QuerySet
from django.utils.encoding import python_2_unicode_compatible
from django.utils.safestring import mark_safe
from collectionkit.contrib.work_creator.fields import QuietImageField
from collectionkit.contrib.work_creator import settings
from glamkit_collections.contrib.work_creator.fields import QuietImageField
from glamkit_collections.contrib.work_creator import settings
import colorweave
import webcolors

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from django.core.urlresolvers import reverse
from django.db import models
from icekit.abstract_models import FluentFieldsMixin, BoostedTermsMixin
from collectionkit.utils import grammatical_join
from glamkit_collections.utils import grammatical_join


class WorkBase(FluentFieldsMixin, BoostedTermsMixin):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
long_description = pypandoc.convert('README.md', 'rst')

setuptools.setup(
name='glamkit-collectionkit',
name='glamkit-collections',
use_scm_version={'version_scheme': 'post-release'},
author='Interaction Consortium',
author_email='[email protected]',
url='https://github.com/ic-labs/glamkit-collectionkit',
url='https://github.com/ixc/glamkit-collections',
description='Boilerplate for modelling collections of collecting institutions.',
long_description=locals().get('long_description', ''),
packages=setuptools.find_packages(),
Expand Down

0 comments on commit 0b8af45

Please sign in to comment.