https://docs.djangoproject.com/en/5.0/intro/tutorial01/
### Create Your Django Project
Here we create a new project called **mysite**.
```
django-admin startproject mysite
```
Next we want to cd into mysite and rune the app.
### Running the Development Server
```
python manage.py runserver
```
### Creating an Application
Here we create a new application within **mysite** called **polls**.
```
python manage.py startapp polls
```
### Writing a View
In the view.py file in the **polls** application directory, you can customize what is returned by our application.
``` python
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello, world. You're at the polls index.")
```
Here we just return a Hello World http response.
### Connecting with URLs
To connect our new application to our project we have to create a `urls.py` file under our **polls** directory.
Once it is created, connect it to the main project:
``` python
from django.urls import path
from . import views
urlpatterns = [
path("", views.index, name="index"),
]
```
Now the connection to the main project is made, we now do the same in our main `urls.py` file under our root directory of **mysite**.
``` python
from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path("polls/", include("polls.urls")),
path("admin/", admin.site.urls),
]
```
### Database Setup