Dear Malcolm,

Thanks for your reply. I put the full path:


<a
href="file:///Users/caiyizhi/Dropbox/Programming/Django/genocad_prolog/prolog_compiler/bin/2009-04-28_12-
02-29_results.txt" target="_blank">Test</a><br/>

And I click on the link, nothing comes out. I am wondering how to get this
done.

Thanks,
Patrick


Yizhi Cai, GBCB Ph.D Student
Virginia Bioinformatics Institute
Virginia Tech,Blacksburg, VA 24061


On Tue, Apr 28, 2009 at 12:46 PM, Malcolm Tredinnick <
malc...@pointy-stick.com> wrote:

>
> On Tue, 2009-04-28 at 12:24 -0400, Cai Yizhi wrote:
> > Hello,
> >
> > I am a new comer to Django. I want to create hyper link pointing to a
> > local text file (say ~/a.txt). I am wondering how to do this in
> > Django?
> >
> > I have tried:
> > <a href="file:///~/a.txt" target="_blank">Download</a><br/>
> >
> > But it doesn't work.
>
> That's because "~" doesn't mean anything to the filesystem. It's a
> special character that is interpreted by the shell (well, some shells;
> not all) to mean the current user's home directory. You'll need to put
> in the full path to the user's home directory. Look at things like the
> standard Python module "pwd" if you need assistance doing that.
>
> Regards,
> Malcolm
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to