diff --git a/foto_gallery.nginx.conf b/foto_gallery.nginx.conf index 3787b23..619234f 100644 --- a/foto_gallery.nginx.conf +++ b/foto_gallery.nginx.conf @@ -9,7 +9,7 @@ server { location / { include uwsgi_params; - uwsgi_pass unix:///srv/simple_sample_flat_index/uwsgi.sock; + uwsgi_pass unix:///var/run/fet_fotos.sock } diff --git a/foto_gallery/__init__.py b/foto_gallery/__init__.py index c99f658..694b77b 100644 --- a/foto_gallery/__init__.py +++ b/foto_gallery/__init__.py @@ -67,7 +67,8 @@ def thumb(size=64,name=''): image=image.rotate(270, expand=True) elif exif[orientation] == 8: image=image.rotate(90, expand=True) - thumb=ImageOps.fit(image,s,Image.ANTIALIAS) + thumb=ImageOps.fit(image,s,Image.ANTIALIAS) + print("writing %s"% thumb_name) os.makedirs(thumb_path,exist_ok=True) @@ -80,7 +81,7 @@ def thumb(size=64,name=''): return send_from_directory(os.path.join("../thumbs","thumbs_%i" % size),name) -@page_blueprint.route('//',strict_slashes=True) +@page_blueprint.route('//',strict_slashes=False) @page_blueprint.route('/') def post(name=''): print("Post: %s" % name) diff --git a/foto_gallery/templates/layoutfetbs3.html b/foto_gallery/templates/layoutfetbs3.html index 114dc91..f1b05ac 100644 --- a/foto_gallery/templates/layoutfetbs3.html +++ b/foto_gallery/templates/layoutfetbs3.html @@ -1,11 +1,9 @@ {# -*-jinja2-*- #} - - - + @@ -14,7 +12,6 @@ - Fetsite diff --git a/requirements.txt b/requirements.txt index ed62c91..548e2eb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,6 @@ flask Frozen-Flask config -uwsgi gevent Pillow git+https://github.com/andreassteph/flatpages_index.git diff --git a/uwsgi.ini b/uwsgi.ini index 068aa27..5a59454 100644 --- a/uwsgi.ini +++ b/uwsgi.ini @@ -4,14 +4,14 @@ uid = 33 gid = 33 master = true # No. of processes can be increased -processes = 2 +processes = 9 chown-socket =www-data:www-data -virtualenv = /srv/fet_fotos/.env -pythonpath = /srv/fet_fotos/ +virtualenv = /srv/flask-fet-fotos/.env +pythonpath = /srv/flask-fet-fotos/ #pidfile = /srv/simple_sample_flat_index/uwsgi.pid #socket = /srv/simple_sample_flat_index/uwsgi.sock pidfile=/var/run/fet_fotos.pid -socket = /var/run/foto_gallery.sock +socket = /var/run/fet_fotos.sock chmod-socket = 666 module = foto_gallery callable= app