{ "info": { "author": "Peter van Kampen", "author_email": "pterk@datatailors.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "=====================\ndjango-contentmanager\n=====================\n\ndjango-contentmanager is a so-called 'reusable app' to, wait for it,\nmanage content. It does so using plugins that can be scattered over\nany number of apps, each providing specific types of content. A plugin\ncould list the ten most popular news-stories, highest rated vegetarian\ndishes or show a selected gallery from a photo-collection app. Of\ncourse it could also be a block of (marked up) text.\n\n.. contents:: Table of Contents\n\nQuick start\n-----------\n\nTo try it out clone the repository_ and go to the demoproject-dir.\n\nAssuming you have django on your PYTHONPATH you should be up and\nrunning with these commands::\n\n $./manage.py syncdb --noinput\n ...\n $./manage.py runserver\n\nThen open your browser and go to http://localhost:8000/. \n\nThis will bring up a rather plain page (with this README) as an\nexample of a 'paragraph'. If you follow the 'login' link you will go\nto the admin where you can login with test/test. In your normal\nproject you would have to provide a nicer mechanism for your users to\nlog in (and out) but this is just a quick demo so I'll leave that as\nan exercise for the reader.\n\nBack at http://localhost:8000/ you will now see a link 'Editmode\nOn'. This will turn on 'editmode' and allow you to add, edit and\ndelete plugins in an, in my opion, intuitive way. Right there on the\npage: No need to swich back and forth between admin and 'frontend' but\ninstant feedback.\n\nUsing the contentmanager\n------------------------\n\nTo use the contentmanager in your project or application you'll need\nto add the contentmanager to your INSTALLED_APPS in settings.py::\n\n INSTALLED_APPS = (\n ...\n 'contentmanager',\n ...\n )\n\nmake sure your project uses the request-context-processsor::\n\n TEMPLATE_CONTEXT_PROCESSORS = (\n \"django.core.context_processors.auth\",\n \"django.core.context_processors.debug\",\n \"django.core.context_processors.i18n\",\n \"django.core.context_processors.media\",\n \"django.core.context_processors.request\"\n )\n\nand finally include contentmanager.urls in your urls.py and run\nautodiscover::\n\n\n urlpatterns = patterns(\n '',\n ...\n (r'^contentmanager/', include('contentmanager.urls')),\n ...\n )\n\n from contentmanager import autodiscover\n autodisvover()\n\n \n\nand hook up the the contentmanager in your template(s)::\n\n {% load contentmanagertags %}\n {% block content %}\n {% get_area request 'content' %}\n {% end block %}\n\n {% block sidebar %}\n {% get_area request 'sidebar' %}\n {% end block %}\n\nWriting plugins\n---------------\n\nIncluded with the demoapp are a few simple plugin examples (in\nbasicblocks/reveplugins.py) to give you the basic idea.\n\nTo write your own plugins you have to add a reveplugins module to you\napplication and subclass from contentmanager.plugins.BasePlugin (or\nBaseModelPlugin). The most basic plugins just need to define their own\nrender method. The render method is passed the request object and\nshould return a (unicode) string::\n\n class HelloWorld(BasePlugin):\n def render(self, request):\n return \"Hello world\"\n\nTo make the plugin available to the contentmanager and ultimately your\nusers you need to register it::\n\n from contentmanager import registry\n registry.register(HelloWorld)\n\nFinally, to populate the registry you should include the following in\nyour projects urls.py::\n\n from contentmanager import autodiscover\n autodiscover()\n\nThis will find all reveplugins modules in all your INSTALLED_APPS and\nload any registered plugins.\n\n .. note:: \n The name reveplugins was chosen over simply 'plugins' to\n prevent naming conflicts. Since the contentmanager is distilled\n from reveCMS_ it seemed an appropriate enough name. ReveCMS\n itself is named afer Karel van het Reve_, a dutch writer, not to\n be confused with his brother Gerard_ although he is also a fine\n writer.\n\nPermissions\n-----------\n\nPlugins roughly follow the same permission system as\ndjango-models. When a plugin is registered the contentmanager\nautomatically creates add, change and delete permissions. Since these\npermissions could collide with model permissions all plugin\npermissions are kept in the contentmanager 'namespace' (linked to the\ncontent_type PluginType if you really want to know) and are appended\nwith '_plugin'. \n\nFor example, a HTML-plugin would have the permissions\n'contentmanager.add_html_plugin', 'contentmanager.delete_html_plugin',\n'contentmanager.delete_html_plugin'.\n\nPlugins have convenient `has_add_permission`, `has_change_permission`,\n`has_delete_permission` methods but if you use the proper codename as\nexplained above you can use the standard django permissions system in\nboth python- and templatecode.\n\nPlugins can also add additional permissions in the same manner as\n`django models`_ do except that they are all 'bound' to PluginType. \n\nTODO\n----\n\n* More complex plugin example\n* BaseModelPlugin example\n* Plugin API overview \n\n.. _reveCMS: http://www.co-capacity.org/ \n.. _Reve: http://en.wikipedia.org/wiki/Karel_van_het_Reve\n.. _Gerard: http://en.wikipedia.org/wiki/Gerard_Reve\n.. _repository: http://bitbucket.org/pterk/django-contentmanager/\n.. _django models: http://docs.djangoproject.com/en/dev/ref/models/options/#permissions", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/pterk/django-contentmanager/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-contentmanager", "package_url": "https://pypi.org/project/django-contentmanager/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-contentmanager/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/pterk/django-contentmanager/" }, "release_url": "https://pypi.org/project/django-contentmanager/2012.5.9/", "requires_dist": null, "requires_python": null, "summary": "A simple, pluggable content-manager for django.", "version": "2012.5.9" }, "last_serial": 789372, "releases": { "10.4.2": [ { "comment_text": "", "digests": { "md5": "69a87f5e1a468928aa0bd3b42a9f624a", "sha256": "ff69b474ba9b00e9ef11b8477fe5062f76ee9d2c6f0153747c2b573066dd5c40" }, "downloads": -1, "filename": "django-contentmanager-10.4.2.tar.gz", "has_sig": false, "md5_digest": "69a87f5e1a468928aa0bd3b42a9f624a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 95518, "upload_time": "2010-04-22T15:55:39", "url": "https://files.pythonhosted.org/packages/a1/a6/f0eb90f06e69de2c3841239d40f85177d21d2058a166132f4d0cf4e74b45/django-contentmanager-10.4.2.tar.gz" } ], "11.10.2": [ { "comment_text": "", "digests": { "md5": "b3c6768509b579cffaee3a1277923c23", "sha256": "b1e5617fd28294f86936922754b9369a072bcfb98125e99924965b289f9f8b28" }, "downloads": -1, "filename": "django-contentmanager-11.10.2.tar.gz", "has_sig": false, "md5_digest": "b3c6768509b579cffaee3a1277923c23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 97328, "upload_time": "2011-10-25T14:16:37", "url": "https://files.pythonhosted.org/packages/a2/31/4885a6d7c82879d56de8639e6dbe5880f9a828104adee1b84c53414e21c2/django-contentmanager-11.10.2.tar.gz" } ], "2012.5.9": [ { "comment_text": "", "digests": { "md5": "82aa95495f17e928e112ea4c8238f903", "sha256": "1e35e1e1ae08fe35a485e000b1915376a08863365fcaeea8e1665e3bb848d8fa" }, "downloads": -1, "filename": "django-contentmanager-2012.5.9.tar.gz", "has_sig": false, "md5_digest": "82aa95495f17e928e112ea4c8238f903", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 97562, "upload_time": "2012-05-09T19:20:31", "url": "https://files.pythonhosted.org/packages/a3/4d/a2fb9cdadc958f873beaaf0187a1d3d2751c73efcbaf0475ddd5442bafe0/django-contentmanager-2012.5.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "82aa95495f17e928e112ea4c8238f903", "sha256": "1e35e1e1ae08fe35a485e000b1915376a08863365fcaeea8e1665e3bb848d8fa" }, "downloads": -1, "filename": "django-contentmanager-2012.5.9.tar.gz", "has_sig": false, "md5_digest": "82aa95495f17e928e112ea4c8238f903", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 97562, "upload_time": "2012-05-09T19:20:31", "url": "https://files.pythonhosted.org/packages/a3/4d/a2fb9cdadc958f873beaaf0187a1d3d2751c73efcbaf0475ddd5442bafe0/django-contentmanager-2012.5.9.tar.gz" } ] }