mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-11 08:23:49 +00:00
notification: Expand and clarify restriction on id property
- This is to allow arbitrary strings to be part of id property via base32 encoding. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
6216f7872c
commit
b3663075a0
@ -70,7 +70,9 @@ class Notification(models.StoredNotification):
|
||||
following fields are present in the model:
|
||||
|
||||
'id' is a unique string identifier for the notification and acts as the
|
||||
primary key for the stored database table.
|
||||
primary key for the stored database table. Only the following chars are
|
||||
currently allowed: A-Z, a-z, 0-9, - and =. If other chars must be used, it
|
||||
is recommended to use base32 encoding.
|
||||
|
||||
'app_id' is the unique ID of the app showing the notification.
|
||||
|
||||
@ -154,6 +156,7 @@ class Notification(models.StoredNotification):
|
||||
been dismissed by the user.
|
||||
|
||||
"""
|
||||
|
||||
class Meta: # pylint: disable=too-few-public-methods
|
||||
"""Meta properties of the Notification model."""
|
||||
proxy = True
|
||||
|
||||
@ -32,6 +32,6 @@ urlpatterns = [
|
||||
url(r'locked/$', public(CaptchaLoginView.as_view()), name='locked_out'),
|
||||
|
||||
# Notifications
|
||||
url(r'^notification/(?P<id>[a-z0-9-]+)/dismiss/$',
|
||||
url(r'^notification/(?P<id>[A-Za-z0-9-=]+)/dismiss/$',
|
||||
views.notification_dismiss, name='notification_dismiss')
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user