Permalink
Browse files

Merge branch 'develop' into french-trans

  • Loading branch information...
2 parents 68c1377 + 5f3ff60 commit 0e289cc45836d4b147d9f7d8dd9fb30828a284cb @eclan eclan committed Nov 30, 2012
Showing with 22,862 additions and 7,223 deletions.
  1. +3 −1 .gitignore
  2. +1 −0 CHANGES.txt
  3. +2 −0 contributors.txt → CONTRIBUTORS.txt
  4. 0 LICENCE → LICENCE.txt
  5. +11 −0 MANIFEST.in
  6. +17 −13 README.rst → README.txt
  7. +10 −0 REQUIREMENTS.txt
  8. +14 −4 arkestra_image_plugin/cms_plugins.py
  9. +0 −1 arkestra_image_plugin/views.py
  10. +2 −0 arkestra_utilities/admin_mixins.py
  11. +5 −5 arkestra_utilities/context_processors.py
  12. +30 −21 arkestra_utilities/generic_models.py
  13. +1 −3 arkestra_utilities/managers.py
  14. +5 −6 arkestra_utilities/menu.py
  15. +0 −2 arkestra_utilities/models.py
  16. +49 −54 arkestra_utilities/settings.py
  17. +6 −6 arkestra_utilities/static/cms/wymeditor/lang/en.js
  18. BIN arkestra_utilities/static/static.png
  19. +1 −1 arkestra_utilities/templates/arkestra.html
  20. +3 −50 arkestra_utilities/widgets/wym_editor.py
  21. +34 −11 contacts_and_people/admin.py
  22. +0 −1 contacts_and_people/cms_plugins.py
  23. +2 −2 contacts_and_people/link_schemas.py
  24. +103 −62 contacts_and_people/models.py
  25. +15 −8 contacts_and_people/templates/admin/contacts_and_people/entity/change_list.html
  26. +1 −1 contacts_and_people/templates/admin/contacts_and_people/entity/change_list_tree.html
  27. +1 −1 contacts_and_people/templates/admin/contacts_and_people/entity/change_list_tree_item.html
  28. +1 −3 contacts_and_people/templates/contacts_and_people/entity_contacts_and_people.html
  29. +2 −2 contacts_and_people/templates/contacts_and_people/person.html
  30. +2 −2 contacts_and_people/templates/includes/access_notes.html
  31. +5 −3 contacts_and_people/templates/includes/address.html
  32. +2 −2 contacts_and_people/templates/includes/precise_location.html
  33. +230 −23 contacts_and_people/tests.py
  34. +0 −1 contacts_and_people/urls.py
  35. +19 −16 contacts_and_people/views.py
  36. +234 −0 debian_installation.txt
  37. BIN docs/_build/doctrees/environment.pickle
  38. BIN docs/_build/doctrees/getting_started.doctree
  39. BIN docs/_build/doctrees/index.doctree
  40. BIN docs/_build/doctrees/installation.doctree
  41. +0 −4 docs/_build/html/.buildinfo
  42. +0 −15 docs/_build/html/_sources/getting_started.txt
  43. +0 −31 docs/_build/html/_sources/index.txt
  44. +0 −34 docs/_build/html/_sources/installation.txt
  45. +0 −528 docs/_build/html/_static/basic.css
  46. +0 −256 docs/_build/html/_static/default.css
  47. +0 −247 docs/_build/html/_static/doctools.js
  48. BIN docs/_build/html/_static/file.png
  49. +0 −154 docs/_build/html/_static/jquery.js
  50. BIN docs/_build/html/_static/minus.png
  51. BIN docs/_build/html/_static/plus.png
  52. +0 −62 docs/_build/html/_static/pygments.css
  53. +0 −518 docs/_build/html/_static/searchtools.js
  54. +0 −148 docs/_build/html/_static/sidebar.js
  55. +0 −16 docs/_build/html/_static/underscore.js
  56. +0 −90 docs/_build/html/genindex.html
  57. +0 −108 docs/_build/html/getting_started.html
  58. +0 −129 docs/_build/html/index.html
  59. +0 −153 docs/_build/html/installation.html
  60. BIN docs/_build/html/objects.inv
  61. +0 −96 docs/_build/html/search.html
  62. +0 −1 docs/_build/html/searchindex.js
  63. +1 −1 docs/conf.py
  64. +4 −4 docs/{ → getting_started}/getting_started.rst
  65. +64 −0 docs/getting_started/installation.rst
  66. +82 −0 docs/getting_started/installation_notes.rst
  67. +20 −11 docs/index.rst
  68. +0 −144 docs/installation.rst
  69. +0 −1 docs/{ → using_arkestra}/arkestra_generic_models.rst
  70. 0 docs/{ → using_arkestra}/image_sizing_system.rst
  71. 0 docs/{ → using_arkestra}/links_system.rst
  72. 0 docs/{ → using_arkestra}/migration.rst
  73. +1 −0 docs/{templates.rst.css → using_arkestra/templates.rst}
  74. 0 docs/{ → using_arkestra}/using_news_and_events.rst
  75. 0 docs/{ → using_arkestra}/video_system.rst
  76. +0 −17 example/arkestra_settings.py
  77. +10,137 −1 example/example_database.json
  78. +107 −87 example/settings.py
  79. +2 −5 example/urls.py
  80. 0 docs/displaying_the_titles_of_events.rst → example_14/example_14/__init__.py
  81. +58 −0 example_14/example_14/arkestra_settings.py
  82. +5 −0 example_14/example_14/deployment_settings.py
  83. +1 −0 example_14/example_14/example_database.json
  84. +8 −0 example_14/example_14/legacy_finders.py
  85. +144 −0 example_14/example_14/media/css/institute.css
  86. BIN example_14/example_14/media/filer/2011/06/30/0020n040.jpg
  87. BIN example_14/example_14/media/filer/2011/07/04/0020n040.jpg
  88. BIN example_14/example_14/media/filer/2011/07/05/0020n040.jpg
  89. BIN example_14/example_14/media/filer/2011/07/05/0020n040_1.jpg
  90. BIN example_14/example_14/media/filer/2011/07/06/07.jpg
  91. BIN example_14/example_14/media/filer/2011/07/06/335.jpg
  92. BIN example_14/example_14/media/filer/2011/07/06/84_evil-eye.gif
  93. BIN example_14/example_14/media/filer/2011/07/06/johncale.jpg
  94. BIN example_14/example_14/media/filer/2011/07/06/jonathan-richman-101.jpg
  95. BIN example_14/example_14/media/filer/2011/07/06/tooth.jpg
  96. BIN example_14/example_14/media/filer/2011/07/14/haddock.jpg
  97. BIN example_14/example_14/media/filer/2011/07/28/110.jpg
  98. BIN example_14/example_14/media/filer/2011/07/28/15644525.jpg
  99. BIN example_14/example_14/media/filer/2011/07/28/arrow-down.png
  100. BIN example_14/example_14/media/filer/2011/07/28/arrow-down_1.png
  101. BIN example_14/example_14/media/filer/2011/07/28/arrow-left.png
  102. BIN example_14/example_14/media/filer/2011/07/28/arrow-left_1.png
  103. BIN example_14/example_14/media/filer/2011/07/28/arrow-right.png
  104. BIN example_14/example_14/media/filer/2011/07/28/arrow-right_1.png
  105. BIN example_14/example_14/media/filer/2011/07/28/arrow-up.png
  106. BIN example_14/example_14/media/filer/2011/07/28/arrow-up_1.png
  107. BIN example_14/example_14/media/filer/2011/07/29/normal_carl_perkins.jpg
  108. BIN example_14/example_14/media/media.png
  109. +15 −0 example_14/example_14/requirements.txt
  110. +351 −0 example_14/example_14/settings.py
  111. +12 −0 example_14/example_14/templates/institute.html
  112. +26 −0 example_14/example_14/urls.py
  113. +28 −0 example_14/example_14/wsgi.py
  114. +10,492 −0 example_14/example_database.json
  115. +10 −0 example_14/manage.py
  116. +0 −1 housekeeping/clean_plugins.py
  117. +0 −1 housekeeping/tidy_links.py
  118. +4 −3 links/link_schemas.py
  119. +2 −3 links/models.py
  120. +15 −8 links/templates/admin/links/externalsite/change_list.html
  121. +0 −4 links/templatetags/link_tags.py
  122. +38 −17 links/tests.py
  123. +1 −1 news_and_events/admin.py
  124. +1 −2 news_and_events/feeds.py
  125. +1 −3 news_and_events/managers.py
  126. +9 −14 news_and_events/models.py
  127. +74 −23 news_and_events/templates/admin/news_and_events/event/change_list.html
  128. +130 −0 news_and_events/tests.py
  129. +8 −14 news_and_events/urls.py
  130. +22 −15 news_and_events/views.py
  131. +25 −0 setup.py
  132. +0 −1,665 support_files/Arkestra icons.graffle
  133. +0 −1,222 support_files/Arkestra logotypes.graffle
  134. +0 −934 support_files/institutes.graffle
  135. +1 −2 vacancies_and_studentships/managers.py
  136. +2 −4 vacancies_and_studentships/models.py
  137. +10 −12 vacancies_and_studentships/views.py
  138. +28 −15 video/admin.py
  139. +86 −87 video/cms_plugins.py
  140. +26 −7 video/models.py
