diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-10-18 16:46:48 +1300 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-10-18 16:57:14 +1300 |
commit | 7dce7ad68165b5ecda99ebbf5b9e923a43b7d43d (patch) | |
tree | e0aaad94a9a8e6aa2ebebca9546706d27ebdb35b /README | |
parent | 9282cba99f1e9942737a03209d3f7e142cdf08fb (diff) | |
download | openembedded-core-contrib-7dce7ad68165b5ecda99ebbf5b9e923a43b7d43d.tar.gz |
README: update setup instructions
With Django 1.8 you don't need to use syncdb since migrate does all of
the database structure setup (and in fact in 1.9 it has been removed -
we don't support that version yet but it's good to avoid that issue in
future). The only other thing that syncdb did was to create a superuser,
and there is now a specific command to do that. Since you do need to
actually log in as part of some of the later steps, we now tell the user
explicitly to run that in the first step.
Additionally, add a section about what to do when upgrading - normally
this is straightforward, but if you're upgrading from prior to the
Django 1.8 move then you need to fake the initial migration or it'll
fail (since the structure is already present).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'README')
-rw-r--r-- | README | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -46,10 +46,8 @@ Setup instructions: 2. Run the following commands within the layerindex-web directory to initialise the database: - python3 manage.py syncdb python3 manage.py migrate - - You should answer "yes" when asked to create an admin account. + python3 manage.py createsuperuser 3. You can test the web application locally by setting DEBUG = True in settings.py and running the following: @@ -122,6 +120,7 @@ Setup instructions: keeping in mind you'll need to set up Docker properly as part of the setup process. + Usage ----- @@ -134,6 +133,25 @@ and update the database with the results. Run the script with --help for further information on available options. +Upgrading from an earlier version +--------------------------------- + +This application uses Django's migrations functionality to allow changes +in the database structure whilst preserving existing data. When upgrading +with an existing database, you just need to invoke the migration command. + +If you're migrating from a version prior to the Django 1.8 upgrade, you +need to use the following command so that the initial migration (which +takes care of creating the database structure and initial data) is +skipped: + +python3 manage.py migrate --fake-initial + +Otherwise, you can just run the plain migration command: + +python3 manage.py migrate + + Maintenance ----------- |