Permalink
Browse files

Initial version: creates a repository type

  • Loading branch information...
0 parents commit 319c9c2abc8ad5552d15e0a20a4e39db93aa3d57 @lentinj lentinj committed Sep 21, 2011
@@ -0,0 +1,6 @@
+Introduction
+============
+
+
+
+This product may contain traces of nuts.
@@ -0,0 +1,7 @@
+Changelog
+=========
+
+1.0dev (unreleased)
+-------------------
+
+- Initial release
@@ -0,0 +1,17 @@
+plone.app.mediarepository Installation
+--------------------------------
+
+To install plone.app.mediarepository using zc.buildout and the plone.recipe.zope2instance
+recipe to manage your project, you can do this:
+
+* Add ``plone.app.mediarepository`` to the list of eggs to install, e.g.:
+
+ [buildout]
+ ...
+ eggs =
+ ...
+ plone.app.mediarepository
+
+* Re-run buildout, e.g. with:
+
+ $ ./bin/buildout

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,15 @@
+ plone.app.mediarepository is copyright
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License version 2 as published by
+ the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ MA 02111-1307 USA.
@@ -0,0 +1,27 @@
+Metadata-Version: 1.0
+Name: plone.app.mediarepository
+Version: 1.0
+Summary: Media repository using dexterity and deco
+Home-page: http://svn.plone.org/svn/collective/
+Author: UNKNOWN
+Author-email: UNKNOWN
+License: GPL
+Description: Introduction
+ ============
+
+
+
+ This product may contain traces of nuts.
+
+ Changelog
+ =========
+
+ 1.0dev (unreleased)
+ -------------------
+
+ - Initial release
+
+Platform: UNKNOWN
+Classifier: Framework :: Plone
+Classifier: Programming Language :: Python
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
@@ -0,0 +1,16 @@
+README.txt
+setup.cfg
+setup.py
+plone/__init__.py
+plone.app.mediarepository.egg-info/PKG-INFO
+plone.app.mediarepository.egg-info/SOURCES.txt
+plone.app.mediarepository.egg-info/dependency_links.txt
+plone.app.mediarepository.egg-info/entry_points.txt
+plone.app.mediarepository.egg-info/namespace_packages.txt
+plone.app.mediarepository.egg-info/not-zip-safe
+plone.app.mediarepository.egg-info/paster_plugins.txt
+plone.app.mediarepository.egg-info/requires.txt
+plone.app.mediarepository.egg-info/top_level.txt
+plone/app/__init__.py
+plone/app/mediarepository/__init__.py
+plone/app/mediarepository/tests.py
@@ -0,0 +1,5 @@
+
+ # -*- Entry points: -*-
+ [z3c.autoinclude.plugin]
+ target = plone
+
@@ -0,0 +1,2 @@
+plone
+plone.app
@@ -0,0 +1 @@
+
@@ -0,0 +1 @@
+ZopeSkel
@@ -0,0 +1,2 @@
+setuptools
+plone.app.dexterity
@@ -0,0 +1 @@
+plone
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
Binary file not shown.
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
Binary file not shown.
@@ -0,0 +1,36 @@
+Integration Tests
+-----------------
+
+This is a DocTest file, using the Python doctest format.
+
+In an integration test, here's some of the globals you have to work with::
+
+ >>> portal
+ <PloneSite at /plone>
+
+ >>> portal_name
+ 'plone'
+
+ >>> folder
+ <ATFolder at /plone/Members/test_user_1_>
+
+ >>> user_name
+ 'test_user_1_'
+
+ >>> user_password
+ 'secret'
+
+ >>> user_role
+ 'test_role_1_'
+
+ >>> app.REQUEST
+ <HTTPRequest, URL=http://nohost>
+
+ >>> app
+ <Application at >
+
+Now, let's demonstrate a failing test::
+
+ >>> 1 == 2
+ True
+
@@ -0,0 +1,4 @@
+from zope.i18nmessageid import MessageFactory
+
+# Set up the i18n message factory for our package
+MessageFactory = MessageFactory('plone.app.mediarepository')
Binary file not shown.
@@ -0,0 +1,30 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:five="http://namespaces.zope.org/five"
+ xmlns:i18n="http://namespaces.zope.org/i18n"
+ xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
+ xmlns:grok="http://namespaces.zope.org/grok"
+ xmlns:plone="http://namespaces.plone.org/plone"
+ i18n_domain="plone.app.mediarepository">
+
+ <!-- Include configuration for dependencies listed in setup.py -->
+ <includeDependencies package="." />
+
+ <!-- Grok the package to initialise schema interfaces and content classes -->
+ <grok:grok package="." />
+
+ <i18n:registerTranslations directory="locales" />
+
+ <!-- Register an extension profile to make the product installable
+ in Plone -->
+ <genericsetup:registerProfile
+ name="default"
+ title="Media repository using dexterity and deco"
+ directory="profiles/default"
+ description="Extension profile for Media repository using dexterity and deco"
+ provides="Products.GenericSetup.interfaces.EXTENSION"
+ />
+
+ <!-- -*- extra stuff goes here -*- -->
+
+</configure>
@@ -0,0 +1,2 @@
+Text string translations will be added in this folder (gettext .po files).
+
@@ -0,0 +1,6 @@
+<metadata>
+ <version>1</version>
+ <dependencies>
+ <dependency>profile-plone.app.dexterity:default</dependency>
+ </dependencies>
+</metadata>
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!-- This file registers new types with portal_types. The types are
+ then configured with the corresponding files in types/*.xml. Note
+ that spaces are allowed in type names, but the corresponding XML file
+ uses an underscore instead. The "Factory-based Type Information with
+ dynamic views" refers to an FTI from Products.CMFDynamicViewFTI,
+ which supports Plone's "display" menu.
+ -->
+<object name="portal_types" meta_type="Plone Types Tool">
+ <object name="media_repository" meta_type="Dexterity FTI"/>
+</object>
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<object name="media_repository" meta_type="Dexterity FTI"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Media Repository</property>
+ <property name="description">None</property>
+ <property name="icon_expr">string:${portal_url}/folder_icon.png</property>
+ <property name="factory">media_repository</property>
+ <property name="link_target"></property>
+ <property name="immediate_view">view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">False</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="default_view">view</property>
+ <property name="view_methods">
+ <element value="view"/>
+ </property>
+ <property name="default_view_fallback">False</property>
+ <property name="add_permission">cmf.AddPortalContent</property>
+ <property name="klass">plone.dexterity.content.Container</property>
+ <property name="behaviors">
+ <element value="plone.app.content.interfaces.INameFromTitle"/>
+ <element value="plone.app.dexterity.behaviors.metadata.IBasic"/>
+ </property>
+ <property name="schema"></property>
+ <property name="model_source">
+ &lt;model xmlns="http://namespaces.plone.org/supermodel/schema"&gt;
+ &lt;schema&gt;
+ &lt;/schema&gt;
+ &lt;/model&gt;</property>
+ <property name="model_file"></property>
+ <alias from="(Default)" to="(dynamic view)"/>
+ <alias from="edit" to="@@edit"/>
+ <alias from="sharing" to="@@sharing"/>
+ <alias from="view" to="(selected layout)"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+ icon_expr="" link_target="" url_expr="string:${object_url}"
+ visible="True">
+ <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+ icon_expr="" link_target="" url_expr="string:${object_url}/edit"
+ visible="True">
+ <permission value="Modify portal content"/>
+ </action>
+</object>
@@ -0,0 +1,11 @@
+Use the static directory for non-template browser resources like images,
+stylesheets and JavaScript.
+
+Contents of this folder may be addressed in templates via view/static. For
+example, if you placed at test.js resource in this folder, you could insert it
+via template code like:
+
+<script type="text/javascript" src="test.js"
+ tal:attributes="src string:${view/static}/test.js"></script>
+
+Static folder resources are public.
@@ -0,0 +1,62 @@
+import doctest
+import unittest
+
+from Testing import ZopeTestCase as ztc
+
+from Products.Five import zcml
+from Products.PloneTestCase import PloneTestCase as ptc
+from Products.PloneTestCase.layer import PloneSite
+from Products.PloneTestCase.layer import onsetup
+
+import plone.app.mediarepository
+
+OPTION_FLAGS = doctest.NORMALIZE_WHITESPACE | \
+ doctest.ELLIPSIS
+
+ptc.setupPloneSite(products=['plone.app.mediarepository'])
+
+
+class TestCase(ptc.PloneTestCase):
+
+ class layer(PloneSite):
+
+ @classmethod
+ def setUp(cls):
+ zcml.load_config('configure.zcml',
+ plone.app.mediarepository)
+
+ @classmethod
+ def tearDown(cls):
+ pass
+
+
+def test_suite():
+ return unittest.TestSuite([
+
+ # Unit tests
+ #doctestunit.DocFileSuite(
+ # 'README.txt', package='plone.app.mediarepository',
+ # setUp=testing.setUp, tearDown=testing.tearDown),
+
+ #doctestunit.DocTestSuite(
+ # module='plone.app.mediarepository.mymodule',
+ # setUp=testing.setUp, tearDown=testing.tearDown),
+
+
+ # Integration tests that use PloneTestCase
+ ztc.ZopeDocFileSuite(
+ 'INTEGRATION.txt',
+ package='plone.app.mediarepository',
+ optionflags = OPTION_FLAGS,
+ test_class=TestCase),
+
+ #ztc.FunctionalDocFileSuite(
+ # 'BROWSER.TXT',
+ # package='plone.app.mediarepository',
+ # optionflags = OPTION_FLAGS,
+ # test_class=TestCase),
+
+ ])
+
+if __name__ == '__main__':
+ unittest.main(defaultTest='test_suite')
@@ -0,0 +1,40 @@
+from setuptools import setup, find_packages
+import os
+
+version = '1.0'
+
+setup(name='plone.app.mediarepository',
+ version=version,
+ description="Media repository using dexterity and deco",
+ long_description=open("README.txt").read() + "\n" +
+ open(os.path.join("docs", "HISTORY.txt")).read(),
+ # Get more strings from
+ # http://pypi.python.org/pypi?%3Aaction=list_classifiers
+ classifiers=[
+ "Framework :: Plone",
+ "Programming Language :: Python",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ ],
+ keywords='',
+ author='',
+ author_email='',
+ url='http://svn.plone.org/svn/collective/',
+ license='GPL',
+ packages=find_packages(exclude=['ez_setup']),
+ namespace_packages=['plone','plone.app'],
+ include_package_data=True,
+ zip_safe=False,
+ install_requires=[
+ 'setuptools',
+ 'plone.app.dexterity',
+ # -*- Extra requirements: -*-
+ ],
+ entry_points="""
+ # -*- Entry points: -*-
+ [z3c.autoinclude.plugin]
+ target = plone
+ """,
+ setup_requires=["PasteScript"],
+ paster_plugins = ["ZopeSkel"],
+
+ )

0 comments on commit 319c9c2

Please sign in to comment.