Discussion:
combining sphinx and bottle
Jonas Fredriksson
2014-04-14 21:36:58 UTC
Permalink
Hi

how do I render html static html pages generated by sphinx with bottle
(like the homepage of bottle)? should I rename them with .tpl extension and
return them with template, or use static_file? I've tired both and it
didn't work with the underlying css.

for example:

@route('/')
def index():

return static_file('index.html',root='.build/html');

is there any good example that you can point to?

thanks in advance.
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jonas Fredriksson
2014-04-15 08:47:45 UTC
Permalink
Post by Jonas Fredriksson
Hi
how do I render html static html pages generated by sphinx with bottle
(like the homepage of bottle)? should I rename them with .tpl extension and
return them with template, or use static_file? I've tired both and it
didn't work with the underlying css.
@route('/')
return static_file('index.html',root='.build/html');
is there any good example that you can point to?
thanks in advance.
ok, I think I partly solved the problem by creating a route for static
files:

from bottle import
route,run,error,request,template,response,redirect,static_file

@route('/')
def index():

return static_file('index.html',root='build/html');

@route('/_static/<file>')
def static(file):

return static_file(file,root='build/html/_static');

run(reloader=True, host='localhost', port=8080)
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...