Skip to content

Commit

Permalink
fix: more accurate data field in migration script; use assignment tem…
Browse files Browse the repository at this point in the history
…plate tag; code clean
  • Loading branch information
Brant Young committed Oct 25, 2012
1 parent fe4f6d0 commit 4a68e71
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
@@ -1,6 +1,11 @@
Changelog
==========

0.5.5
------

Support for arbitrary data attribute.

0.5.1
-----

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -24,13 +24,13 @@ Installation is easy using ``pip`` and will install all required libraries.

::

$ pip install django-notifications
$ pip install django-notifications-hq

or get it from source

::

$ git clone https://github.com/schinckel/django-notifications
$ git clone https://github.com/brantyoung/django-notifications
$ cd django-notifications
$ python setup.py install

Expand Down
2 changes: 1 addition & 1 deletion notifications/__init__.py
Expand Up @@ -12,7 +12,7 @@
__version_info__ = {
'major': 0,
'minor': 5,
'micro': 2,
'micro': 5,
'releaselevel': 'final',
'serial': 0
}
Expand Down
Expand Up @@ -10,7 +10,7 @@ class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Notification.data'
db.add_column('notifications_notification', 'data',
self.gf('jsonfield.fields.JSONField')(null=True, blank=True),
self.gf('django.db.models.fields.TextField')(null=True, blank=True),
keep_default=False)


Expand Down Expand Up @@ -62,7 +62,7 @@ def backwards(self, orm):
'action_object_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'actor_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notify_actor'", 'to': "orm['contenttypes.ContentType']"}),
'actor_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'data': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
Expand Down
Expand Up @@ -62,7 +62,7 @@ def backwards(self, orm):
'action_object_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'actor_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notify_actor'", 'to': "orm['contenttypes.ContentType']"}),
'actor_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'data': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
Expand Down
2 changes: 1 addition & 1 deletion notifications/migrations/0004_convert_readed_to_unread.py
Expand Up @@ -59,7 +59,7 @@ def backwards(self, orm):
'action_object_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'actor_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notify_actor'", 'to': "orm['contenttypes.ContentType']"}),
'actor_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'data': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
Expand Down
Expand Up @@ -62,7 +62,7 @@ def backwards(self, orm):
'action_object_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'actor_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notify_actor'", 'to': "orm['contenttypes.ContentType']"}),
'actor_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'data': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
Expand Down
Expand Up @@ -62,7 +62,7 @@ def backwards(self, orm):
'action_object_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'actor_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notify_actor'", 'to': "orm['contenttypes.ContentType']"}),
'actor_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'data': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'level': ('django.db.models.fields.CharField', [], {'default': "'info'", 'max_length': '20'}),
Expand Down
2 changes: 1 addition & 1 deletion notifications/templatetags/notifications_tags.py
Expand Up @@ -5,7 +5,7 @@

register = Library()

@register.simple_tag(takes_context=True)
@register.assignment_tag(takes_context=True)
def notifications_unread(context):
if 'user' not in context:
return ''
Expand Down
6 changes: 4 additions & 2 deletions setup.py
@@ -1,7 +1,7 @@
from distutils.core import setup
from notifications import __version__

setup(name='django-notifications',
setup(name='django-notifications-hq',
version=__version__,
description='GitHub notifications alike app for Django.',
long_description=open('README.rst').read(),
Expand All @@ -13,7 +13,9 @@
'django-model-utils>=1.1.0'
],
packages=['notifications',
'notifications.templatetags'],
'notifications.templatetags',
'notifications.migrations'
],
package_data={'notifications': [
'templates/notifications/*.html']},
classifiers=['Development Status :: 5 - Production/Stable',
Expand Down

0 comments on commit 4a68e71

Please sign in to comment.