Skip to content

Commit dcc5530

Browse files
committed
Add project setup and creation steps to documentation
The explanation on how to set up the project and create a Django app is now included in our documentation. This addition provides a set of clear, step-by-step instructions with code snippets and a project structure overview that will assist users during their initial interactions with the system.
1 parent d01e13d commit dcc5530

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

docs/index.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,59 @@ The sequence diagram illustrates the flow of an HTTP request through the Django
5858

5959
This sequence outlines the typical flow of a request-response cycle in Django, demonstrating how requests are handled and responses are generated within the framework.
6060

61+
## Set up the project
62+
63+
Now we have a basic understanding of Django and DRF. We are going to set up the project.
64+
65+
Clone the repository:
66+
67+
```shell
68+
git clone [email protected]:lipemorais/building-your-first-api-with-django-and-django-rest-framework.git
69+
```
70+
71+
This will clone the repository
72+
73+
## Creating the music Django App
74+
75+
Now we are going to create the Django we are going to use in this tutorial.
76+
77+
```shell
78+
cd first_api
79+
./manage.py startapp music
80+
```
81+
82+
This will create the app structure for us. Something similar to this below:
83+
```shell
84+
❯ tree .
85+
.
86+
├── db.sqlite3
87+
├── first_api
88+
│   ├── __init__.py
89+
│   ├── __pycache__
90+
│   │   ├── __init__.cpython-312.pyc
91+
│   │   ├── settings.cpython-312.pyc
92+
│   │   ├── urls.cpython-312.pyc
93+
│   │   └── wsgi.cpython-312.pyc
94+
│   ├── asgi.py
95+
│   ├── settings.py
96+
│   ├── urls.py
97+
│   └── wsgi.py
98+
├── manage.py
99+
└── music
100+
├── __init__.py
101+
├── admin.py
102+
├── apps.py
103+
├── migrations
104+
│   └── __init__.py
105+
├── models.py
106+
├── tests.py
107+
└── views.py
108+
```
61109

62110
## Django Models
63111

112+
Now the next step is create the models we are going to use in our API to represent the domain models.
113+
64114
- 🎬 Lecture : Fundamentals of Django models.
65115
- 💻 Exercise : Hands-on creation and manipulation of models.
66116
- 💡 Purpose: Understanding data handling in Django.

0 commit comments

Comments
 (0)