Check the static directory paths in your html file. You've given '/static'.
Give the full path and try it out.

-pradeep


On Tue, Mar 19, 2013 at 1:50 PM, Anand Chitipothu <[email protected]>wrote:

> How are you running you application?
>
> Anand
>
> On Tue, Mar 19, 2013 at 8:13 AM, saifee vohra <[email protected]>
> wrote:
> > Hello everyone,
> > I have tried to load css and js files with static directory but it didn't
> > work even try static handler method from this group but it also didn't
> work.
> >
> > My app.py code is:
> >
> > import web
> > from sentiment_analyser_service import SentimentAnalyzingService
> >
> > render = web.template.render('C:\\sentiment\\templates')
> >
> > urls = (
> >     '/Ok','Index',
> >     )
> >
> > app = web.application(urls, globals())
> > class Index(object):
> >
> >     def GET(self):
> >         return render.get_text1()
> >
> >     def POST(self):
> >         form = web.input(paragraph="None")
> >         textToBeAnalysed = "%s" % (form.paragraph)
> >         service = SentimentAnalyzingService()
> >
> >         scoreOfSentimentAnalysis =
> > service.performBasicSentimentAnalysis(textToBeAnalysed)
> >         return render.show_sentiment(scoreOfSentimentAnalysis)
> >
> >
> > if __name__ == "__main__":
> >     app.run()
> >
> > and my template is get_text.html:
> >
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> > <html xmlns="http://www.w3.org/1999/xhtml";>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> > <title>Sentiment analyzer</title>
> >     <script type="text/javascript" src="/static/jquery-1.3.js"></script>
> >     <script type="text/javascript" src="/static/file.js"></script>
> >     <link rel="stylesheet" type="text/css" href="/static/myfile.css">
> >
> > <body background="bg.jpg">
> >     <center>
> > <h1>&nbsp;</h1>
> > <h1>&nbsp;</h1>
> > <h1>&nbsp;</h1>
> > <h1>Enter your text to analyze sentiment.</h1>
> > </center>
> > <br />
> > <form method="post" action="/Ok">
> >     <center>
> >        <!-- <textarea name="paragraph" cols="50" rows="50"></textarea>
> -->
> >         <input name="paragraph" id="status" value="Type something here to
> > analyze" type="text"/>
> >         <input type="submit" value="Ok" />
> >         <!--<input type="submit" style="margin-leftt: 10px;padding-left:5
> > cm;" class="button_example3" value="Ok" /> -->
> >    <pre>
> >
> >
> >
> >    </pre>
> >      <center>
> >      <h1>Upload your File to analyze sentiment.</h1>
> >      <br />
> >      <p>&nbsp;</p>
> >         <p><input class="file-upload" type="file" name="Filedata" />
> >         <pre>&nbsp;             </pre>
> >         </p>
> >         <input type="button" style="margin-right: 50px;"
> > class="button_example11111" value="Analyze" />
> >        </form>
> >     </center>
> >     <pre>
> >
> >
> >     </pre>
> >
> >     <center>
> >       <h1>Insert URL to analyze sentiment.</h1></center>
> >     <br />
> >     <center>
> >             <input name="url" id="url" value="Type URL here"
> type="text"/>
> >             <input type="button" class="button_example211"
> value="Analyze"
> > />
> >     </center>
> >
> > </form>
> >
> > </body>
> > </html>
> >
> > when try to run this code it give me
> >
> > Error code explanation: 404 = Nothing matches the given URI.. It doesn't
> > load my CSS and JS file..
> >
> > So please anyone can help me with this..what things i need to do?
> >
> > Thanks.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "web.py" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > To post to this group, send email to [email protected].
> > Visit this group at http://groups.google.com/group/webpy?hl=en.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
>
>
> --
> Anand
> http://anandology.com/
>
> --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/webpy?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to