izitoast


Nameizitoast JSON
Version 1.2.2 PyPI version JSON
download
home_pagehttps://djangoizitoast.pythonanywhere.com/
SummaryElegant, responsive, flexible, and lightweight notification plugin.
upload_time2023-01-12 01:52:27
maintainer
docs_urlNone
authorAbdul Rahim K
requires_python
licenseMIT
keywords izitoast
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # IziToast

izitoast is an Elegant, responsive, flexible, and lightweight notification plugin with no dependencies.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install izitoast.



## Usage

Add 'izitoast' to your INSTALLED_APPS setting like this:

```python
INSTALLED_APPS = [
     '...',
    'izitoast',
]
```

inside base template file at last position include a single line of code

```html
...
{% include 'includes/izitoast.html' %}
</body>
</html>
```

## Working
- User can pass option diversify or not, if not pass diversify option, izitoast will take default settings
- Single message with specified tag
```python
from izitoast.functions import izitoast

def func(request):
    ...
    message = "This is success message."
    diversify = {
        "position": "topRight",
        "transition_in": "flipInX",
        "transition_out": "flipOutX",
        "time_out": 3000,
    }

    izitoast(request=request, model="success", message=message, diversify=diversify)

    return render(request, 'template.html')
```
- Multiple messages with different tags at a time
```python
from izitoast.functions import izitoast

def func(request):
    ...
    message = {
        'raw': [
            {
                'tag': 'success',
                'item': "Success message"
            },
            {
                'tag': 'info',
                'item': "Information message!"
            },
            {
                'tag': 'warning',
                'item': "Warning message!"
            },
            {
                'tag': 'danger',
                'item': "Error message!"
            }
        ]
    }
    diversify = {
        "position": "topRight",
        "transition_in": "flipInX",
        "transition_out": "flipOutX",
        "time_out": 3000,
    }

    izitoast(request=request, model="success", message=message, diversify=diversify)

    return render(request, 'template.html')
```

## generate form.errors
```python
from izitoast.functions import izitoast

def func(request):
    ...
    
    diversify = {
        "position": "topRight",
        "transition_in": "flipInX",
        "transition_out": "flipOutX",
        "time_out": 3000,
    }
    izitoast(request=request, model="form-error", message=form.errors, diversify=diversify)

    return render(request, 'template.html')
```


## model

- Users can choose different models and it can be 'success', 'info', 'warning', or 'danger'. 

- but when generating form.errors must be set to 'model=form-error'.


## Optionals
1. position: 

 - Default izitoast shown place "topRight",

 - It can be: [bottomRight, bottomLeft, topRight, topLeft, topCenter, bottomCenter, center]

2. transition_in:

 - Default izitoast open animation "flipInX",

 - It can be: [bounceInLeft, bounceInRight, bounceInUp, bounceInDown, fadeIn, fadeInDown, fadeInUp, fadeInLeft, fadeInRight, flipInX]

3. transition_out:
 - Default izitoast close animation "flipOutX",

 - It can be: [fadeOut, fadeOutUp, fadeOutDown, fadeOutLeft, fadeOutRight, flipOutX]

4. time_out:
  - the default value is 3000.


