Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project (almost) finished #7

Merged
merged 24 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
delete fixed
  • Loading branch information
vivoit00 committed Jun 16, 2024
commit 9ecc91f3f4a892e01e9a850aef0ae2c46cb2e95a
6 changes: 0 additions & 6 deletions sample/otel-in-action/todobackend_django/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
# python manage.py runserver 8080 muss glaub rein oder so
FROM python:3.8-slim

# Arbeitsverzeichnis im Container festlegen
WORKDIR /app

# Abhängigkeiten installieren
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Install PostgreSQL client
RUN apt-get update && apt-get install -y postgresql-client && rm -rf /var/lib/apt/lists/*

# Kopieren des gesamten Django-Projektcodes ins Arbeitsverzeichnis
COPY . /app

# Port freigeben, auf dem der Server läuft
EXPOSE 8000

# Befehl zum Starten des Django-Servers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@

urlpatterns = [
path('todos/', views.todo_list),
path('todos/<int:pk>/', views.todo_detail),
path('todos/<str:pk>/', views.todo_detail, name='todo_detail_string'),
]

2 changes: 1 addition & 1 deletion sample/otel-in-action/todobackend_django/todos/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def todo_list(request):
@api_view(['DELETE'])
def todo_detail(request, pk):
try:
todo = Todo.objects.get(pk=pk)
todo = Todo.objects.get(todo=pk)
except Todo.DoesNotExist:
return Response(status=status.HTTP_404_NOT_FOUND)

Expand Down