<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
h1
        {mso-style-priority:9;
        mso-style-link:"Heading 1 Char";
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:24.0pt;
        font-family:"Times New Roman","serif";
        font-weight:bold;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.Heading1Char
        {mso-style-name:"Heading 1 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 1";
        font-family:"Times New Roman","serif";
        font-weight:bold;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hello Flask mailing list,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m new to Flask so I have no doubt many of you will have great suggestions on how to fix my issue.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have a simple web app which responds to an HTML form containing some selections that return links for Amazon S3 folders. I’ve used JavaScript to return the results on the same page to make it an easier experience for users (this is an
 internal only app, it won’t go out to the live web).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The app is basically structured like this (edited to keep this message as short as possible):<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">@app.route('/generate_urls', methods = ['GET', 'POST'])<o:p></o:p></p>
<p class="MsoNormal">def generate_urls():<o:p></o:p></p>
<p class="MsoNormal">  BUNCH OF CODE HERE (REMOVED FOR BREVITY) <o:p></o:p></p>
<p class="MsoNormal">  return RETURN_STUFF<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">@app.route('/')<o:p></o:p></p>
<p class="MsoNormal">def index():<o:p></o:p></p>
<p class="MsoNormal">  return render_template('index.html')<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">if __name__ == '__main__':<o:p></o:p></p>
<p class="MsoNormal">  app.run(host='0.0.0.0', port=1234)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My folder structure for the app looks like this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">app folder<o:p></o:p></p>
<p class="MsoNormal">--app_name.py<o:p></o:p></p>
<p class="MsoNormal">--static (folder)<o:p></o:p></p>
<p class="MsoNormal">----css (folder)<o:p></o:p></p>
<p class="MsoNormal">------css_file.css<o:p></o:p></p>
<p class="MsoNormal">----js (folder)<o:p></o:p></p>
<p class="MsoNormal">------js_file.js<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When I serve the app using the dev method, everything works great with no issues.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Now I’m working on using Apache and mod_wsgi to serve the app with a friendly URL and the homepage is served without issue once I’ve configured everything but when I attempt to use the form to create the links, I get an error from Apache
 that says:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:24.0pt;font-family:"Times New Roman","serif";color:black">Not Found<o:p></o:p></span></b></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:13.5pt;font-family:"Times New Roman","serif";color:black">The requested URL /generate_urls was not found on this server.<o:p></o:p></span></p>
<p class="MsoNormal">This leads me to believe it doesn’t know what to do with the @app.route() call.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m sure I’m missing something and may need to approach this differently, but I haven’t had much luck figuring that out on my own yet.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any help with this would be greatly appreciated.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><br>
Zach<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p></p>

<p>The information contained in this communication is intended for the use<br>
of the designated recipients named above. If the reader of this <br>
communication is not the intended recipient, you are hereby notified<br>
that you have received this communication in error, and that any review,<br>
dissemination, distribution or copying of this communication is strictly<br>
prohibited. If you have received this communication in error, please <br>
notify The Associated Press immediately by telephone at +1-212-621-1898 <br>
and delete this email. Thank you.<br>
[IP_US_DISC]</p><br>
<p>msk dccc60c6d2c3a6438f0cf467d9a4938</p></body>
</html>