hsuanchi / max-newsletter Goto Github PK
View Code? Open in Web Editor NEWNewsletter (Flask + Celery + JWT + Smtplib)
Home Page: https://article.maxlist.xyz/
Newsletter (Flask + Celery + JWT + Smtplib)
Home Page: https://article.maxlist.xyz/
If there is no subscriber, the counting number is incorrect
Please use this ephemeral env to launch an empty db #5
The page will show 0 subscriber
The page shows 100 subscribers. Reproducing rate: 100%
"/" and "/zh/" have same content.
Should keep just one version and redirect the other
"/", "/zh/", and "/en/" all canonical to "/"
Should be self referencing, "/zh/" canonicalize to /zh/, and /en/ canonicalize to /en/.
The recent poetry migration seems to cause regression. By building the latest code base (commit: 16df6dd ) via docker-compose[1], the log shows errors when loading the landing page. See [2]. Besides, I did not provide any .flaskenv
in this case.
Expected result: the landing page is loaded and shows up.
Actual result: "Internal Server Error" shown on the browser
[1] docker-compose stop ; docker-compose rm -f ; docker-compose pull ; docker-compose -f docker-compose-dev.yml up --build -d
[2] docker logs --follow flask
and open localhost
from your browser
Traceback (most recent call last):
File "main.py", line 17, in <module>
@app.shell_context_processor
NameError: name 'app' is not defined
Error:
Unable to load celery application.
The module celery_worker.celery was not found.
Error:
Unable to load celery application.
The module celery_worker.celery was not found.
Error:
Unable to load celery application.
The module celery_worker.celery was not found.
subprocess 10 exited with code 1
subprocess 11 exited with code 1
subprocess 12 exited with code 1
--- no python application found, check your startup logs for errors ---
[pid: 14|app: -1|req: -1/1] 172.18.0.1 () {52 vars in 1172 bytes} [Thu Dec 10 19:04:47 2020] GET /zh/ => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
--- no python application found, check your startup logs for errors ---
[pid: 14|app: -1|req: -1/2] 172.18.0.1 () {52 vars in 1104 bytes} [Thu Dec 10 19:04:47 2020] GET /favicon.ico => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 1)
There are plenty of relative module imports in this project. We may want to refactor it and release the core part as a python package.
Some "warning" from flake8 is expected. For instance, ./flask/celery_worker.py:9:5: F401 'app.celery' imported but unused
but we indeed need the module for celery worker.
we are not really need 443 port in testing environment, removal of the unnecessary cert/key files when testing env.
The newsletter flow is working well.
Our goal is to make TestingConfig will be used for testing with a staging site. DevelopmentConfig will be used for development rather than testing with a staging site.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.