django-wiki / django-nyt

Notification system for Django with batteries included: Email digests, user settings, JSON API
Apache License 2.0
144 stars 47 forks source link

notify, subscribe and unsubscribe: all parameters must be serializable #138

Open benjaoming opened 10 months ago

benjaoming commented 10 months ago

Instead of boggling the user's mind with weather or not these parameters should be supplied as objects or FK integers etc, let's

1) force that they are integers or strings (!) 2) allow both model instances or integers or strings

Because of compatibility with Celery and such async runtimes, we should try to make these functions as dumb as possible. This will also help in cases where the arguments are received from a querystring, and we can skip resolving them before using them.