Skip to content

Commit

Permalink
feat: clean quiz files
Browse files Browse the repository at this point in the history
  • Loading branch information
Gowtham1729 committed Nov 6, 2023
1 parent af769a0 commit 7d89abd
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 50 deletions.
5 changes: 0 additions & 5 deletions applications/backend/django_server/news/forms.py

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions applications/backend/django_server/news/templates/input.html

This file was deleted.

3 changes: 1 addition & 2 deletions applications/backend/django_server/news/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
from . import views

urlpatterns = [
path("", views.input_view, name="input"),
path("display/", views.display_view, name="display"),
path("", views.index, name="index"),
]
21 changes: 1 addition & 20 deletions applications/backend/django_server/news/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
from django.http import HttpResponse, JsonResponse
from django.shortcuts import redirect, render

from .forms import InputForm
from django.http import JsonResponse


# Create your views here.
Expand All @@ -12,19 +9,3 @@ def index(request):
"status": "ok",
}
)


def input_view(request):
if request.method == "POST":
form = InputForm(request.POST)
if form.is_valid():
request.session["user_input"] = form.cleaned_data["user_input"]
return redirect("display")
else:
form = InputForm()
return render(request, "input.html", {"form": form})


def display_view(request):
user_input = request.session.get("user_input", "No input provided")
return render(request, "display.html", {"user_input": user_input})
2 changes: 1 addition & 1 deletion applications/frontend/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h3>This nuxt js website is hosted on Google Cloud Platform</h3>

<div>
<input v-model="userInput" placeholder="Type something..."/>
<input v-model="userInput" placeholder="Enter something..."/>

<button @click="addInputToList">OK</button>
</div>
Expand Down

0 comments on commit 7d89abd

Please sign in to comment.