This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Almost like django.contrib.messages, but doesn’t need request to message a user.

In fact, django-dbmessages is but a very thin and simple layer on top of Django’s contrib.messages.

To message a user, you simply create and save an instance of provided Message model via shell, Django admin, or some other means.

Message model has all the same attributes you’d normally pass to contrib.messages (level, message, extra_tags), and in addition a ForeignKey link to User model.

The next time given user appears on the site, middleware provided by dbmessages checks if user has any messages for them, and adds them to request using regular contrib.messages API. Then it deletes those messages from the DB. Simple as that.

Quick start

  1. Make sure to enable Django’s contrib.messages in your project (check the docs).
  2. Install django-dbmessages (it’s on PyPI).
  3. Add 'dbmessages' to your INSTALLED_APPS and 'dbmessages.middleware.DBMessageMiddleware' to MIDDLEWARE_CLASSES.
  4. Synchronize (or migrate) the DB.

Now you can get into shell and address a message to yourself:

>>> from dbmessages.models import Message
>>> from django.contrib import messages
>>> Message.objects.create(to_user=your_user, level=messages.INFO, message="Ahoy there")

Provided your front-end is integrated with Django’s contrib.messages, you should see the “Ahoy there” message the next time you log in under your account.

Release History

Release History

0.2.0a

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-dbmessages-0.1.1.tar.gz (6.7 kB) Copy SHA256 Checksum SHA256 Source Sep 21, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting