Skip to content

Commit

Permalink
Add project setup and creation steps to documentation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lipemorais committed Apr 14, 2024
1 parent d01e13d commit dcc5530
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,59 @@ The sequence diagram illustrates the flow of an HTTP request through the Django

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.

## Set up the project

Now we have a basic understanding of Django and DRF. We are going to set up the project.

Clone the repository:

```shell
git clone [email protected]:lipemorais/building-your-first-api-with-django-and-django-rest-framework.git
```

This will clone the repository

## Creating the music Django App

Now we are going to create the Django we are going to use in this tutorial.

```shell
cd first_api
./manage.py startapp music
```

This will create the app structure for us. Something similar to this below:
```shell
❯ tree .
.
├── db.sqlite3
├── first_api
│   ├── __init__.py
│   ├── __pycache__
│   │   ├── __init__.cpython-312.pyc
│   │   ├── settings.cpython-312.pyc
│   │   ├── urls.cpython-312.pyc
│   │   └── wsgi.cpython-312.pyc
│   ├── asgi.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── manage.py
└── music
├── __init__.py
├── admin.py
├── apps.py
├── migrations
│   └── __init__.py
├── models.py
├── tests.py
└── views.py
```

## Django Models

Now the next step is create the models we are going to use in our API to represent the domain models.

- 🎬 Lecture : Fundamentals of Django models.
- 💻 Exercise : Hands-on creation and manipulation of models.
- 💡 Purpose: Understanding data handling in Django.
Expand Down

0 comments on commit dcc5530

Please sign in to comment.