Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
djangoldp-webpushnotification
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
djangoldp-packages
djangoldp-webpushnotification
Commits
810d7923
"src/git@git.startinblox.com:applications/hubl.git" did not exist on "c3301e3c4eb6bfb94522ab972f16cca61558a7b5"
Commit
810d7923
authored
3 years ago
by
trav
Browse files
Options
Downloads
Patches
Plain Diff
new delete function for clearing subscriptions
parent
66956b13
No related branches found
No related tags found
No related merge requests found
Pipeline
#11364
passed
3 years ago
Stage: test
Stage: release
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
djangoldp_webpushnotification/management/commands/delete_subscription.py
+14
-0
14 additions, 0 deletions
...shnotification/management/commands/delete_subscription.py
with
14 additions
and
0 deletions
djangoldp_webpushnotification/management/commands/delete_subscription.py
0 → 100644
+
14
−
0
View file @
810d7923
from
django.core.management.base
import
BaseCommand
from
djangoldp_webpushnotification.models
import
VAPIDKeyset
from
webpush.models
import
SubscriptionInfo
class
Command
(
BaseCommand
):
help
=
"
delete subscriptions
"
def
handle
(
self
,
*
args
,
**
options
):
SubscriptionInfo
.
objects
.
all
().
delete
()
self
.
stdout
.
write
(
"
Subscriptions deleted
"
)
exit
(
0
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment