Пример #1
0
    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
    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
 def setUp(self):
     db.rebind(URI)
     create_db()
     self.session = db.Session()
     self.session.expire_on_commit = False
Пример #4
0
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
 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
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)