-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from quaternionmedia/magnussens
Magnussens: form to render workflow
- Loading branch information
Showing
20 changed files
with
554 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
EMAIL_SERVER=femail.harpo.me | ||
EMAIL_PORT=587 | ||
EMAIL_USERNAME=alfred@quaternion.media | ||
EMAIL_PASSWORD="" | ||
EMAIL_SENDTO="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,3 +51,5 @@ api/data | |
*.png | ||
*.jpg | ||
*.edl | ||
|
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from smtplib import SMTP | ||
from email.message import EmailMessage | ||
import config | ||
|
||
def sendMail(message, subject): | ||
try: | ||
msg = EmailMessage() | ||
msg.set_content(message) | ||
msg['Subject'] = subject | ||
msg['From'] = config.EMAIL_USERNAME | ||
msg['To'] = config.EMAIL_SENDTO | ||
s=SMTP(config.EMAIL_SERVER, config.EMAIL_PORT) | ||
s.set_debuglevel(1) | ||
s.starttls() | ||
s.login(config.EMAIL_USERNAME, config.EMAIL_PASSWORD) | ||
s.send_message(msg) | ||
s.quit() | ||
return True | ||
except Exception as e: | ||
print('error sending email', e) | ||
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule otto
updated
8 files
+2 −20 | Dockerfile | |
+90 −56 | otto/colortransitions.py | |
+5 −2 | otto/getdata.py | |
+20 −5 | otto/main.py | |
+1 −1 | otto/models.py | |
+31 −22 | otto/render.py | |
+72 −9 | otto/templates.py | |
+1 −0 | requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ tinydb | |
pyjwt | ||
passlib[bcrypt] | ||
pymongo | ||
celery | ||
google-cloud-storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import m from 'mithril' | ||
import { Menu } from './Menu' | ||
|
||
export function Form() { | ||
return { | ||
view: vnode => { | ||
return m('form', vnode.attrs, vnode.children) | ||
} | ||
} | ||
} | ||
|
||
export function TextBox() { | ||
return { | ||
view: vnode => { | ||
return [ | ||
m('label.formlabel', {for: vnode.attrs.name}, vnode.attrs.text), | ||
m('textarea', vnode.attrs), | ||
m('br') | ||
] | ||
} | ||
} | ||
} | ||
export function Button() { | ||
return { | ||
view: vnode => { | ||
return m('input.button', vnode.attrs, vnode.children) | ||
} | ||
} | ||
} | ||
|
||
export function Img() { | ||
return { | ||
view: vnode => { | ||
return m('img', vnode.attrs, vnode.children) | ||
} | ||
} | ||
} | ||
|
||
export function Selector() { | ||
return { | ||
view: vnode => { | ||
return [ | ||
m('label.formlabel', { for: vnode.attrs.name }, vnode.attrs.text), | ||
m('select', vnode.attrs, vnode.children.map(c => { | ||
return m('option', {value: c}, c) | ||
})), | ||
m('br'), | ||
] | ||
} | ||
} | ||
} | ||
|
||
|
||
export function Section() { | ||
return { | ||
view: vnode => { | ||
return m('section', vnode.attrs, vnode.children) | ||
} | ||
} | ||
} | ||
|
||
export function Layout() { | ||
return { | ||
view: vnode => { | ||
return [ | ||
m(Menu), | ||
m(Section, vnode.attrs, vnode.children) | ||
] | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.