{ "info": { "author": "marteinn", "author_email": "martin.sandstrom@frojd.se", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Utilities" ], "description": "|Build Status| |PyPI version|\n\nWagtail System Text\n===================\n\nThis is a library that enables cms editors to update static test in\nWagtail. By using identifiers developers mark the strings that can be\nupdated by the editor/moderator from the cms.\n\nA template identifier can look like this ``{% systemtext \"title\" %}``.\nWhen this identifier are evaluated it will be added to the cms under the\nsection **Settings / System Text** under the name ``title``. The entry\nhas a field called ``string`` that can be updated, this is the text that\nwill be rendered to the website users.\n\nIdentifiers can also be grouped, by using the group argument\n``{% systemtext \"title\" group \"headlines\" %}`` we can make management\neasier, identifiers without group will be assigned to the ``general``\ngroup.\n\nBy default identifiers will added in lazy mode, so for instance when a\nsite renders a idenifier it will be added to that sites set of\nidentifiers. The are also management commands that both searches through\nyour code base and finds suiteable identifiers\n(``find_and_add_systemtext``), syncs then betweeen sites\n(``sync_systemtext``) and manual add/delete commands (``add_systemtext``\n/ ``delete_systemtext``).\n\nRequirements\n------------\n\n- Python 2.7\n- Django 1.8+\n- Wagtail 1.7+\n\nInstallation\n------------\n\nInstall the library with pip:\n\n.. code:: bash\n\n $ pip install wagtailsystemtext\n\nQuick Setup\n-----------\n\nMake sure ``wagtail.contrib.modeladmin`` and ``wagtailsystemtext`` is\nadded to your ``INSTALLED_APPS``.\n\n.. code:: python\n\n INSTALLED_APPS = (\n # ...\n 'wagtail.contrib.modeladmin',\n 'wagtailsystemtext',\n )\n\nThen add SiteSystemTextMiddleware to your middlewares, make sure you add\nit after ``wagtail.wagtailcore.middleware.SiteMiddleware``\n\n.. code:: python\n\n MIDDLEWARE_CLASSES = (\n # ...\n 'wagtail.wagtailcore.middleware.SiteMiddleware',\n 'wagtailsystemtext.middlewares.SiteSystemTextMiddleware',\n )\n\nDone!\n\nUsage\n-----\n\nOverall the implementation follows the same convention of django\ntranslations.\n\nStrings\n~~~~~~~\n\nThis is how you work with regular text, supply identifer and group and\nretrive the systemtext string.\n\n.. code:: python\n\n from wagtailsystemtext.utils import systemtext as _st\n\n _st('my_text')\n _st('main_label', group='buttons')\n _st('main_label', group='buttons', default='My label')\n\nLazy strings\n~~~~~~~~~~~~\n\nLazy strings are run when called upon, when for instance you want to\ninitialize a systemtext retrival before the middleware has run. Like in\na admin interface.\n\n.. code:: python\n\n from wagtailsystemtext.utils import systemtext_lazy as _st\n\n _st('my_text')\n _st('main_label', group='buttons')\n _st('main_label', group='buttons', default='My label')\n\nTemplates\n~~~~~~~~~\n\nSystemtext contains a templatetag called systemtext, that behaves in the\nsame way as Djangos ``{% trans... %}``\n\nTemplatetags\n^^^^^^^^^^^^\n\n.. code:: python\n\n {% load systemtext %}\n\n {% systemtext \"my_text\" %}\n {% systemtext \"main_label\" group \"buttons\" %}\n {% systemtext \"main_label\" group \"buttons\" default \"My label\" %}\n\nManagement commands\n-------------------\n\n- ``find_and_add_systemtext``: Finds the systemtext identifiers in your\n applications (by looking for ``_st`` and ``{% systemtext ... %}``)\n and adds them to each wagtail site).\n- ``add_systemtext``: Add identifier to site(s)\n- ``delete_systemtext``: Remove identifiers from site(s)\n- ``sync_systemtext``: Sync identifiers between sites to make sure they\n contain the same\n- ``list_systemtext``: List all active systemtext\n\nSettings\n--------\n\n- ``SYSTEMTEXT_CACHE_PREFIX``: Cache prefix (``\"wagtailsystemtext\"`` by\n default)\n- ``SYSTEMTEXT_CACHE_EXPIRY``: Cache expiry in seconds (10 min by\n default)\n- ``SYSTEMTEXT_REBUILD_ON_SAVE``: If cache should be rebuilt on save\n (``True`` by default)\n- ``SYSTEMTEXT_USE_DEFAULT_ON_EMPTY``: If present, use default value\n when string is empty (``False`` by default)\n\nRelease start\n~~~~~~~~~~~~~\n\nThese hooks will automatically bump the application version when using\n``git flow release ...``\n\n.. code:: bash\n\n chmod +x $PWD/git-hooks/bump-version.sh\n ln -nfs $PWD/git-hooks/bump-version.sh .git/hooks/post-flow-release-start\n ln -nfs $PWD/git-hooks/bump-version.sh .git/hooks/post-flow-hotfix-start\n\nRoadmap\n-------\n\n- [x] ``trans`` template tag support\n- [x] Wagtail admin view with site permissions\n- [x] Cache-rebild on save through admin\n- [x] Default text support (on declaration)\n- [x] Lazy text transforms\n- [x] Add setting for fallbacking to default if string is empty\n- [x] Automatic tag discovery\n- [x] Sync command between sites\n- [ ] Group filter in Wagtail admin\n- [ ] Last accessed timestamps\n- [ ] ``blocktrans`` template tag support\n\nContributing\n------------\n\nWant to contribute? Awesome. Just send a pull request.\n\nLicense\n-------\n\nWagtail System Text is released under the `MIT\nLicense `__.\n\n.. |Build Status| image:: https://travis-ci.org/Frojd/wagtail-systemtext.svg?branch=master\n :target: https://travis-ci.org/Frojd/wagtail-systemtext\n.. |PyPI version| image:: https://badge.fury.io/py/wagtailsystemtext.svg\n :target: https://badge.fury.io/py/wagtailsystemtext\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/frojd/wagtail-systemtext", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "wagtailsystemtext", "package_url": "https://pypi.org/project/wagtailsystemtext/", "platform": "", "project_url": "https://pypi.org/project/wagtailsystemtext/", "project_urls": { "Homepage": "https://github.com/frojd/wagtail-systemtext" }, "release_url": "https://pypi.org/project/wagtailsystemtext/1.2.2/", "requires_dist": null, "requires_python": "", "summary": "Simplified Wagtail system text management", "version": "1.2.2" }, "last_serial": 3846420, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "a7d26ef7ff1aee6026b6a3cac22a169e", "sha256": "0e571781af36b936b74bb58c8c25d4b5434c1cf4993366c460b6b2b33a39df51" }, "downloads": -1, "filename": "wagtailsystemtext-1.0.0.tar.gz", "has_sig": false, "md5_digest": "a7d26ef7ff1aee6026b6a3cac22a169e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7032, "upload_time": "2016-12-20T15:07:27", "url": "https://files.pythonhosted.org/packages/b4/77/bc47ce5548dc2bbb579e3358b81f3c8a2fafa8f9e023a54d8b7da4869544/wagtailsystemtext-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "5aa23f6d989d71fdd1cc3ab3c594601d", "sha256": "f61d6b75648a151922ff608154cf6b72a46b5c9cd3932d07fcadbf6900589c8e" }, "downloads": -1, "filename": "wagtailsystemtext-1.0.1.tar.gz", "has_sig": false, "md5_digest": "5aa23f6d989d71fdd1cc3ab3c594601d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8400, "upload_time": "2016-12-20T15:37:06", "url": "https://files.pythonhosted.org/packages/65/44/c9050b2e1c375713861a194159e4bf98a39abdd2cc93b5bd143a9c7f57f6/wagtailsystemtext-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "a8d4952249b10be2cd757cd34abe5028", "sha256": "575db142c3917390ec2123923fa16023361b6c7896b433a2e9c886e34483be2d" }, "downloads": -1, "filename": "wagtailsystemtext-1.0.2.tar.gz", "has_sig": false, "md5_digest": "a8d4952249b10be2cd757cd34abe5028", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8478, "upload_time": "2016-12-20T21:21:13", "url": "https://files.pythonhosted.org/packages/47/07/c7a02fda88e760ed94b3320cd644de68a9cfe26e58d3cb3f2b544fa46fbf/wagtailsystemtext-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "18dedb86a2980b55477bf6959b5736ed", "sha256": "47e7ddfe66928669364b2ec97f74e7081f5a87d6ee9977ebe252e957776751b4" }, "downloads": -1, "filename": "wagtailsystemtext-1.0.3.tar.gz", "has_sig": false, "md5_digest": "18dedb86a2980b55477bf6959b5736ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10013, "upload_time": "2016-12-21T15:09:23", "url": "https://files.pythonhosted.org/packages/31/c9/cae322eec1061a4b21cbb31b91f7a8535e6aed39a274fc82a48d785463d2/wagtailsystemtext-1.0.3.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "b2cd4f68b21756140dd4100efc6bd46c", "sha256": "51904f4d17edc9d21ed3f4a4dc12107200ed6c3c94780ad817f270cef85dff9b" }, "downloads": -1, "filename": "wagtailsystemtext-1.1.0.tar.gz", "has_sig": false, "md5_digest": "b2cd4f68b21756140dd4100efc6bd46c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12688, "upload_time": "2016-12-28T13:01:58", "url": "https://files.pythonhosted.org/packages/85/00/873aae9bcc428ef292c6e0425f5415453e35b192e3856d6967a05fb7b16d/wagtailsystemtext-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "0149647b598a2e39dbb27e23fbc787f5", "sha256": "2a232a34cc3563a88966c6d4726ff32301aea1c4671169a5ea8bac8bbdf82a01" }, "downloads": -1, "filename": "wagtailsystemtext-1.1.1.tar.gz", "has_sig": false, "md5_digest": "0149647b598a2e39dbb27e23fbc787f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12668, "upload_time": "2017-01-09T15:56:05", "url": "https://files.pythonhosted.org/packages/0f/dd/2e3ae8a611d432e1bfa48211350644a4da09e194cb36c05d19ea0a76f74d/wagtailsystemtext-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "6f1756fb80c5b4695798ee9c95985b91", "sha256": "3feecbcfc243a0143725a2fc6d1d3a153572f77916c6b604cf771fcb1c1a440d" }, "downloads": -1, "filename": "wagtailsystemtext-1.1.2.tar.gz", "has_sig": false, "md5_digest": "6f1756fb80c5b4695798ee9c95985b91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12708, "upload_time": "2017-01-27T12:28:49", "url": "https://files.pythonhosted.org/packages/a0/37/1afd12125d98f75e2138b890330dc9242c429d658b276d5425bf8f9fbd99/wagtailsystemtext-1.1.2.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "f9bdddd3f093b2a40b9c85fcec8508ba", "sha256": "b5a15caf298ae46c293adc9914d09114c416144b8601d732940ee7ef49886357" }, "downloads": -1, "filename": "wagtailsystemtext-1.2.1.tar.gz", "has_sig": false, "md5_digest": "f9bdddd3f093b2a40b9c85fcec8508ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13125, "upload_time": "2017-02-08T20:14:27", "url": "https://files.pythonhosted.org/packages/4d/c3/6025002ac31885cc58124158e9d08cff802bdf73eac02f2591ea0a66f48a/wagtailsystemtext-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "7ed0ab101a0cb56376f50386cb90da07", "sha256": "f5ab696fbfde5daf5e8ab908efdf91d91cf7865d99f2da2162f1ae0f491f33f9" }, "downloads": -1, "filename": "wagtailsystemtext-1.2.2.tar.gz", "has_sig": false, "md5_digest": "7ed0ab101a0cb56376f50386cb90da07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12995, "upload_time": "2018-05-09T05:09:05", "url": "https://files.pythonhosted.org/packages/d7/f0/009d04fddd3bf527d77723312c1da87d5c3f8e06d885c37b8dd72a47b092/wagtailsystemtext-1.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7ed0ab101a0cb56376f50386cb90da07", "sha256": "f5ab696fbfde5daf5e8ab908efdf91d91cf7865d99f2da2162f1ae0f491f33f9" }, "downloads": -1, "filename": "wagtailsystemtext-1.2.2.tar.gz", "has_sig": false, "md5_digest": "7ed0ab101a0cb56376f50386cb90da07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12995, "upload_time": "2018-05-09T05:09:05", "url": "https://files.pythonhosted.org/packages/d7/f0/009d04fddd3bf527d77723312c1da87d5c3f8e06d885c37b8dd72a47b092/wagtailsystemtext-1.2.2.tar.gz" } ] }