# Alliance Platform Django Frontend
A library for integrating the [Alliance Platform React library](https://github.com/AllianceSoftware/alliance-platform-js) into a Django project.
Uses [Vite](https://vitejs.dev/) to bundle Javascript and perform server-side rendering, and supplies a number of templatetags to easily embed Alliance Platform React components into Django templates.
* [Installation](#installation)
* [Usage](#usage)
* [Alliance UI](#alliance-ui)
* [Bundler](#bundler)
* [Templates](#templates)
* [Template Tags](#template-tags)
* [Release](#release-process)
## Installation
`pip install alliance-platform-frontend`
## System Requirements
* Supports django 4.2 and 5.0
* Python >=3.11
## Usage
### Alliance UI
A collection of built-in template tags for easily using Alliance UI React components in Django templates.
A templatetag (for example, Button) can be inserted in a template using the syntax:
```html
{% Button variant="outlined" type="submit" %}Submit{% endButton %}
```
Components can be nested, e.g.
```html
{% MenuBar %}
{% Menubar.SubMenu %}
{% Menubar.Item %}Item{% endMenubar.Item %}
{% endMenubar.SubMenu %}
{% endMenuBar %}
```
Keyword arguments to the tag will be automatically passed as props to the React component.
#### Available Tags
* Button
* ButtonGroup
* DatePicker
* Icon
* InlineAlert
* Menubar
* Menubar.SubMenu
* Menubar.Item
* Menubar.Section
* Pagination
* Table
* TableHeader
* TableBody
* ColumnHeaderLink
* Column
* Row
* Cell
* TimeInput
* Fragment
* raw_html
The following functions are also available:
# utils.get_module_import_source
Given the name of the export within `alliance-platform-js/ui`, creates the javascript import specification for the specified component.
### Bundler
### Templates
### Template Tags
## Release Process
### Poetry Config
* Add test repository
* `poetry config repositories.testpypi https://test.pypi.org/legacy/`
* Generate an account API token at https://test.pypi.org/manage/account/token/
* `poetry config pypi-token.testpypi ${TOKEN}`
* On macs this will be stored in the `login` keychain at `poetry-repository-testpypi`
* Main pypi repository
* Generate an account API token at https://pypi.org/manage/account/token/
* `poetry config pypi-token.pypi ${TOKEN}`
* On macs this will be stored in the `login` keychain at `poetry-repository-pypi`
### Publishing a New Release
* Update CHANGELOG.md with details of changes and new version
* Run `bin/build.py`. This will extract version from CHANGELOG.md, bump version in `pyproject.toml` and generate a build for publishing
* Tag with new version and update the version branch:
* `ver=$( poetry version --short ) && echo "Version: $ver"`
* `git tag v/frontend/$ver`
* `git push --tags`
* To publish to test.pypi.org
* `poetry publish --repository testpypi`
* To publish to pypi.org
* `poetry publish`
Raw data
{
"_id": null,
"home_page": "https://github.com/AllianceSoftware/alliance-platform-py/packages/ap-frontend",
"name": "alliance-platform-frontend",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": "django, alliance, alliancesoftware",
"author": null,
"author_email": "Alliance Software <support@alliancesoftware.com.au>",
"download_url": "https://files.pythonhosted.org/packages/1b/2d/4eac7c5be43e823d717b1046a0f5ebb071fb17f0ff6b50f021cb80adb262/alliance_platform_frontend-0.0.4.tar.gz",
"platform": null,
"description": "# Alliance Platform Django Frontend\n\nA library for integrating the [Alliance Platform React library](https://github.com/AllianceSoftware/alliance-platform-js) into a Django project.\n\nUses [Vite](https://vitejs.dev/) to bundle Javascript and perform server-side rendering, and supplies a number of templatetags to easily embed Alliance Platform React components into Django templates.\n\n* [Installation](#installation)\n* [Usage](#usage)\n * [Alliance UI](#alliance-ui)\n * [Bundler](#bundler)\n * [Templates](#templates)\n * [Template Tags](#template-tags)\n* [Release](#release-process)\n\n## Installation\n\n`pip install alliance-platform-frontend`\n\n## System Requirements\n\n* Supports django 4.2 and 5.0\n* Python >=3.11\n\n## Usage\n\n### Alliance UI\n\nA collection of built-in template tags for easily using Alliance UI React components in Django templates.\n\n\nA templatetag (for example, Button) can be inserted in a template using the syntax:\n```html\n{% Button variant=\"outlined\" type=\"submit\" %}Submit{% endButton %}\n```\nComponents can be nested, e.g.\n```html\n{% MenuBar %}\n {% Menubar.SubMenu %}\n {% Menubar.Item %}Item{% endMenubar.Item %}\n {% endMenubar.SubMenu %}\n{% endMenuBar %}\n```\n\nKeyword arguments to the tag will be automatically passed as props to the React component.\n\n#### Available Tags\n\n* Button\n* ButtonGroup\n* DatePicker\n* Icon\n* InlineAlert\n* Menubar\n* Menubar.SubMenu\n* Menubar.Item\n* Menubar.Section\n* Pagination\n* Table\n* TableHeader\n* TableBody\n* ColumnHeaderLink\n* Column\n* Row\n* Cell\n* TimeInput\n* Fragment\n* raw_html\n\nThe following functions are also available:\n\n# utils.get_module_import_source\n\nGiven the name of the export within `alliance-platform-js/ui`, creates the javascript import specification for the specified component.\n\n### Bundler\n### Templates\n### Template Tags\n\n\n## Release Process\n\n### Poetry Config\n* Add test repository\n * `poetry config repositories.testpypi https://test.pypi.org/legacy/`\n * Generate an account API token at https://test.pypi.org/manage/account/token/\n * `poetry config pypi-token.testpypi ${TOKEN}`\n * On macs this will be stored in the `login` keychain at `poetry-repository-testpypi`\n* Main pypi repository\n * Generate an account API token at https://pypi.org/manage/account/token/\n * `poetry config pypi-token.pypi ${TOKEN}`\n * On macs this will be stored in the `login` keychain at `poetry-repository-pypi`\n\n### Publishing a New Release\n* Update CHANGELOG.md with details of changes and new version\n* Run `bin/build.py`. This will extract version from CHANGELOG.md, bump version in `pyproject.toml` and generate a build for publishing\n* Tag with new version and update the version branch:\n * `ver=$( poetry version --short ) && echo \"Version: $ver\"`\n * `git tag v/frontend/$ver`\n * `git push --tags`\n* To publish to test.pypi.org\n * `poetry publish --repository testpypi`\n* To publish to pypi.org\n * `poetry publish`\n\n",
"bugtrack_url": null,
"license": "BSD-2-Clause",
"summary": "Django integration for Frontend Bundlers & React",
"version": "0.0.4",
"project_urls": {
"Homepage": "https://github.com/AllianceSoftware/alliance-platform-py/packages/ap-frontend",
"Issues": "https://github.com/AllianceSoftware/alliance-platform-py/issues",
"Repository": "https://github.com/AllianceSoftware/alliance-platform-py"
},
"split_keywords": [
"django",
" alliance",
" alliancesoftware"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "dfcb55e2d98294697bdf5ed9aa4b9e9c6c7b6b9f360b82b3f91d998937ef61da",
"md5": "429e137d3d872b46f6ee8a6019e3b355",
"sha256": "072ec9ad8cd4925c1a877656427c5ace5a5b8aefae0e1f360aadeb18b85430af"
},
"downloads": -1,
"filename": "alliance_platform_frontend-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "429e137d3d872b46f6ee8a6019e3b355",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 80922,
"upload_time": "2024-04-23T21:40:22",
"upload_time_iso_8601": "2024-04-23T21:40:22.459466Z",
"url": "https://files.pythonhosted.org/packages/df/cb/55e2d98294697bdf5ed9aa4b9e9c6c7b6b9f360b82b3f91d998937ef61da/alliance_platform_frontend-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1b2d4eac7c5be43e823d717b1046a0f5ebb071fb17f0ff6b50f021cb80adb262",
"md5": "35038e9362ef9e6810e060149e4006d2",
"sha256": "f95f84dd0e5b1e14c8bb7b282908b2958cf22eaaa99d5f56f13e859d5a6e0395"
},
"downloads": -1,
"filename": "alliance_platform_frontend-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "35038e9362ef9e6810e060149e4006d2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 76682,
"upload_time": "2024-04-23T21:40:23",
"upload_time_iso_8601": "2024-04-23T21:40:23.867616Z",
"url": "https://files.pythonhosted.org/packages/1b/2d/4eac7c5be43e823d717b1046a0f5ebb071fb17f0ff6b50f021cb80adb262/alliance_platform_frontend-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-23 21:40:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AllianceSoftware",
"github_project": "alliance-platform-py",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "alliance-platform-frontend"
}