mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-29 01:20:02 +03:00
Tutorial - Adjust quickstart
It seems that there is no CLI command to easily create a user Remove the second user from the Markdown Image next
This commit is contained in:
parent
1f0b88244e
commit
d77c731d89
|
@ -56,10 +56,6 @@ Now sync your database for the first time:
|
||||||
We'll also create an initial user named `admin` with a password of `password123`. We'll authenticate as that user later in our example.
|
We'll also create an initial user named `admin` with a password of `password123`. We'll authenticate as that user later in our example.
|
||||||
|
|
||||||
python manage.py createsuperuser --email admin@example.com --username admin
|
python manage.py createsuperuser --email admin@example.com --username admin
|
||||||
|
|
||||||
We'll also create a second user named `tom`.
|
|
||||||
|
|
||||||
python manage.py createuser --email tom@example.com --username tom
|
|
||||||
|
|
||||||
Once you've set up a database and the initial user is created and ready to go, open up the app's directory and we'll get coding...
|
Once you've set up a database and the initial user is created and ready to go, open up the app's directory and we'll get coding...
|
||||||
|
|
||||||
|
@ -181,12 +177,6 @@ We can now access our API, both from the command-line, using tools like `curl`..
|
||||||
"url": "http://127.0.0.1:8000/users/1/",
|
"url": "http://127.0.0.1:8000/users/1/",
|
||||||
"username": "admin"
|
"username": "admin"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"email": "tom@example.com",
|
|
||||||
"groups": [],
|
|
||||||
"url": "http://127.0.0.1:8000/users/2/",
|
|
||||||
"username": "tom"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,12 +197,6 @@ Or using the [httpie][httpie], command line tool...
|
||||||
"url": "http://localhost:8000/users/1/",
|
"url": "http://localhost:8000/users/1/",
|
||||||
"username": "paul"
|
"username": "paul"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"email": "tom@example.com",
|
|
||||||
"groups": [],
|
|
||||||
"url": "http://127.0.0.1:8000/users/2/",
|
|
||||||
"username": "tom"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user