Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95557
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Subject | Re: SQLite3 and web server |
| Date | 2015-08-22 14:23 +0200 |
| Organization | None |
| References | <87pp2hp3vg.fsf@Equus.decebal.nl> <mailman.7.1440149603.13558.python-list@python.org> <87d1ygptdy.fsf@Equus.decebal.nl> <mailman.12.1440230110.17298.python-list@python.org> <87y4h3mty7.fsf@Equus.decebal.nl> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.13.1440246229.17298.python-list@python.org> (permalink) |
Cecil Westerhof wrote:
> On Saturday 22 Aug 2015 09:51 CEST, Peter Otten wrote:
>
>> Cecil Westerhof wrote:
>>
>>> Thanks. I made a first try:
>>> https://github.com/CecilWesterhof/PublishedPhotos
>>>
>>> The thing I do not like is that all my static files have to be put
>>> in /static/, but I think I can life with it.
>>
>> Is that really required by bottle? Where would you like to put the
>> files?
>
> That is how I interpret this:
> http://bottlepy.org/docs/dev/tutorial.html#routing-static-files
No, /static/ is in no way special. To drive the point home here's a bogus
example that gives you a random file from the ~/.thumbnails/large folder:
@bottle.route("/<path:path>")
def random_thumbnail(path):
root = os.path.expanduser("~/.thumbnails/large")
name = random.choice(os.listdir(root))
return bottle.static_file(name, root=root)
The path is not even taken into account.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
SQLite3 and web server Cecil Westerhof <Cecil@decebal.nl> - 2015-08-21 08:11 +0200
Re: SQLite3 and web server Steven D'Aprano <steve@pearwood.info> - 2015-08-21 16:50 +1000
Re: SQLite3 and web server Cecil Westerhof <Cecil@decebal.nl> - 2015-08-21 09:13 +0200
Re: SQLite3 and web server Chris Angelico <rosuav@gmail.com> - 2015-08-21 17:27 +1000
Re: SQLite3 and web server Cecil Westerhof <Cecil@decebal.nl> - 2015-08-21 11:44 +0200
Re: SQLite3 and web server Michael Torrie <torriem@gmail.com> - 2015-08-21 08:19 -0600
Re: SQLite3 and web server Cecil Westerhof <Cecil@decebal.nl> - 2015-08-21 17:23 +0200
Re: SQLite3 and web server Michael Torrie <torriem@gmail.com> - 2015-08-21 08:57 -0600
Re: SQLite3 and web server Cecil Westerhof <Cecil@decebal.nl> - 2015-08-22 13:38 +0200
Re: SQLite3 and web server Peter Otten <__peter__@web.de> - 2015-08-21 11:32 +0200
Re: SQLite3 and web server Cecil Westerhof <Cecil@decebal.nl> - 2015-08-21 17:12 +0200
Re: SQLite3 and web server Peter Otten <__peter__@web.de> - 2015-08-22 09:51 +0200
Re: SQLite3 and web server Cecil Westerhof <Cecil@decebal.nl> - 2015-08-22 13:41 +0200
Re: SQLite3 and web server Peter Otten <__peter__@web.de> - 2015-08-22 14:23 +0200
csiph-web