예제 #1
0
파일: test.py 프로젝트: pombredanne/mypi
    def setUp(self):
        db.rebind(URI)
        create_db()
        self.session = db.Session()
        self.session.expire_on_commit = False

        # Add one example release
        data = {}
        data['author_email'] = "*****@*****.**"
        data['name'] = "proj1"
        data['version'] = "1.0"
        data["license"] = "BSD"
        data["metadata_version"] = "1"
        data["home_page"] = "UNKNOWN"
        data["download_url"] = "UNKNOWN"
        data["summary"] = "bla"
        data["platform"] = "linux"
        data["description"] = "Hello World!"
        #rel = db.Release.add(self.session, data)
        self.session.commit()
예제 #2
0
파일: test.py 프로젝트: aaronfay/mypi
    def setUp(self):
        db.rebind(URI)
        create_db()
        self.session = db.Session()
        self.session.expire_on_commit = False

        # Add one example release
        data = {}
        data['author_email'] = "*****@*****.**"
        data['name'] = "proj1"
        data['version'] = "1.0"
        data["license"] = "BSD"
        data["metadata_version"] = "1"
        data["home_page"] = "UNKNOWN"
        data["download_url"] = "UNKNOWN"
        data["summary"] = "bla"
        data["platform"] = "linux"
        data["description"] = "Hello World!"
        #rel = db.Release.add(self.session, data)
        self.session.commit()
예제 #3
0
파일: test.py 프로젝트: aaronfay/mypi
 def setUp(self):
     db.rebind(URI)
     create_db()
     self.session = db.Session()
     self.session.expire_on_commit = False
예제 #4
0
파일: wsgi.py 프로젝트: exhuma/mypi
import sys
import logging
import os
from os import getcwd

logging.basicConfig(stream=sys.stderr, level=logging.WARNING)

LOG = logging.getLogger(__name__)
LOG.debug('Current path: {0}'.format(getcwd()))

from mypi.db import rebind
from mypi.server import app as application

application.debug = False

rebind(os.environ['DATABASE_URL'], False)
예제 #5
0
파일: test.py 프로젝트: pombredanne/mypi
 def setUp(self):
     db.rebind(URI)
     create_db()
     self.session = db.Session()
     self.session.expire_on_commit = False
예제 #6
0
import logging

logging.basicConfig()
#logging.getLogger('sqlalchemy.engine').setLevel(logging.CRITICAL)

from mypi.db import rebind
from mypi.server import app

rebind('sqlite:///app.db', echo=True)

app.debug = True
app.run(host="0.0.0.0", port=8080)
예제 #7
0
파일: runserver.py 프로젝트: jlsandell/mypi
from mypi.db import rebind
from mypi.server import app
from os.path import abspath

rebind('sqlite:///app.db', True)

app.debug = True
app.config['UPLOAD_FOLDER'] = abspath('files')
app.run(host="0.0.0.0", port=8080)