## Dependencies

 - It uses [izitoast v1.4.0](https://izitoast.marcelodolza.com/) scripts and styles.

#### For message transferring uses messages 
```python 
from django.contrib import messages
```


## Demo

[Django-IziToast](https://djangoizitoast.pythonanywhere.com/)

## GitHub

[Django-IziToast](https://github.com/abdulrahim-uj/izitoast/)


## Contributing

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License

[MIT](https://choosealicense.com/licenses/mit/)








Copyright 2023 Abdul Rahim K

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.




Change Log
==========

0.0.1 (20/12/2022)
-------------------
- First Release

0.0.2 (20/12/2022)
-------------------
- Fixed mouse hover close issue

0.0.3 (21/12/2022)
-------------------
- Bug fixed

0.0.4 (21/12/2022)
-------------------
- Bug fixed

0.0.5 (21/12/2022)
-------------------
- Bug fixed
- Removed

0.0.6 (21/12/2022)
-------------------
- Bug fixed
- Removed

0.0.7 (21/12/2022)
-------------------
- Bug fixed
- Removed

0.0.8 (21/12/2022)
-------------------
- Bug fixed
- Removed

0.0.9 (21/12/2022)
-------------------
- Bug fixed
- Removed

0.1.9 (21/12/2022)
-------------------
- Bug fixed
- Removed

1.0.1 (21/12/2022)
-------------------
- Bug fixed
- Removed

1.0.2 (21/12/2022)
-------------------
- Bug fixed
- Removed

1.0.3 (21/12/2022)
-------------------
- Bug fixed
- Removed

1.0.4 (21/12/2022)
-------------------
- Bug fixed
- Removed

1.0.5 (21/12/2022)
-------------------
- Bug fixed
- Removed

1.0.6 (21/12/2022)
-------------------
- Bug fixed
- Removed

1.0.7 (21/12/2022)
-------------------
- Bug fixed
- Improved performance
- Size reduced
- Add more options

1.0.8 (22/12/2022)
-------------------
- Bug fixed
- Improved performance
- form.errors added more options


1.0.9 (23/12/2022)
-------------------
- Bug fixed
- Improved performance
- form.errors added more options
- reduce background tasks


1.1.9 (23/12/2022)
-------------------
- Bug fixed from dict

1.2.0 (23/12/2022)
-------------------
- improved


1.2.1 (26/12/2022)
-------------------
- improved
- both string & dictionaries can pass through message.
- users can alert single message as well as multiple messages with different types at a time.


1.2.2 (12/01/2023)
-------------------
- improved
- remove unused warnings

            

Raw data

            {
    "_id": null,
    "home_page": "https://djangoizitoast.pythonanywhere.com/",
    "name": "izitoast",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "izitoast",
    "author": "Abdul Rahim K",
    "author_email": "abdulrahim.uj@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/12/26/a73993315783d3e46fcfea689a589f38c2d7d0da153befde16f333a9dda2/izitoast-1.2.2.tar.gz",
    "platform": null,
    "description": "# IziToast\r\n\r\nizitoast is an Elegant, responsive, flexible, and lightweight notification plugin with no dependencies.\r\n\r\n## Installation\r\n\r\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install izitoast.\r\n\r\n\r\n\r\n## Usage\r\n\r\nAdd 'izitoast' to your INSTALLED_APPS setting like this:\r\n\r\n```python\r\nINSTALLED_APPS = [\r\n     '...',\r\n    'izitoast',\r\n]\r\n```\r\n\r\ninside base template file at last position include a single line of code\r\n\r\n```html\r\n...\r\n{% include 'includes/izitoast.html' %}\r\n</body>\r\n</html>\r\n```\r\n\r\n## Working\r\n- User can pass option diversify or not, if not pass diversify option, izitoast will take default settings\r\n- Single message with specified tag\r\n```python\r\nfrom izitoast.functions import izitoast\r\n\r\ndef func(request):\r\n    ...\r\n    message = \"This is success message.\"\r\n    diversify = {\r\n        \"position\": \"topRight\",\r\n        \"transition_in\": \"flipInX\",\r\n        \"transition_out\": \"flipOutX\",\r\n        \"time_out\": 3000,\r\n    }\r\n\r\n    izitoast(request=request, model=\"success\", message=message, diversify=diversify)\r\n\r\n    return render(request, 'template.html')\r\n```\r\n- Multiple messages with different tags at a time\r\n```python\r\nfrom izitoast.functions import izitoast\r\n\r\ndef func(request):\r\n    ...\r\n    message = {\r\n        'raw': [\r\n            {\r\n                'tag': 'success',\r\n                'item': \"Success message\"\r\n            },\r\n            {\r\n                'tag': 'info',\r\n                'item': \"Information message!\"\r\n            },\r\n            {\r\n                'tag': 'warning',\r\n                'item': \"Warning message!\"\r\n            },\r\n            {\r\n                'tag': 'danger',\r\n                'item': \"Error message!\"\r\n            }\r\n        ]\r\n    }\r\n    diversify = {\r\n        \"position\": \"topRight\",\r\n        \"transition_in\": \"flipInX\",\r\n        \"transition_out\": \"flipOutX\",\r\n        \"time_out\": 3000,\r\n    }\r\n\r\n    izitoast(request=request, model=\"success\", message=message, diversify=diversify)\r\n\r\n    return render(request, 'template.html')\r\n```\r\n\r\n## generate form.errors\r\n```python\r\nfrom izitoast.functions import izitoast\r\n\r\ndef func(request):\r\n    ...\r\n    \r\n    diversify = {\r\n        \"position\": \"topRight\",\r\n        \"transition_in\": \"flipInX\",\r\n        \"transition_out\": \"flipOutX\",\r\n        \"time_out\": 3000,\r\n    }\r\n    izitoast(request=request, model=\"form-error\", message=form.errors, diversify=diversify)\r\n\r\n    return render(request, 'template.html')\r\n```\r\n\r\n\r\n## model\r\n\r\n- Users can choose different models and it can be 'success', 'info', 'warning', or 'danger'. \r\n\r\n- but when generating form.errors must be set to 'model=form-error'.\r\n\r\n\r\n## Optionals\r\n1. position: \r\n\r\n - Default izitoast shown place \"topRight\",\r\n\r\n - It can be: [bottomRight, bottomLeft, topRight, topLeft, topCenter, bottomCenter, center]\r\n\r\n2. transition_in:\r\n\r\n - Default izitoast open animation \"flipInX\",\r\n\r\n - It can be: [bounceInLeft, bounceInRight, bounceInUp, bounceInDown, fadeIn, fadeInDown, fadeInUp, fadeInLeft, fadeInRight, flipInX]\r\n\r\n3. transition_out:\r\n - Default izitoast close animation \"flipOutX\",\r\n\r\n - It can be: [fadeOut, fadeOutUp, fadeOutDown, fadeOutLeft, fadeOutRight, flipOutX]\r\n\r\n4. time_out:\r\n  - the default value is 3000.\r\n\r\n\r\n## Dependencies\r\n\r\n - It uses [izitoast v1.4.0](https://izitoast.marcelodolza.com/) scripts and styles.\r\n\r\n#### For message transferring uses messages \r\n```python \r\nfrom django.contrib import messages\r\n```\r\n\r\n\r\n## Demo\r\n\r\n[Django-IziToast](https://djangoizitoast.pythonanywhere.com/)\r\n\r\n## GitHub\r\n\r\n[Django-IziToast](https://github.com/abdulrahim-uj/izitoast/)\r\n\r\n\r\n## Contributing\r\n\r\nPull requests are welcome. For major changes, please open an issue first\r\nto discuss what you would like to change.\r\n\r\nPlease make sure to update tests as appropriate.\r\n\r\n## License\r\n\r\n[MIT](https://choosealicense.com/licenses/mit/)\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nCopyright 2023 Abdul Rahim K\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n\r\n\r\n\r\nChange Log\r\n==========\r\n\r\n0.0.1 (20/12/2022)\r\n-------------------\r\n- First Release\r\n\r\n0.0.2 (20/12/2022)\r\n-------------------\r\n- Fixed mouse hover close issue\r\n\r\n0.0.3 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n\r\n0.0.4 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n\r\n0.0.5 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Removed\r\n\r\n0.0.6 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Removed\r\n\r\n0.0.7 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Removed\r\n\r\n0.0.8 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Removed\r\n\r\n0.0.9 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Removed\r\n\r\n0.1.9 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Removed\r\n\r\n1.0.1 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Removed\r\n\r\n1.0.2 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Removed\r\n\r\n1.0.3 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Removed\r\n\r\n1.0.4 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Removed\r\n\r\n1.0.5 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Removed\r\n\r\n1.0.6 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Removed\r\n\r\n1.0.7 (21/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Improved performance\r\n- Size reduced\r\n- Add more options\r\n\r\n1.0.8 (22/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Improved performance\r\n- form.errors added more options\r\n\r\n\r\n1.0.9 (23/12/2022)\r\n-------------------\r\n- Bug fixed\r\n- Improved performance\r\n- form.errors added more options\r\n- reduce background tasks\r\n\r\n\r\n1.1.9 (23/12/2022)\r\n-------------------\r\n- Bug fixed from dict\r\n\r\n1.2.0 (23/12/2022)\r\n-------------------\r\n- improved\r\n\r\n\r\n1.2.1 (26/12/2022)\r\n-------------------\r\n- improved\r\n- both string & dictionaries can pass through message.\r\n- users can alert single message as well as multiple messages with different types at a time.\r\n\r\n\r\n1.2.2 (12/01/2023)\r\n-------------------\r\n- improved\r\n- remove unused warnings\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Elegant, responsive, flexible, and lightweight notification plugin.",
    "version": "1.2.2",
    "split_keywords": [
        "izitoast"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b6545c3ea07dfb48ae9ae1dca19093e1c4b04f623879b9e9a63635371dd2f6b1",
                "md5": "72a053d351b895ec7e9b0837a0f269b6",
                "sha256": "6c483a4cbdcd795ba88460c0eb6e44387bb2822930e84a75925d26e13505a4c5"
            },
            "downloads": -1,
            "filename": "izitoast-1.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "72a053d351b895ec7e9b0837a0f269b6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 58604,
            "upload_time": "2023-01-12T01:52:25",
            "upload_time_iso_8601": "2023-01-12T01:52:25.102193Z",
            "url": "https://files.pythonhosted.org/packages/b6/54/5c3ea07dfb48ae9ae1dca19093e1c4b04f623879b9e9a63635371dd2f6b1/izitoast-1.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1226a73993315783d3e46fcfea689a589f38c2d7d0da153befde16f333a9dda2",
                "md5": "84d75ea604cd969444c92d09c074508d",
                "sha256": "6e97cb62d80915532566ab63c1bddc735dda48cbdc318d7f573de0a9e92c1d61"
            },
            "downloads": -1,
            "filename": "izitoast-1.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "84d75ea604cd969444c92d09c074508d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 58235,
            "upload_time": "2023-01-12T01:52:27",
            "upload_time_iso_8601": "2023-01-12T01:52:27.115466Z",
            "url": "https://files.pythonhosted.org/packages/12/26/a73993315783d3e46fcfea689a589f38c2d7d0da153befde16f333a9dda2/izitoast-1.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-12 01:52:27",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "izitoast"
}
        
Elapsed time: 0.03996s