Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!ecngs!feeder2.ecngs.de!217.188.199.168.MISMATCH!takemy.news.telefonica.de!telefonica.de!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'static': 0.03; 'root': 0.04; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'url:github': 0.09; 'def': 0.13; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'subject:server': 0.16; 'wrote:': 0.16; 'try:': 0.18; 'thanks.': 0.18; '>>>': 0.20; '2015': 0.20; 'aug': 0.20; 'interpret': 0.22; 'this:': 0.23; 'header:User-Agent:1': 0.26; 'example': 0.26; 'header:X -Complaints-To:1': 0.26; 'random': 0.29; 'point': 0.33; 'skip:~ 10': 0.33; 'file': 0.34; 'gives': 0.35; 'path': 0.35; 'url:dev': 0.35; 'but': 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'received:org': 0.37; 'no,': 0.38; 'files': 0.38; 'to:addr:python.org': 0.40; 'where': 0.40; 'received:de': 0.40; 'saturday': 0.66; 'life': 0.67; 'home': 0.67; 'account.': 0.80; 'cecil': 0.84; 'otten': 0.84; 'url:cecilwesterhof': 0.84; 'westerhof': 0.84; 'url:tutorial': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Peter Otten <__peter__@web.de> Subject: Re: SQLite3 and web server Date: Sat, 22 Aug 2015 14:23:28 +0200 Organization: None References: <87pp2hp3vg.fsf@Equus.decebal.nl> <87d1ygptdy.fsf@Equus.decebal.nl> <87y4h3mty7.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: p57bd95b2.dip0.t-ipconnect.de User-Agent: KNode/4.13.3 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1440246229 news.xs4all.nl 23767 [2001:888:2000:d::a6]:43631 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95557 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("/") 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.