Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @app.route('/display', methods=["GET", "POST"])
- def display():
- result = request.form.to_dict()
- result['emailAlias'] = result["firstName"].lower() + "." + result["lastName"].lower() + "@email.com"
- result['userName'] = result['firstName'][0].lower() + result['lastName'].lower()
- result['fullName'] = result['firstName'] + " " + result['lastName']
- result['emailAddress'] = result['userName'] + "@email.com"
- result['proxyAddress'] = "smtp:" + result['emailAddress']
- result['mailingLists'] = []
- #it goes on ...
- if result['department'] == "Account Management":
- result['mailingLists'].append("this_thing@mail.com")
- result['adGroups'].append("this_otherthing@mail.com")
- elif result['department'] in ['Engineering', 'Dev']:
- result['mailingLists'].append("engineering@mail.com")
- result['mailingLists'].append("tech@mail.com")
- result['otherGroup'].append("developers")
- result['otherGroup'] = ["engineering"]
- result['adGroups'].append("Knitting")
- elif result['department'] == "Food Eating":
- result['mailingLists'].append("foodeating@mail.com")
- result['adGroups'].append("noteating")
- elif result['department'] == "Operations - The Video Game":
- result['otherCat'].append("Operations - The Video Game")
- result['mailingLists'].append("opGame@mail.com")
- elif result['department'] == "Operations - The Movie":
- result['otherCat'].append("Operations - The Movie")
- result['mailingLists'].append("opMovie@mail.com")
- #etc...
- return render_template('newpage.html', result=result)
- @app.route('/display', methods=["GET", "POST"])
- def display():
- result = request.form.to_dict()
- result['emailAlias'] = result["firstName"].lower() + "." + result["lastName"].lower() + "@email.com"
- result['userName'] = result['firstName'][0].lower() + result['lastName'].lower()
- result['fullName'] = result['firstName'] + " " + result['lastName']
- result['emailAddress'] = result['userName'] + "@email.com"
- result['proxyAddress'] = "smtp:" + result['emailAddress']
- result['mailingLists'] = []
- #it goes on ...
- if result['department'] == "Account Management":
- result['mailingLists'].append("this_thing@mail.com")
- result['adGroups'].append("this_otherthing@mail.com")
- elif result['department'] in ['Engineering', 'Dev']:
- result['mailingLists'].append("engineering@mail.com")
- result['mailingLists'].append("tech@mail.com")
- result['otherGroup'].append("developers")
- result['otherGroup'] = ["engineering"]
- result['adGroups'].append("Knitting")
- elif result['department'] == "Food Eating":
- result['mailingLists'].append("foodeating@mail.com")
- result['adGroups'].append("noteating")
- elif result['department'] == "Operations - The Video Game":
- result['otherCat'].append("Operations - The Video Game")
- result['mailingLists'].append("opGame@mail.com")
- elif result['department'] == "Operations - The Movie":
- result['otherCat'].append("Operations - The Movie")
- result['mailingLists'].append("opMovie@mail.com")
- #etc...
- return render_template('newpage.html', result=result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement