jstacoder / flask-cms

a minimal CMS built on the pythonic MTV (model / template / view) pattern, implemented using the flask webframework
136 stars 37 forks source link

MySQL setup #5

Closed jeremyvoltz closed 5 years ago

jeremyvoltz commented 9 years ago

Really cool project, but I'm having trouble getting it off the ground where the database is concerned. I'm just wondering if you could document what's required to setup the db. Thanks, and great work!

jstacoder commented 9 years ago

good point, for now, to get it setup make a file called local_settings.py for the db stuff :local_settings.py


class LocalConfig:
    SQLALCHEMY_DATABASE_URI = 'mysql://USERNAME:PASSWORD@HOST:PORT/DBNAME'
    SECRET_KEY = 'XXXXX'

then as long as your using mysql and youve created database DBNAME, the migrations should work for you. so just run

$ python manage.py db upgrade

from the project root. and let me know how it goes.

jstacoder commented 9 years ago
jstacoder commented 9 years ago

ok i tried with no success to downgrade and then upgrade with the migration files included, so in a726164 i combined it all to a single operation that now works, so just get the latest commit and do what i explained eariler and it should setup your database for you

axlle2005 commented 5 years ago

Novice, can't use ah, how to run

jstacoder commented 5 years ago

@axlle2005 just made much eaiser via docker-compose see readme