Skip to content

Commit

Permalink
routing works!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
group117 committed Jul 6, 2024
1 parent abf1948 commit 0560a93
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 1 deletion.
Binary file added backend/api/__pycache__/api_urls.cpython-310.pyc
Binary file not shown.
Binary file added backend/api/__pycache__/views.cpython-310.pyc
Binary file not shown.
9 changes: 9 additions & 0 deletions backend/api/api_urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# api_urls.py

from django.urls import path
from . import views

urlpatterns = [
path('', views.api_home, name='api_home'),
path('test/', views.test_page, name='test_page'),
]
Binary file not shown.
8 changes: 8 additions & 0 deletions backend/api/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# views.py

from django.shortcuts import render
from django.http import HttpResponse

# Create your views here.
def test_page(request):
return HttpResponse('This is a test page to verify if the django setup works')

def api_home(request):
return HttpResponse('API Landing page')
Binary file modified backend/med_reminder/__pycache__/urls.cpython-310.pyc
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion backend/med_reminder/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path, include

urlpatterns = [
path('admin/', admin.site.urls),
path('api/', include('api.api_urls'))
]

0 comments on commit 0560a93

Please sign in to comment.