Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7eedf07e96
Fetching contributors…

Cannot retrieve contributors at this time

53 lines (43 sloc) 1.616 kb
import logging
FORMAT = '[%(levelname)-7s] [%(name)-35s] - %(message)s'
logging.basicConfig(level=logging.INFO, format=FORMAT)
logger = logging.getLogger('videostore.main')
try:
import matplotlib
except:
logger.error('Charts will not work because of missing matplotlib')
from camelot.core.conf import settings, SimpleSettings
class ExampleSettings( SimpleSettings ):
"""Special settings class for the example application, this is done to
'survive' various packaging regimes, such as windows, debian, ...
"""
@staticmethod
def setup_model():
from camelot.core.sql import metadata
metadata.bind = settings.ENGINE()
import camelot.model.party
import camelot.model.authentication
import camelot.model.i18n
import camelot.model.fixture
import camelot.model.memento
import camelot_example.model
metadata.create_all()
from camelot.model.authentication import update_last_login
update_last_login()
#
# Load sample data with the fixure mechanism
#
from camelot_example.fixtures import load_movie_fixtures
load_movie_fixtures()
#
# setup the views
#
from camelot_example.view import setup_views
setup_views()
settings.append( ExampleSettings('camelot', 'videostore') )
def main():
from camelot.view.main import main
from camelot_example.application_admin import MyApplicationAdmin
main( MyApplicationAdmin() )
if __name__ == '__main__':
main()
Jump to Line
Something went wrong with that request. Please try again.