2. We need a login module!
Let’s use OpenID! Or Facebook! We need
Twitter too...! I have and idea to implement a
pretty cool auth module!
WRONG!
3. Here you go:
@app.route('/login', methods=['POST'])
def login():
email = request.form.get("email")
session['email'] = email
if not db.ghift_users.find_one({'email': email}):
db.ghift_users.insert({'email': email})
return 'OK'
Done!
4. We need to send out mails!
Let’s integrate Mailchimp! Or Sendgrid!We
need features like HTML mail and the like...!
WRONG!
5. Here you go:
def sendmail(mail_subject, mail_body, mail_to):
result = send_mail(mail_subject, mail_body, settings.EMAIL_FROM,
[mail_to], fail_silently=False)
return result
Done!
6. We need scheduler for recurring
tasks!
Let’s integrate Celery or Quartz! Those are just
awesome…!
WRONG!
(not that they are not awesome, but still it’s an MVP…)