From 402f9fe8e529a2e7a76861d57ba708e8addb546e Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Thu, 16 May 2019 14:09:03 -0400 Subject: [PATCH] Move database setup instructions to usage section --- README.md | 47 ++++++++++++++--------------------------------- 1 file changed, 14 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index ec3dba48..443f3df6 100644 --- a/README.md +++ b/README.md @@ -108,39 +108,6 @@ npm run build # npm start # for developers ``` -Next we need to make migration. Run the following command: - -```bash -python manage.py migrate -``` - -Next we need to create a user who can login to the admin site. Run the following command: - - -```bash -python manage.py createsuperuser -``` - -Enter your desired username and press enter. - -```bash -Username: admin -``` - -You will then be prompted for your desired email address: - -```bash -Email address: admin@example.com -``` - -The final step is to enter your password. You will be asked to enter your password twice, the second time as a confirmation of the first. - -```bash -Password: ********** -Password (again): ********* -Superuser created successfully. -``` - ## Usage ### Start the development server @@ -165,6 +132,20 @@ docker exec doccano tools/create-admin.sh "admin" "admin@example.com" "password" **Option2: Running Django development server** +Before running, we need to make migration. Run the following command: + +```bash +python manage.py migrate +``` + +Next we need to create a user who can login to the admin site. Run the following command: + +```bash +python manage.py create_admin --noinput --username "admin" --email "admin@example.com" --password "password" +``` + +Finally, to start the server, run the following command: + ```bash python manage.py runserver ```