Just make sure when you visit "http://localhost:8080/sample.doc", you can get a file download dialog. It seems you mistook template and static file, which are much difference from each other, in your main.py.
I suggest you read all the document before your developing. 2009/5/12 Satyajit p <[email protected]> > I have done this same .I have put that before the main.py > > Do we need to change anything in main.py? > > > 2009/5/12 风笑雪 <[email protected]> > >> Put this handler before main.py, so that it will be handled as a static >> file. >> >> >> 2009/5/12 Satyajit p <[email protected]> >> >>> I am getting the below error. >>> >>> Traceback (most recent call last): >>> File "C:\Program >>> Files\Google\google_appengine\google\appengine\ext\webapp\__init__.py", >>> line 498, in __call__ >>> handler.get(*groups) >>> File "C:\Documents and >>> Settings\Administrator\Desktop\apps\scoobies1\main.py", line 103, in get >>> >>> >>> >>> self.response.out.write(template.render(path, template_values)) >>> File "C:\Program >>> Files\Google\google_appengine\google\appengine\ext\webapp\template.py", >>> line 80, in render >>> t = load(template_path, debug) >>> >>> >>> >>> File "C:\Program >>> Files\Google\google_appengine\google\appengine\ext\webapp\template.py", >>> line 108, in load >>> template = django.template.loader.get_template(file_name) >>> File "C:\Program >>> Files\Google\google_appengine\lib\django\django\template\loader.py", line >>> 79, in get_template >>> >>> >>> >>> source, origin = find_template_source(template_name) >>> File "C:\Program >>> Files\Google\google_appengine\lib\django\django\template\loader.py", line >>> 72, in find_template_source >>> raise TemplateDoesNotExist, name >>> >>> >>> >>> TemplateDoesNotExist: hello.doc >>> >>> >>> >>> 2009/5/12 风笑雪 <[email protected]> >>> >>> I've tried that, and met no problem. >>>> >>>> 2009/5/12 Satyajit p <[email protected]> >>>> >>>> I have tried with all but still I m facing problem.its not getting >>>>> downloaded.Can anybody please try and help.... >>>>> >>>>> 2009/5/11 djidjadji <[email protected]> >>>>> >>>>> >>>>>> If you want to serve the files dynamically you can use the method in >>>>>> >>>>>> http://code.google.com/appengine/articles/images.html >>>>>> >>>>>> 2009/5/11 风笑雪 <[email protected]>: >>>>>> > Sorry, I made a mistake on the path >>>>>> > - url: /sample\.doc >>>>>> > static_files: static/sample.doc # no "\" >>>>>> > upload: static/sample\.doc >>>>>> > 2009/5/11 Satyajit p <[email protected]> >>>>>> >> >>>>>> >> Thanks Keakon for your immediate response. >>>>>> >> >>>>>> >> I have done the changes what U mentioned but its not asking for to >>>>>> >> download. >>>>>> >> >>>>>> >> Its recognizing the path from YAML file. >>>>>> >> >>>>>> >> Regards, >>>>>> >> Satyajit >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> On Mon, May 11, 2009 at 12:48 PM, 风笑雪 <[email protected]> wrote: >>>>>> >>> >>>>>> >>> You need specify a url to locate "sample.doc" in your app.yaml >>>>>> file. >>>>>> >>> eg: >>>>>> >>> - url: /sample\.doc >>>>>> >>> static_files: static/sample\.doc >>>>>> >>> upload: static/sample\.doc >>>>>> >>> And put "sample.doc" in "static" folder. >>>>>> >>> >>>>>> >>> >>>>>> >>> >>>>>> http://code.google.com/intl/zh-CN/appengine/docs/python/config/appconfig.html >>>>>> >>> >>>>>> >>> 2009/5/11 Satyajit p <[email protected]> >>>>>> >>>> >>>>>> >>>> Hi All, >>>>>> >>>> I am trying to download(<a >>>>>> href="sample.doc">download</a>) a >>>>>> >>>> word file from html page through python/google apps.But I am >>>>>> unable to do >>>>>> >>>> so. >>>>>> >>>> >>>>>> >>>> Can anybody help me on this issue. >>>>>> >>>> >>>>>> >>>> Eagerly waiting for an early reply. >>>>>> >>>> >>>>>> >>>> Thanks in advance....... >>>>>> >>>> >>>>>> >>>> Regards, >>>>>> >>>> Satyajit >>>>>> >>>> >>>>>> >>>> >>>>>> >>> >>>>>> >>> >>>>>> >>> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> > >>>>>> > >>>>>> > > >>>>>> > >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>> >>> >>> >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
