-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revamp Notif Logic #324
Merged
Merged
Revamp Notif Logic #324
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2d60616
Remove Me Groups
vcai122 dedf089
Rewrite notif logic according to new specs, testing still needed
vcai122 ffb57fc
Merge remote-tracking branch 'origin/master' into revamp-notifications
vcai122 9829626
what is happening im so bad at git
vcai122 de298b6
fix tests and stuff
vcai122 b04eafa
remove comments and notif param cleaner
vcai122 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
from django.contrib import admin | ||
|
||
from user.models import NotificationSetting, NotificationToken, Profile | ||
from user.models import AndroidNotificationToken, IOSNotificationToken, NotificationService, Profile | ||
|
||
|
||
admin.site.register(NotificationToken) | ||
admin.site.register(NotificationSetting) | ||
# custom IOSNotificationToken admin | ||
class IOSNotificationTokenAdmin(admin.ModelAdmin): | ||
list_display = ("token", "user", "is_dev") | ||
|
||
|
||
admin.site.register(IOSNotificationToken, IOSNotificationTokenAdmin) | ||
admin.site.register(AndroidNotificationToken) | ||
admin.site.register(NotificationService) | ||
admin.site.register(Profile) |
64 changes: 64 additions & 0 deletions
64
backend/user/migrations/0010_remove_notificationtoken_user_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Generated by Django 5.0.2 on 2024-11-11 05:24 | ||
|
||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("user", "0009_profile_fitness_preferences"), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="notificationtoken", | ||
name="user", | ||
), | ||
migrations.CreateModel( | ||
name="AndroidNotificationToken", | ||
fields=[ | ||
("token", models.CharField(max_length=255, primary_key=True, serialize=False)), | ||
( | ||
"user", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL | ||
), | ||
), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name="IOSNotificationToken", | ||
fields=[ | ||
("token", models.CharField(max_length=255, primary_key=True, serialize=False)), | ||
("is_dev", models.BooleanField(default=False)), | ||
( | ||
"user", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL | ||
), | ||
), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name="NotificationService", | ||
fields=[ | ||
("name", models.CharField(max_length=255, primary_key=True, serialize=False)), | ||
("enabled_users", models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
migrations.DeleteModel( | ||
name="NotificationSetting", | ||
), | ||
migrations.DeleteModel( | ||
name="NotificationToken", | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would an
is_dev
field not make sense here too? I don't know the Android notif system but would be surprised if they didn't have similar optionality to iOS.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after talking to android didn't seem like they had