mirror of
https://github.com/UofCBaja/BajaCloud.git
synced 2025-07-06 19:17:13 -06:00
feat(django): testing using backend django vs built in python
This commit is contained in:
0
djangotutorial/polls/__init__.py
Normal file
0
djangotutorial/polls/__init__.py
Normal file
BIN
djangotutorial/polls/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
djangotutorial/polls/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
djangotutorial/polls/__pycache__/newtest.cpython-312.pyc
Normal file
BIN
djangotutorial/polls/__pycache__/newtest.cpython-312.pyc
Normal file
Binary file not shown.
BIN
djangotutorial/polls/__pycache__/urls.cpython-312.pyc
Normal file
BIN
djangotutorial/polls/__pycache__/urls.cpython-312.pyc
Normal file
Binary file not shown.
BIN
djangotutorial/polls/__pycache__/views.cpython-312.pyc
Normal file
BIN
djangotutorial/polls/__pycache__/views.cpython-312.pyc
Normal file
Binary file not shown.
3
djangotutorial/polls/admin.py
Normal file
3
djangotutorial/polls/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
6
djangotutorial/polls/apps.py
Normal file
6
djangotutorial/polls/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class PollsConfig(AppConfig):
|
||||
default_auto_field = "django.db.models.BigAutoField"
|
||||
name = "polls"
|
0
djangotutorial/polls/migrations/__init__.py
Normal file
0
djangotutorial/polls/migrations/__init__.py
Normal file
3
djangotutorial/polls/models.py
Normal file
3
djangotutorial/polls/models.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
11
djangotutorial/polls/newtest.py
Normal file
11
djangotutorial/polls/newtest.py
Normal file
@ -0,0 +1,11 @@
|
||||
import json
|
||||
from django.http import HttpResponse
|
||||
|
||||
def index(request):
|
||||
ymlschedule = {"message": False}
|
||||
res = {
|
||||
"statusCode": 200,
|
||||
"isBase64ENcoded": "false",
|
||||
"body": json.dumps(ymlschedule)
|
||||
}
|
||||
return HttpResponse(json.dumps(res))
|
3
djangotutorial/polls/tests.py
Normal file
3
djangotutorial/polls/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
9
djangotutorial/polls/urls.py
Normal file
9
djangotutorial/polls/urls.py
Normal file
@ -0,0 +1,9 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
from . import newtest
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="index"),
|
||||
path("test", newtest.index, name="index")
|
||||
]
|
8
djangotutorial/polls/views.py
Normal file
8
djangotutorial/polls/views.py
Normal file
@ -0,0 +1,8 @@
|
||||
# from django.shortcuts import render
|
||||
|
||||
# # Create your views here.
|
||||
from django.http import HttpResponse
|
||||
|
||||
|
||||
def index(request):
|
||||
return HttpResponse("Hello, world. You're at the polls index.")
|
Reference in New Issue
Block a user