Giter Club home page Giter Club logo

max-newsletter's Introduction

max-newsletter's People

Contributors

hsuanchi avatar tai271828 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

max-newsletter's Issues

If there is no subscriber, the counting number is incorrect

Bug Description

If there is no subscriber, the counting number is incorrect

Steps to Reproduce

Please use this ephemeral env to launch an empty db #5

Expected Result

The page will show 0 subscriber

Actual Result

The page shows 100 subscribers. Reproducing rate: 100%

Canonical / duplicate content

  • "/" 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/.

NameError: name 'app' is not defined

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)

Build an application

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.

flake 8 - suppress unnecessary warning

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.

Rename DevelopmentConfig and TestingConfig

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.