-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: [AXM-252] add settings for edx-ace push notifications #2541
feat: [AXM-252] add settings for edx-ace push notifications #2541
Conversation
7cfb4e5
to
ad69d41
Compare
607f860
to
6ffdce6
Compare
|
||
def create(self, request, *args, **kwargs): | ||
if not getattr(settings, 'PUSH_NOTIFICATIONS_SETTINGS', None): | ||
return Response('Push notifications are not configured.', status.HTTP_501_NOT_IMPLEMENTED) |
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.
👍
@@ -22,3 +25,29 @@ def plugin_settings(settings): # lint-amnesty, pylint: disable=missing-function | |||
settings.ACE_ROUTING_KEY = ACE_ROUTING_KEY | |||
|
|||
settings.FEATURES['test_django_plugin'] = True | |||
settings.FCM_APP_NAME = 'fcm-edx-platform' | |||
|
|||
if getattr(settings, 'FIREBASE_SETTING_UP', None) is None: |
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.
This variable name means Firebase setup status? Maybe something like FIREBASE_SETUP_STATUS
will work here?
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.
Yep, renamed.
@@ -0,0 +1,16 @@ | |||
""" | |||
Utility functions for edx ace. |
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.
Utility functions for edx ace. | |
Utility functions for edx-ace. |
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.
Fixed.
""" | ||
try: | ||
import firebase_admin # pylint: disable=import-outside-toplevel | ||
except ImportError: |
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.
Maybe log here with text: "Could not import firebase_admin package"?
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.
Logs added.
course_key | ||
) | ||
|
||
if not course_notif_preference.get_notification_type_config(app_name, notification_type).get('push', False): |
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.
if not course_notif_preference.get_notification_type_config(app_name, notification_type).get('push', False): | |
if not course_notification_preference.get_notification_type_config(app_name, notification_type).get('push', False): |
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.
Maybe create a variable before the if statement to reduce the condition size and provide more clarity here
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.
Done
7ee15a8
to
ec8c7fa
Compare
4f01cbb
to
d979145
Compare
d979145
to
81ebaa4
Compare
* feat: [AXM-252] create policy for push notifications * feat: [AXM-252] add API for store device token * feat: [AXM-252] add settings for edx-ace push notifications * chore: [AXM-252] add edx-ace and django-push-notification to dev requirements * chore: [AXM-252] update edx-ace version * fix: [AXM-252] add create token edndpoint to urls * chore: [AXM-252] update django push notifications version * style: [AXM-252] fix code style issues after review * chore: [AXM-252] bump edx-ace version * refactor: [AXM-252] some push notif policy refactoring * chore: [AXM-252] change edx-ace branch to mob-develop * chore: [AXM-252] recompile requirements after rebase
* feat: [AXM-252] create policy for push notifications * feat: [AXM-252] add API for store device token * feat: [AXM-252] add settings for edx-ace push notifications * chore: [AXM-252] add edx-ace and django-push-notification to dev requirements * chore: [AXM-252] update edx-ace version * fix: [AXM-252] add create token edndpoint to urls * chore: [AXM-252] update django push notifications version * style: [AXM-252] fix code style issues after review * chore: [AXM-252] bump edx-ace version * refactor: [AXM-252] some push notif policy refactoring * chore: [AXM-252] change edx-ace branch to mob-develop * chore: [AXM-252] recompile requirements after rebase
* feat: [AXM-252] create policy for push notifications * feat: [AXM-252] add API for store device token * feat: [AXM-252] add settings for edx-ace push notifications * chore: [AXM-252] add edx-ace and django-push-notification to dev requirements * chore: [AXM-252] update edx-ace version * fix: [AXM-252] add create token edndpoint to urls * chore: [AXM-252] update django push notifications version * style: [AXM-252] fix code style issues after review * chore: [AXM-252] bump edx-ace version * refactor: [AXM-252] some push notif policy refactoring * chore: [AXM-252] change edx-ace branch to mob-develop * chore: [AXM-252] recompile requirements after rebase
* feat: [AXM-252] create policy for push notifications * feat: [AXM-252] add API for store device token * feat: [AXM-252] add settings for edx-ace push notifications * chore: [AXM-252] add edx-ace and django-push-notification to dev requirements * chore: [AXM-252] update edx-ace version * fix: [AXM-252] add create token edndpoint to urls * chore: [AXM-252] update django push notifications version * style: [AXM-252] fix code style issues after review * chore: [AXM-252] bump edx-ace version * refactor: [AXM-252] some push notif policy refactoring * chore: [AXM-252] change edx-ace branch to mob-develop * chore: [AXM-252] recompile requirements after rebase
feat: [AXM-252] add settings for edx-ace push notifications