Added django_mongo app

This commit is contained in:
Allen
2023-09-23 23:41:16 -05:00
parent fa1eb6de4c
commit 10d30c7d8c
11 changed files with 41 additions and 11 deletions

View File

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class DjangoMongoConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'django_mongo'

View File

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

View File

@ -0,0 +1,5 @@
from django.urls import path
from . import views
urlpatterns = [path('',views.index,name='index'),]

View File

@ -0,0 +1,6 @@
from django.shortcuts import render
# Create your views here.
def index(request):
return HttpResponse("<h1>Hello and welcome to my first <u>Django App</u> project!</h1>")

View File

@ -33,6 +33,7 @@ ALLOWED_HOSTS = ['docker-django', 'localhost', 'seatstock.duckdns.org']
# Application definition
INSTALLED_APPS = [
'djangoapp',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
@ -79,12 +80,12 @@ WSGI_APPLICATION = 'seatstock_django.wsgi.application'
# Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
#DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': BASE_DIR / 'db.sqlite3',
# }
#}
ENV_FILE = find_dotenv()

View File

@ -15,13 +15,14 @@ Including another URLconf
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
from . import views
urlpatterns = [
#path('admin/', admin.site.urls),
path("", views.index, name="index"),
path('admin/', admin.site.urls),
path("",include('django_mongo.urls')),
# path("", views.index, name="index"),
path("login", views.login, name="login"),
path("logout", views.logout, name="logout"),
path("callback", views.callback, name="callback"),