-
Notifications
You must be signed in to change notification settings - Fork 20
[Docs+] Build a Newsletter Platform With Flask and MongoDB #267
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
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for docs-pymongo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
great work on a long page!
@@ -0,0 +1,561 @@ | |||
.. _pymongo-flask-celery: | |||
.. original URL: https://www.mongodb.com/developer/products/mongodb/python-flask-celery-newsletter/ |
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.
were we asked to doc the original URL like this?
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.
It's part of a proposed maintenance plan. The idea is to compare traffic to the new url compared with traffic to the new url, and this will help track that.
:values: tutorial | ||
|
||
.. meta:: | ||
:keywords: flask, celery, integration, code example |
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.
any other keywords that make sense here? 'flask', 'celery', and 'integration' are in page headings and therefore get a lot of weight already
In this tutorial, you can learn how to build a newsletter platform using | ||
MongoDB, Celery, and Flask. This application allows users to subscribe to |
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.
I: using
In this tutorial, you can learn how to build a newsletter platform using | |
MongoDB, Celery, and Flask. This application allows users to subscribe to | |
In this tutorial, you can learn how to build a newsletter platform by using | |
MongoDB, Celery, and Flask. This application allows users to subscribe to |
Or:
In this tutorial, you can learn how to build a newsletter platform using | |
MongoDB, Celery, and Flask. This application allows users to subscribe to | |
In this tutorial, you can learn how to use MongoDB, Celery, and Flask | |
to build a newsletter platform. This application allows users to subscribe to |
Celery is an open-source distributed task queue that makes handling large | ||
volumes of messages efficiently. It supports asynchronous processing and task |
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.
Celery is an open-source distributed task queue that makes handling large | |
volumes of messages efficiently. It supports asynchronous processing and task | |
Celery is an open-source distributed task queue that makes handling large | |
volumes of messages efficient. It supports asynchronous processing and task |
Or:
Celery is an open-source distributed task queue that makes handling large | |
volumes of messages efficiently. It supports asynchronous processing and task | |
Celery is an open-source distributed task queue that handles large | |
volumes of messages efficiently. It supports asynchronous processing and task |
Prerequisites | ||
~~~~~~~~~~~~~ | ||
|
||
Ensure you have the following components installed and set up before you start |
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.
Ensure you have the following components installed and set up before you start | |
Ensure that you have the following components installed and set up before you start |
You can also confirm that you sent an email navigating to the | ||
``deliveries`` collection in your ``newletter`` database. |
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.
You can also confirm that you sent an email navigating to the | |
``deliveries`` collection in your ``newletter`` database. | |
You can also confirm that you sent an email by navigating to the | |
``deliveries`` collection in your ``newsletter`` database. |
This application demonstrates how to integrate with the Celery tasks task queue to | ||
manage subscriber data, and send batch emails. You can further enhance this |
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 application demonstrates how to integrate with the Celery tasks task queue to | |
manage subscriber data, and send batch emails. You can further enhance this | |
This application demonstrates how to integrate with the Celery task queue to | |
manage subscriber data and send batch emails. You can further enhance this |
More Resources | ||
-------------- | ||
|
||
For more information about to components used in this tutorial, see the following |
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.
For more information about to components used in this tutorial, see the following | |
For more information about the components used in this tutorial, see the following |
- `Flask <https://flask.palletsprojects.com>`__ | ||
- `Flask Mail <https://pypi.org/project/Flask-Mail/#files>`__ | ||
- `Celery <https://docs.celeryq.dev/en/stable/>`__ | ||
- :mdb-shell:`MongoDB Shell <>` |
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.
S: i think you could omit links already included earlier in the page
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.
I think there's value in having links available through the docs and then also at the end. Then you're providing access as the links are relevant, but also in an easy to find location for quick reference.
- `Celery <https://docs.celeryq.dev/en/stable/>`__ | ||
- :mdb-shell:`MongoDB Shell <>` | ||
|
||
For support or to contribute to the MongoDB Community, see the `MongoDB Developer Community <https://www.mongodb.com/community/>`__. |
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.
S: clarity
For support or to contribute to the MongoDB Community, see the `MongoDB Developer Community <https://www.mongodb.com/community/>`__. | |
To find support or to contribute to the MongoDB community, see the `MongoDB Developer Community <https://www.mongodb.com/community/>`__ page. |
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.
Looks great! Just a couple small suggestions
:atlas:`Get Started with Atlas </getting-started?tck=docs_driver_python>` page | ||
in the Atlas documentation. | ||
- A database in your cluster called ``newsletter``. For more information, see | ||
- A database names ``newsletter`` in your cluster. For more information, see |
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.
- A database names ``newsletter`` in your cluster. For more information, see | |
- A database named ``newsletter`` in your cluster. For more information, see |
SMTP servers, see the `Simple Mail Transfer Protocol | ||
<https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol>`__ wikipedia page. |
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.
SMTP servers, see the `Simple Mail Transfer Protocol | |
<https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol>`__ wikipedia page. | |
SMTP servers, see the :wikipedia:`Simple Mail Transfer Protocol | |
<Simple_Mail_Transfer_Protocol>`__ Wikipedia page. |
following files use `Fetch API calls | ||
<https://en.wikipedia.org/wiki/XMLHttpRequest#Fetch_alternative>`__. They also |
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.
following files use `Fetch API calls | |
<https://en.wikipedia.org/wiki/XMLHttpRequest#Fetch_alternative>`__. They also | |
following files use :wikipedia:`Fetch API calls | |
<XMLHttpRequest#Fetch_alternative>`__. They also |
@@ -330,10 +341,11 @@ Copy the following code into your ``subscribe.html`` file: | |||
</body> | |||
</html> | |||
|
|||
Because this application uses asynchronous messages, the script in this file | |||
uses Fetch API calls. This script also handles timeouts and errors. | |||
The script for the admin page displays an alert to the user which depends on the |
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.
The script for the admin page displays an alert to the user which depends on the | |
The script for the admin page displays an alert to the user that depends on the |
- `Gmail <www.gmail.com>`__ to use as an SMTP server. For more information about | ||
SMTP servers, see the :wikipedia:`Simple Mail Transfer Protocol | ||
<Simple_Mail_Transfer_Protocol>` Wikipedia page. | ||
- `Python 3.8 or later <https://www.python.org/downloads/>`__ |
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.
I'd recommend 3.9 or later, since 3.8 is end of life and the current version of PyMongo only supports 3.9+.
|
||
.. code-block:: bash | ||
|
||
pip install Flask Flask-Mail pymongo celery |
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.
I'd recommend using flask-pymongo since we maintain it.
Pull Request Info
PR Reviewing Guidelines
Original blog post - https://www.mongodb.com/developer/products/mongodb/python-flask-celery-newsletter/
JIRA - https://jira.mongodb.org/browse/DOCSP-48899
Staging Links
Self-Review Checklist