[Moin-user] reference ot external file possible?

Markus Liebelt markus.liebelt at online.de
Sun Oct 2 11:41:35 EDT 2005


Hello Nir,

just copied:

     external_resources = os.path.abspath("./resources")
     url_mapping = {"file:///resources/": "file:///%s/" % external_resources}

So I think the directory resources should be under the wiki directory, parallel to the data directory. Is that correct?

I had to include an import to os, but then the code could be interpreted fine.

Bye
	Markus

On Sun, 02 Oct 2005 12:27:35 +0200, Nir Soffer <nirs at actcom.net.il> wrote:

> What is your url_mapping setting?
>
> On 2 Oct, 2005, at 13:26, Markus Liebelt wrote:
>
>> thank you for you tip. I tried it out, but could not tell to what
>> effect. What I get is:
>>
>> 1. I expand the wikiconfig.py like you said
>> 2. I define a directory wiki/resources
>> 3. I include there a file test.txt
>> 4. I enter an URL in a wiki page: file:///resources/test.txt
>>
>> When I click on the URL, the following happens:
>> 1. In the browser, nothing is done
>> 2. In the MMDE shell output, noting is seen.
>>
>> What I think is, that the browser does not accept a link like that.
>>
>> Then I tried to replace the file: by http: to avoid that, and get the
>> following result:
>>
>> 1. Browser tells me that he has an internal communication error, that
>> the resource is not available. The exact output was:
>>
>> Internal communication error
>>
>> You tried to access the address http:///resources/test.txt, which is
>> currently unavailable. Please make sure that the Web address (URL) is
>> correctly spelled and punctuated, then try reloading the page.
>>
>
> Best Regards,
>
> Nir Soffer
>
>






More information about the Moin-user mailing list