Skip to content

Commit

Permalink
django modific no views 2023-2
Browse files Browse the repository at this point in the history
  • Loading branch information
TiagoDemay committed Sep 5, 2023
1 parent 0633867 commit ff7cbea
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions docs/roteiros/2.Deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,14 @@ Vocês conseguem instalar o NGINX no nó server4 como loadbalancer? ... **Então
??? DICAS
No arquivo de tasks/views.py de cada Django modifique a mensagem "Hello World ..." para conseguir identificar cada server (coloque uma mensagem diferente em cada)

from django.shortcuts import render

from django.http import HttpResponse


def index(request):

Código:
from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello, world. You're at the tasks index.")


No arquivo de urls.py customize o seu path no urlpatterns

No arquivo de urls.py customize o seu path no urlpatterns:
urlpatterns = [path('', views.index, name='index'),]


Expand Down

0 comments on commit ff7cbea

Please sign in to comment.