Skip to main content
Django webline Notifications
===========================
###Screen shot
![screen shot](http://i.imgur.com/TxoZeaG.png)

###What is Django webline Notifications
This is a django application to notify user about events.
You can simply inform user about all kind of updates.

###Features
* Chose notification status and color
* Thumbnail for notification
* Notification has a URL, can passed in other notifications
* Send group (to list of users) notification

##How to install
###Downloading the package
Probably the best way to install is by using PIP:

```
$ pip install django-webline-notifications
```
If you want to clone the main repository:

```
$ git clone https://github.com/alireza-molaee/django-webline-notifications.git
$ cd django-webline-notifications
$ python setup.py install
```
###install on django
now you can add django-simple-notifications to the settings.py file:

```
INSTALLED_APPS = (
...
'webline-notifications',
'django.contrib.admin',
)
```
Then run migrations:

```
$ python manage.py migrate webline-notifications
```
Then collectstatic:

```
$ python manage.py collectstatic
```
now if run server you can see notifications in django admin:

```
$ python manage.py runserver
```
##Settings
you can limit archive notification for all user by `WEBLINE_NOTIFICATIONS_LIMIT` default is `False` it mean (no limit)
for example `myproject.settings.py`:

```
...
WEBLINE_NOTIFICATIONS_LIMIT = 50
...
```

##Usage
to notify every thing you want:

1. import Notification
2. use Notification.send to send notification

```
from webline_notification.model import Notification

Notification.send(
...
)
```
#####send option:

1. list of user:
list of user object that you want to receive this notification `[obj, obj, ...]`
2. content:
a small text about event `'some one join us'`
3. icon:
icon css class `'fa-info'`
4. color:
color hex id `'#c3c3c3'`
5. link:
you notification can have a url to where reason of event `'http://www.google.com/'` *(optional)*

you can use default color in Notification `Notification.COLOR_DANGER`
you can filter notification by color in django admin if you use default color

#####defult colors:

* <span style="color:#f39c12;">COLOR_WARNING</span>
* <span style="color:#f56954;">COLOR_DANGER</span>
* <span style="color:#00c0ef;">COLOR_INFO</span>
* <span style="color:#00a65a;">COLOR_SUCCESS</span>
* <span style="color:#3c8dbc;">COLOR_PRIMARY</span>
* <span style="color:#d2d6de;">COLOR_GRAY</span>
* <span style="color:#111111;">COLOR_BLACK</span>

#####example:

```
from webline_notifications.models import Notification
from django.contrib.auth.models import User

user = User.objects.get(pk=1)

Notification.send(
[user],
'foo',
'fa-info',
Notification.COLOR_DANGER,
url='http://www.google.com/'
)
```



##TODO
- [x] add test for models
- [x] add template tags to use any template
- [x] add view to change see status
- [x] add test for view
- [ ] add default settings
- [ ] font files
- [x] default notification count to show
- [x] max of notification can be archived
- [x] handle events by AJAX

Metadata

Release files for django-webline-notifications 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-webline-notifications 1.0.1
File Size Uploaded Provenance Actions
django-webline-notifications-1.0.1.tar.gz 496.7 kB Without provenance Details for django-webline-notifications-1.0.1.tar.gz

Release files / django-webline-notifications-1.0.1.tar.gz

Download URL django-webline-notifications-1.0.1.tar.gz
Size 496.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7bf05572d40a659feadae366af78a9e6dde040f6c16cc38ed05be6bfb2988918
BLAKE2b-256 checksum
How to use checksums
47ed0bc0cf74c0b9b586f2afbac0f6b50b226ff3ca2f5dc0132ddcd9fff3b3bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-webline-notifications 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file No provenance

1.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page