mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +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:
|
following fields are present in the model:
|
||||||
|
|
||||||
'id' is a unique string identifier for the notification and acts as the
|
'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.
|
'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.
|
been dismissed by the user.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class Meta: # pylint: disable=too-few-public-methods
|
class Meta: # pylint: disable=too-few-public-methods
|
||||||
"""Meta properties of the Notification model."""
|
"""Meta properties of the Notification model."""
|
||||||
proxy = True
|
proxy = True
|
||||||
|
|||||||
@ -32,6 +32,6 @@ urlpatterns = [
|
|||||||
url(r'locked/$', public(CaptchaLoginView.as_view()), name='locked_out'),
|
url(r'locked/$', public(CaptchaLoginView.as_view()), name='locked_out'),
|
||||||
|
|
||||||
# Notifications
|
# 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')
|
views.notification_dismiss, name='notification_dismiss')
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user