Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
babymastodon committed Feb 5, 2012
1 parent c6ccc25 commit 92522ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main/views.py
Expand Up @@ -160,7 +160,6 @@ def updatesite(request, pk):
else:
if name != site.name:
rmwsgi(request, site.name)
mkwsgi(request, name, site.dirname)
site.name = name
site.save()
if form.cleaned_data['zip_file']:
Expand All @@ -172,6 +171,7 @@ def updatesite(request, pk):
move(d,site.dirname)
site.save()
if 'error' not in rc:
mkwsgi(request,site.name, site.dirname)
return redirect(reverse('main.views.admin'))
rc['form'] = form
return render(request, 'main/updatesite.html', rc)
Expand Down
9 changes: 8 additions & 1 deletion templates/wsgi/template.py
Expand Up @@ -11,7 +11,14 @@

#what are we going to do to secure the server?

from app import app as application

def application(environ, start_response):
try:
from app import app as student_app
except:
raise ImportError("Could not find the application entry point. Please make sure that your app.py file has the line: 'app = Flask(__name__)'")
return student_app(environ, start_response)


from paste.exceptions.errormiddleware import ErrorMiddleware
application = ErrorMiddleware(application, debug=True)

0 comments on commit 92522ed

Please sign in to comment.