From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QcETn-0006l1-WD for garchives@archives.gentoo.org; Thu, 30 Jun 2011 10:28:16 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2CBBB1C08B; Thu, 30 Jun 2011 10:28:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id F410F1C08B for ; Thu, 30 Jun 2011 10:28:08 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6A3D12AC05E for ; Thu, 30 Jun 2011 10:28:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id BB2608003F for ; Thu, 30 Jun 2011 10:28:07 +0000 (UTC) From: "Vikraman Choudhury" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Vikraman Choudhury" Message-ID: Subject: [gentoo-commits] proj/gentoostats:master commit in: server/ X-VCS-Repository: proj/gentoostats X-VCS-Files: server/__init__.py server/app.py server/config.py server/main.py X-VCS-Directories: server/ X-VCS-Committer: vikraman X-VCS-Committer-Name: Vikraman Choudhury X-VCS-Revision: a0a5dbd8914b48d470d6feb8968e8ec5446c39a2 Date: Thu, 30 Jun 2011 10:28:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: ac0d72e57d49dd43dca8a4be0a5b7359 commit: a0a5dbd8914b48d470d6feb8968e8ec5446c39a2 Author: Vikraman Choudhury gmail com> AuthorDate: Thu Jun 30 10:27:13 2011 +0000 Commit: Vikraman Choudhury gmail com> CommitDate: Thu Jun 30 10:27:13 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoostats.g= it;a=3Dcommit;h=3Da0a5dbd8 call app.py from separate wsgi handler --- server/{main.py =3D> app.py} | 1 - server/config.py | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/__init__.py b/server/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/server/main.py b/server/app.py similarity index 99% rename from server/main.py rename to server/app.py index 9eb74fa..89ade62 100755 --- a/server/main.py +++ b/server/app.py @@ -18,4 +18,3 @@ app.internalerror =3D config.internalerror =20 if __name__ =3D=3D "__main__": app.run() - diff --git a/server/config.py b/server/config.py index f4e74cd..ae73fc4 100644 --- a/server/config.py +++ b/server/config.py @@ -1,4 +1,6 @@ =20 +import os +import sys import web =20 db =3D web.database( @@ -8,7 +10,8 @@ db =3D web.database( db=3D'gentoostats' ) =20 -render =3D web.template.render('templates/', base=3D'layout') +rootdir =3D os.path.abspath(os.path.dirname(__file__)) + '/' +render =3D web.template.render(rootdir + 'templates/', base=3D'layout') =20 def notfound(): return web.notfound(render.error_404())