Welcome to django-frontend-notification’s documentation!

Release:0.2
Date:February 25, 2016

Contents:

Introduction

Version:0.1.0
Keywords:django, python, notification

Django-Frontend-Notification is an application written in Python, using the Django Framework.

The license is MIT : http://opensource.org/licenses/MIT

Overview

Django application to display on the frontend the list of notifications and run some basic actions such as “view all notifications”, “delete notifications”, etc... Django-Frontend-Notification also provides helpers to display new notifications.

This works with twitter bootstrap (http://twitter.github.com/bootstrap/) but can easily be adapted with other front-end frameworks.

_images/django-frontend-notification.png

Documentation

Extensive documentation is available on ‘Read the Docs’: http://django-frontend-notification.readthedocs.org

Contributing

If you’ve found a bug, implemented a feature or customized the template and think it is useful then please consider contributing. Patches, pull requests and suggestions are welcome!

Source code: http://github.com/areski/django-frontend-notification

If you don’t like Github and Git you’re welcome to send regular patches.

Bug tracker: https://github.com/areski/django-frontend-notification/issues

License

Copyright (c) 2011-2012 Star2Billing S.L. <info@star2billing.com>

django-frontend-notification is licensed under MIT, see MIT-LICENSE.txt.

Credit

django-frontend-notification is a Star2Billing-Sponsored Community Project, for more information visit http://www.star2billing.com or email us at info@star2billing.com

Installation overview

Install requirements

A requirements file stores a list of dependencies to be installed for your project/application.

To get started with django-frontend-notification you must have the following installed:

  • python >= 2.4 (programming language)
  • Apache / http server with WSGI modules
  • Django Framework >= 1.3 (Python based Web framework)

The requirements are installed into a virtual environement so that the dependencies of the application do not interfere with other applications on the server. More information can be found about virtualenv at : http://pypi.python.org/pypi/virtualenv

PIP is a tool for installing and managing Python packages, more information about PIP t : http://www.pip-installer.org/en/latest/index.html.

With PIP you can easily install all the requirements:

$ pip install -r requirements.txt

Configuration

Add frontend-notification into INSTALLED_APPS in settings.py:

INSTALLED_APPS = (
    ...
    'frontend-notification',
    ...
    )

Add frontend_notification_tags into templates to use different template tags:

{% load frontend_notification_tags %}

{% get_notice_count request %}

To get count of notification in your django views, add notice_count:

...
from frontend_notification.views import notice_count
...

def sample_view(request):
    print notice_count(request)

Download bootbox.js from bootboxjs.com and add into your media resource

Developer Documentation

Contents:

Prerequisites

To fully understand this project, developers will need to have an advanced knowledge of:

Coding Style & Structure

Style

Coding follows the PEP 8 Style Guide for Python Code.

Structure

The frontend_notification directory:

|-- templatetags       - Templatetags
|-- fixtures           -
`-- templates          - This area is used to override templates
    `-- frontend_notification

Django-Frontend-Notification Views

user_notification

User Detail change on Customer UI

Attributes:

  • form - UserChangeDetailForm, UserChangeDetailExtendForm,

    PasswordChangeForm, CheckPhoneNumberForm

  • template - ‘frontend/frontend_notification/user_notification.html’

Logic Description:

  • User is able to change his/her detail.

notification_del_read

Delete notification for the logged in user

Attributes:

  • object_id - Selected notification object
  • object_list - Selected notification objects

Logic Description:

  • Delete/Mark as Read the selected notification

update_notification

Notification Status (e.g. read/unread) can be changed from
customer interface

frontend_send_notification

User Notification (e.g. start | stop | pause | abort |

contact/campaign limit) needs to be saved. It is a common function for the admin and customer UI’s

Attributes:

  • pk - primary key of the campaign record
  • status - get label for notifications

frontend_notification_status

Notification Status (e.g. read/unread) need to be change.

It is a common function for admin and customer UI

Attributes:

  • pk - primary key of notice record

Logic Description:

  • Selected Notification’s status need to be changed. Changed status can be read or unread.

notice_count

Get count of logged in user’s notifications

Test Case Descriptions

How to run test

1. Run Full Test Suit:

$ python manage.py test

2. Run Individual Test:

$ python manage.py test frontend_notification

Indices and tables