Skip to content

Commit 4780ae6

Browse files
committed
fixes to password update logic and removed prediction app
1 parent 4b80916 commit 4780ae6

File tree

20 files changed

+126
-271
lines changed

20 files changed

+126
-271
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Install Docker Desktop
77

88
There are 3 .env files provided. Note in particular the .env files in backend/ and postgres/; there, you can adjust the database credentials, debug mode, secret key, allowed hosts, etc. But things should run just fine without any changes, but just know these files are there.
99

10-
The included sample prediction django app can be easily removed by removing 'prediction' from INSTALLED_APPS in django mainapp/settings.py, removing the associated path in mainapp/urls.py and deleting the entire prediction folder. Additionally, you should remove pandas, scikit-learn, and joblib from backend/requirements.txt. On the frontend, delete/replace the contents of Home.tsx.
10+
The included sample helloyou django app can be easily removed by removing 'helloyou' from INSTALLED_APPS in django mainapp/settings.py, removing the associated helloyou path in mainapp/urls.py and deleting the entire helloyou folder. On the frontend, delete/replace the contents of Home.tsx.
1111

1212
Change the boilerplate app name (shown in header and footer) by changing the constant APP_NAME in frontend/src/settings.tsx.
1313

File renamed without changes.
File renamed without changes.

backend/helloyou/apps.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class HelloyouConfig(AppConfig):
5+
name = 'helloyou'

backend/helloyou/migrations/__init__.py

Whitespace-only changes.
File renamed without changes.
File renamed without changes.

backend/helloyou/urls.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from django.urls import path
2+
import helloyou.views as views
3+
4+
urlpatterns = [
5+
path('helloyou/', views.HelloYouView.as_view(), name = 'helloyou'),
6+
]

backend/helloyou/views.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from rest_framework import status
2+
from rest_framework.decorators import api_view
3+
from rest_framework.response import Response
4+
from rest_framework.views import APIView
5+
6+
from rest_framework.authentication import TokenAuthentication
7+
from rest_framework.permissions import IsAuthenticated
8+
9+
class HelloYouView(APIView):
10+
authentication_classes = [TokenAuthentication]
11+
permission_classes = [IsAuthenticated]
12+
13+
def post(self, request, format=None):
14+
response_dict = {"response": "Hello " + request.data["name"] + '!'}
15+
return Response(response_dict, status=200)

backend/mainapp/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
'rest_auth',
4444
'corsheaders',
4545

46-
'prediction',
46+
'helloyou',
4747
'users',
4848
]
4949

0 commit comments

Comments
 (0)