why are you always checking for str e.g. in an alert? the alert of an APNSNotification does not accept unicode as you check for str or APNSAlert
(like everywhere else in the code)
did I miss something in the specs?
Comment #1
Posted on Apr 18, 2010 by Happy CatI assume you're right about support of unicode. But I need some example of your code to make patch
Comment #2
Posted on Apr 18, 2010 by Quick WombatSorry, forget about this I tried something like this in django:
message = APNSNotification() message.alert(u'äüößÄÜÖ')
now I do:
message.alert(smart_str(u'äüößÄÜÖ'))
and erverything works fine...
Comment #3
Posted on Apr 18, 2010 by Happy CatAnyway you can make additional condition in notifications.py line 289: add: if not isinstance(alert, str) and not isinstance(alert, unicode) and not isinstance(alert, APNSAlert): instead of: if not isinstance(alert, str) and not isinstance(alert, APNSAlert):
and at line 324: if isinstance(self.alertObject, str) or isintance(self.alertObject, unicode): instead of: if isinstance(self.alertObject, str):
I'll fix it in upcoming version of wrapper
Comment #4
Posted on Apr 24, 2010 by Happy CatThis issue have been fixed in 0.5 version of APNSWrapper
Status: Fixed
Labels:
Type-Defect
Priority-Medium