mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-24 02:24:03 +03:00
fix code on Readme
This commit is contained in:
parent
a7399964e0
commit
aa8704c6b5
22
README.md
22
README.md
|
@ -83,7 +83,7 @@ To help you get started quickly with Django REST framework, follow these steps t
|
||||||
First, make sure you have Python installed on your machine. You can install Django and Django REST framework using pip:
|
First, make sure you have Python installed on your machine. You can install Django and Django REST framework using pip:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install django djangorestframework
|
pip install django djangorestframework
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 2: Create a New Django Project
|
### Step 2: Create a New Django Project
|
||||||
|
@ -91,8 +91,8 @@ First, make sure you have Python installed on your machine. You can install Djan
|
||||||
Create a new Django project by running the following command
|
Create a new Django project by running the following command
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
django-admin startproject myproject
|
django-admin startproject myproject
|
||||||
cd myproject
|
cd myproject
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 3: Create a New Django App
|
### Step 3: Create a New Django App
|
||||||
|
@ -100,7 +100,7 @@ Create a new Django project by running the following command
|
||||||
Next, create a new app within your project:
|
Next, create a new app within your project:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python manage.py startapp myapp
|
python manage.py startapp myapp
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 4: Update Settings
|
### Step 4: Update Settings
|
||||||
|
@ -108,11 +108,11 @@ Next, create a new app within your project:
|
||||||
Add your new app and REST framework to the INSTALLED_APPS list in myproject/settings.py:
|
Add your new app and REST framework to the INSTALLED_APPS list in myproject/settings.py:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
...
|
...
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'myapp',
|
'myapp',
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
Once you have follow the steps above, you should be able to use the REST framework. View the example below for extra details.
|
Once you have follow the steps above, you should be able to use the REST framework. View the example below for extra details.
|
||||||
|
@ -218,8 +218,8 @@ Or to create a new user:
|
||||||
If you encounter issues related to database migrations, ensure that you have run:
|
If you encounter issues related to database migrations, ensure that you have run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python manage.py makemigrations
|
python manage.py makemigrations
|
||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Missing Packages
|
### 2. Missing Packages
|
||||||
|
|
Loading…
Reference in New Issue
Block a user