View
@@ -9,6 +9,7 @@
*.swp
*.vi
*.cache
+*.egg-info
*~
*#
@@ -35,4 +36,5 @@ _assets
_design
_content
_tmp
-dist
+dist
+build
View
@@ -0,0 +1 @@
+v2.0pre1, 2012 06 17 -- First PyPI release
@@ -8,5 +8,7 @@ Jonas Obrist
Bjarni Þórisson
Luke Crooks
Kristian Oellegaard
+Barry Rowlingson
+Hamish Downer
... and if I have neglected to mention someone, please let me know!
File renamed without changes.
View
@@ -0,0 +1,11 @@
+# include *.txt
+# recursive-include docs *.txt
+graft arkestra_image_plugin
+graft arkestra_utilities
+graft arkestra_utilities
+graft contacts_and_people
+graft housekeeping
+graft links
+graft news_and_events
+graft vacancies_and_studentships
+graft video
@@ -1,11 +1,15 @@
+========
+Arkestra
+========
+
Arkestra is a semantic web publishing system for organisations, created in Django.
**Go straight to the develop branch**: https://github.com/evildmp/Arkestra/tree/develop
if you're a new user and don't need to worry about an existing installation. Also, use the
documentation of the develop branch: https://github.com/evildmp/Arkestra/blob/develop/docs/index.rst
Documentation & support
-***********************
+=======================
Documentation is in progress; what exists can be found at http://readthedocs.org/docs/arkestra/.
@@ -14,7 +18,7 @@ Documentation is in progress; what exists can be found at http://readthedocs.org
* IRC: #arkestra on irc.freenode.net
Relationship with django CMS
-****************************
+============================
Arkestra works alongside django CMS https://github.com/divio/django-cms/.
@@ -23,7 +27,7 @@ If you're already familiar with django CMS you can regard Arkestra as a set of a
Alternatively, Arkestra is a powerful system that uses django CMS's frameworks to publish information about an institution, its organisation, internal structures and relations with other institutions, people, news, events, place, vacancies, studentships and more.
Arkestra is intelligent
-***********************
+=======================
Arkestra has been designed to make the web editor's job as easy as possible.
@@ -32,22 +36,22 @@ It is an intelligent system - it structures information and makes use of connect
It uses these connections, explicit and implicit, to automate as much as can be automated, so that the web editor does not need to do anything that the system should have worked out for itself.
Arkestra is a semantic CMS
-**************************
+==========================
It's also a semantic system - it doesn't simply store data, but manages information according to a model of the real world. This means that every item of information in the system (including for example information published in Django CMS pages) has meaning because it is associated with real-world objects, and placed in their context.
Arkestra in practice
-********************
+====================
A large project
-===============
+---------------
Arkestra currently publishes the website of Cardiff University School of Medicine: http://medicine.cf.ac.uk/; this includes information about:
-1700 people, in
-2700 different roles, in
-160 entities (i.e. parts of the organisation), as well as
-330 news articles and 570 events.
+* 1700 people, in
+* 2700 different roles, in
+* 160 entities (i.e. parts of the organisation), as well as
+* 330 news articles and 570 events.
It also publishes over 10000 pages, around 90% of which are published automatically by the system.
@@ -56,15 +60,15 @@ All this information is managed by a team of over 40 web editors.
In other words it is suited to the needs of large organisations; it's robust and performs well.
Smaller projects
-================
+----------------
-It also works well for much smaller projects, its core concepts scale up and down effectively. Two much smaller sites using Arkestra include:
+Arkestra also works well for much smaller projects, its core concepts scale up and down effectively. Two much smaller sites using Arkestra include:
* http://aikidocardiff.com/
* http://thelaugharneweekend.com/
Work to be done
-***************
+===============
There is much work to be done in Arkestra. It works extremely well, but its codebase needs to be improved to conform with good practice and to make it possible to develop it effectively; it requires:
View
@@ -0,0 +1,10 @@
+-e hg+https://bitbucket.org/evildmp/semanticeditor#egg=semanticeditor
+-e git+https://github.com/evildmp/django-widgetry.git#egg=django-widgetry
+
+# for now, we need to pin filer to this version - 0.9 introduces backwards incompatible changes
+# http://django-filer.readthedocs.org/en/0.9/upgrading.html#upgrading
+# the example database will need to be upgraded before we can use the main branch
+# -e git+https://github.com/stefanfoulis/django-filer.git@develop#egg=django-filer
+
+-e git+https://github.com/stefanfoulis/django-filer.git@81c7304b8240279a5fe13bf769d7839fed72fba9#egg=django_filer-0.9a1-py2.6-feature/issue-213
+
@@ -5,7 +5,6 @@
from django.contrib import admin, messages
from django import forms
from django.db import models
-from django.conf import settings
from cms.plugin_pool import plugin_pool
from cms.plugin_base import CMSPluginBase
@@ -15,15 +14,14 @@
from widgetry.tabs.admin import ModelAdminWithTabs
from widgetry import fk_lookup
+from arkestra_utilities.settings import IMAGESET_ITEM_PADDING
from arkestra_utilities.output_libraries.plugin_widths import get_placeholder_width, calculate_container_width
from arkestra_utilities.admin_mixins import AutocompleteMixin, SupplyRequestMixin
from links import schema
from models import FilerImage, ImageSetItem, ImageSetPlugin
-IMAGESET_ITEM_PADDING = getattr(settings, "IMAGESET_ITEM_PADDING", 10)
-
# a dictionary to show how many items per row depending on the number of items
LIGHTBOX_COLUMNS = {1:1, 2:2, 3:3, 4:4, 5:5, 6:3, 7:4, 8:4, 9:3, 10:5, 11:4, 12:4, 13:5, 14:5, 15:5, 16:4, 17:6, 18:6, 19:5, 20:5, 21:6, 22:6, 23:6, 24:6, 25:5 }
@@ -339,6 +337,8 @@ class ImageSetItemEditor(SupplyRequestMixin, admin.StackedInline, AutocompleteMi
# related_search_fields = ['destination_content_type']
model=ImageSetItem
extra=1
+
+
fieldset_basic = ('', {'fields': (('image',),)})
fieldset_advanced = ('Caption', {
'fields': (( 'auto_image_title', 'manual_image_title'), ( 'auto_image_caption', 'manual_image_caption'),),
@@ -380,16 +380,26 @@ class ImageSetPublisher(SupplyRequestMixin, CMSPluginBase):
raw_id_fields = ('image',)
inlines = (ImageSetItemEditor,)
admin_preview = False
- fieldset_basic = ('Size & proportions', {'fields': (('kind', 'width', 'aspect_ratio',),)})
+ fieldset_basic = ('Size & proportions', {'fields': ('notes', ('kind', 'width', 'aspect_ratio',),)})
fieldset_advanced = ('Advanced', {'fields': (( 'float', 'height'),), 'classes': ('collapse',)})
fieldset_items_per_row = ('For Multiple and Lightbox plugins only', {'fields': ('items_per_row',), 'classes': ('collapse',)})
fieldsets = (fieldset_basic, fieldset_items_per_row, fieldset_advanced)
+ readonly_fields = ["notes", ]
def __init__(self, model = None, admin_site = None):
self.admin_preview = False
self.text_enabled = True
super(ImageSetPublisher, self).__init__(model, admin_site)
+ def notes(self,instance):
+ if not instance.imageset_item.count():
+ message = u"There are currently no items in this set."
+ elif instance.imageset_item.count() == 1:
+ message = u"There is currently only one item in this set."
+ else:
+ message = u"There are currently %s items in this set." % instance.imageset_item.count()
+ return message
+
def render(self, context, imageset, placeholder):
# don't do anything if there are no items in the imageset
@@ -1,7 +1,6 @@
from __future__ import division
from django.shortcuts import render_to_response, get_object_or_404
-from django.conf import settings
from django.template import RequestContext
from easy_thumbnails.files import get_thumbnailer
@@ -61,6 +61,7 @@ def formfield_for_manytomany(self, db_field, request, **kwargs):
return super(AutocompleteMixin, self).formfield_for_manytomany(db_field, request, **kwargs)
+
class InputURLMixin(forms.ModelForm):
input_url = forms.CharField(max_length=255, required = False,
help_text=u"Enter the URL of an external item that you want <strong>automatically</strong> added to the database, but first check carefully using <strong>External URL</strong> (above) to make sure it's really not there.",
@@ -85,5 +86,6 @@ class InputURLMixin(forms.ModelForm):
'url': ('If this is an external item', {'fields': ('external_url', 'input_url',)}),
'slug': ('If this is an internal item', {'fields': ('slug',)}),
'location': ('', {'fields': ('precise_location', 'access_note',)}),
+ 'address_report': ('', {'fields': ('address_report',)}),
'email': ('', {'fields': ('email',)}),
}
@@ -1,12 +1,12 @@
-from django.conf import settings
+from arkestra_utilities.settings import PAGE_TITLE_HEADING_LEVEL, IN_BODY_HEADING_LEVEL, IN_BODY_HEADING_LEVEL, MULTIPLE_ENTITY_MODE
def arkestra_templates(request):
"""
Adds useful Arkestra information to the context.
"""
return {
- 'PAGE_TITLE_HEADING_LEVEL': settings.PAGE_TITLE_HEADING_LEVEL,
- 'IN_BODY_HEADING_LEVEL': settings.IN_BODY_HEADING_LEVEL,
- "SHOW_EVENT_TYPES": settings.SHOW_EVENT_TYPES,
- "MULTIPLE_ENTITY_MODE": settings.MULTIPLE_ENTITY_MODE,
+ 'PAGE_TITLE_HEADING_LEVEL': PAGE_TITLE_HEADING_LEVEL,
+ 'IN_BODY_HEADING_LEVEL': IN_BODY_HEADING_LEVEL,
+ "SHOW_EVENT_TYPES": IN_BODY_HEADING_LEVEL,
+ "MULTIPLE_ENTITY_MODE": MULTIPLE_ENTITY_MODE,
}
@@ -1,20 +1,22 @@
+from datetime import datetime
+
from django.utils.translation import ugettext_lazy as _
from django.db import models
-from django.conf import settings
from django.contrib.contenttypes.models import ContentType
-from datetime import datetime
+
+from django.conf import settings
+
from cms.models.fields import PlaceholderField
from filer.fields.image import FilerImageField
+from arkestra_utilities.settings import PLUGIN_HEADING_LEVELS, PLUGIN_HEADING_LEVEL_DEFAULT
+
from links.models import ObjectLink
-from contacts_and_people.models import Entity, Person, default_entity_id, default_entity
+from contacts_and_people.models import Entity, Person
from contacts_and_people.templatetags.entity_tags import work_out_entity
-PLUGIN_HEADING_LEVELS = settings.PLUGIN_HEADING_LEVELS
-PLUGIN_HEADING_LEVEL_DEFAULT = settings.PLUGIN_HEADING_LEVEL_DEFAULT
-
class ArkestraGenericModel(models.Model):
class Meta:
abstract = True
@@ -35,11 +37,15 @@ class Meta:
image = FilerImageField(null=True, blank=True)
# universal plugin fields
- hosted_by = models.ForeignKey(Entity, default=default_entity_id,
+ hosted_by = models.ForeignKey(Entity, default=Entity.objects.default_entity_id(),
related_name='%(class)s_hosted_events', null=True, blank=True,
help_text=u"The entity responsible for publishing this item")
- publish_to = models.ManyToManyField(Entity, null=True, blank=True, related_name="%(class)s_publish_to",
- help_text=u"Use these sensibly - don't send minor items to the home page, for example")
+ publish_to = models.ManyToManyField(
+ Entity, verbose_name="Also publish to",
+ null=True, blank=True,
+ related_name="%(class)s_publish_to",
+ help_text=u"Use these sensibly - don't send minor items to the home page, for example.",
+ )
please_contact = models.ManyToManyField(Person, related_name='%(class)s_person',
help_text=u"The person to whom enquiries about this should be directed",
null=True, blank=True)
@@ -66,28 +72,31 @@ def get_importance(self):
@property
def get_hosted_by(self):
- return self.hosted_by or default_entity
+ return self.hosted_by or Entity.objects.base_entity()
@property
def get_template(self):
- return self.get_hosted_by.get_template()
+ if self.get_hosted_by:
+ return self.get_hosted_by.get_template()
+ else:
+ return settings.CMS_TEMPLATES[0][0]
@property
def get_entity(self):
"""
Real-world information, can be None
"""
- return self.hosted_by or Entity.objects.get(id=default_entity_id)
+ return self.hosted_by or Entity.objects.get(id=Entity.objects.base_entity())
- @property
- def get_website(self):
- """
- for internal Arkestra purposes only
- """
- if self.get_entity:
- return self.get_entity.get_website
- else:
- return None
+ # @property
+ # def get_website(self):
+ # """
+ # for internal Arkestra purposes only
+ # """
+ # if self.get_entity:
+ # return self.get_entity.get_website
+ # else:
+ # return None
@property
def links(self):
@@ -4,9 +4,7 @@
from django.db import models
from django.db.models import Q
-from django.conf import settings
-
-MULTIPLE_ENTITY_MODE = settings.MULTIPLE_ENTITY_MODE
+from arkestra_utilities.settings import MULTIPLE_ENTITY_MODE
class ArkestraGenericModelManager(models.Manager):
def get_by_natural_key(self, slug):
@@ -11,11 +11,10 @@
from datetime import datetime
-main_news_events_page_list_length = settings.MAIN_NEWS_EVENTS_PAGE_LIST_LENGTH
-arkestra_menus = settings.ARKESTRA_MENUS
+from arkestra_utilities.settings import MAIN_NEWS_EVENTS_PAGE_LIST_LENGTH, ARKESTRA_MENUS
-for menu in arkestra_menus:
+for menu in ARKESTRA_MENUS:
if menu["cms_plugin_model_name"]:
plugin = __import__(menu["plugins_module"], globals(), locals(), [menu["cms_plugin_model_name"],], -1)
menu["cms_plugin_model"] = getattr(plugin, menu["cms_plugin_model_name"])
@@ -68,7 +67,7 @@ def modify(self, request, nodes, namespace, root_id, post_cut, breadcrumb):
self.request = request
- if arkestra_menus and not post_cut:
+ if ARKESTRA_MENUS and not post_cut:
key = "ArkestraPages.modify()" + request.path + "pre_cut"
cached_pre_cut_nodes = cache.get(key, None)
if cached_pre_cut_nodes:
@@ -84,7 +83,7 @@ def modify(self, request, nodes, namespace, root_id, post_cut, breadcrumb):
node.entity = False
else:
node.entity = page.entity.all()[0]
- for menu in arkestra_menus:
+ for menu in ARKESTRA_MENUS:
self.do_menu(node, menu, node.entity)
# self.create_new_node(
@@ -116,7 +115,7 @@ def do_menu(self, node, menu, entity):
# create an instance of the plugin class editor with appropriate attributes
instance = cms_plugin_model.model(
entity = entity,
- limit_to = main_news_events_page_list_length
+ limit_to = MAIN_NEWS_EVENTS_PAGE_LIST_LENGTH
)
instance.type = "menu"
instance.view = "current"
@@ -35,8 +35,6 @@ def __unicode__(self):
# from contacts_and_people.models import Entity #, Person, default_entity_id
# from contacts_and_people.templatetags.entity_tags import work_out_entity
-# PLUGIN_HEADING_LEVELS = settings.PLUGIN_HEADING_LEVELS
-# PLUGIN_HEADING_LEVEL_DEFAULT = settings.PLUGIN_HEADING_LEVEL_DEFAULT
#
# class ArkestraGenericModel(models.Model):
# class Meta:
Oops, something went wrong.

0 comments on commit 0e289cc

Please sign in to comment.