Answer the question
In order to leave comments, you need to log in
Python Bottle: why aren't changes in code being applied?
Good day! I'm starting to learn Python and the Bottle
web framework . Since I am switching from PHP to Python, after PHP everything is somehow difficult to understand.
I am using mod_wsgi apache.
The virtual host config is:
<VirtualHost *:80>
ServerName bottle
DocumentRoot /var/www/bottle/
ErrorLog /var/www/bottle/error.log
Customlog /var/www/bottle/access.log combined
WSGIDaemonProcess hello user=www-data group=www-data processes=1 threads=5
WSGIScriptAlias / /var/www/bottle/adapter.wsgi
WSGIProcessGroup hello
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
<Directory /var/www/bottle/>
Options FollowSymLinks ExecCGI
AddHandler wsgi-script .wsgi
Order allow,deny
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
import sys, os, bottle
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
os.chdir(os.path.dirname(os.path.abspath(__file__)))
import hello
application = bottle.default_app()
from bottle import Bottle, route, run, template, request, get, post
app = Bottle()
Route('/test')
def test():
return "Test!"
Route('/hello/<name>')
def greet(name='user'):
return template('Hello <b>{{name}}</b>, how are you?', name=name)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question