Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix: more accurate data field in migration script; use assignment tem…

…plate tag; code clean
  • Loading branch information...
commit 4a68e71edf31aceb39ce2d674f8639aeb92147aa 1 parent fe4f6d0
Brant Young authored
View
5 CHANGELOG.rst
@@ -1,6 +1,11 @@
Changelog
==========
+0.5.5
+------
+
+Support for arbitrary data attribute.
+
0.5.1
-----
View
4 README.rst
@@ -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
View
2  notifications/__init__.py
@@ -12,7 +12,7 @@
__version_info__ = {
'major': 0,
'minor': 5,
- 'micro': 2,
+ 'micro': 5,
'releaselevel': 'final',
'serial': 0
}
View
4 notifications/migrations/0002_auto__add_field_notification_data.py
@@ -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)
@@ -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'}),
View
2  notifications/migrations/0003_auto__add_field_notification_unread.py
@@ -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'}),
View
2  notifications/migrations/0004_convert_readed_to_unread.py
@@ -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'}),
View
2  notifications/migrations/0005_auto__del_field_notification_readed.py
@@ -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'}),
View
2  notifications/migrations/0006_auto__add_field_notification_level.py
@@ -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'}),
View
2  notifications/templatetags/notifications_tags.py
@@ -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 ''
View
6 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(),
@@ -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',
Please sign in to comment.
Something went wrong with that request. Please try again.