Added django_mongo app
This commit is contained in:
3
backend/django/seatstock_django/django_mongo/admin.py
Normal file
3
backend/django/seatstock_django/django_mongo/admin.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
# Register your models here.
|
6
backend/django/seatstock_django/django_mongo/apps.py
Normal file
6
backend/django/seatstock_django/django_mongo/apps.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class DjangoMongoConfig(AppConfig):
|
||||||
|
default_auto_field = 'django.db.models.BigAutoField'
|
||||||
|
name = 'django_mongo'
|
3
backend/django/seatstock_django/django_mongo/models.py
Normal file
3
backend/django/seatstock_django/django_mongo/models.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
from django.db import models
|
||||||
|
|
||||||
|
# Create your models here.
|
3
backend/django/seatstock_django/django_mongo/tests.py
Normal file
3
backend/django/seatstock_django/django_mongo/tests.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
# Create your tests here.
|
5
backend/django/seatstock_django/django_mongo/urls.py
Normal file
5
backend/django/seatstock_django/django_mongo/urls.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
from django.urls import path
|
||||||
|
|
||||||
|
from . import views
|
||||||
|
|
||||||
|
urlpatterns = [path('',views.index,name='index'),]
|
6
backend/django/seatstock_django/django_mongo/views.py
Normal file
6
backend/django/seatstock_django/django_mongo/views.py
Normal 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>")
|
@ -33,6 +33,7 @@ ALLOWED_HOSTS = ['docker-django', 'localhost', 'seatstock.duckdns.org']
|
|||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
|
'djangoapp',
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
@ -79,12 +80,12 @@ WSGI_APPLICATION = 'seatstock_django.wsgi.application'
|
|||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
|
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
|
||||||
|
|
||||||
DATABASES = {
|
#DATABASES = {
|
||||||
'default': {
|
# 'default': {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
# 'ENGINE': 'django.db.backends.sqlite3',
|
||||||
'NAME': BASE_DIR / 'db.sqlite3',
|
# 'NAME': BASE_DIR / 'db.sqlite3',
|
||||||
}
|
# }
|
||||||
}
|
#}
|
||||||
|
|
||||||
|
|
||||||
ENV_FILE = find_dotenv()
|
ENV_FILE = find_dotenv()
|
||||||
|
@ -15,13 +15,14 @@ Including another URLconf
|
|||||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||||
"""
|
"""
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path
|
from django.urls import path, include
|
||||||
|
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
#path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
path("", views.index, name="index"),
|
path("",include('django_mongo.urls')),
|
||||||
|
# path("", views.index, name="index"),
|
||||||
path("login", views.login, name="login"),
|
path("login", views.login, name="login"),
|
||||||
path("logout", views.logout, name="logout"),
|
path("logout", views.logout, name="logout"),
|
||||||
path("callback", views.callback, name="callback"),
|
path("callback", views.callback, name="callback"),
|
||||||
|
@ -19,8 +19,10 @@ services:
|
|||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
volumes:
|
volumes:
|
||||||
- ../backend/django:/home/app/webapp
|
- ../backend/django:/home/app/webapp
|
||||||
- ../frontend/templates:/home/app/webapp/seatstock_django/seatstock_django/templates
|
# - ../frontend/templates:/home/app/webapp/seatstock_django/seatstock_django/templates
|
||||||
- ../frontend/static:/home/app/webapp/seatstock_django/seatstock_django/static
|
# - ../frontend/static:/home/app/webapp/seatstock_django/seatstock_django/static
|
||||||
|
- ../frontend/templates:/home/app/webapp/seatstock_django/django_mongo/templates
|
||||||
|
- ../frontend/static:/home/app/webapp/seatstock_django/django_mongo/static
|
||||||
environment:
|
environment:
|
||||||
- AUTH0_DOMAIN=${AUTH0_DOMAIN}
|
- AUTH0_DOMAIN=${AUTH0_DOMAIN}
|
||||||
- AUTH0_CLIENT_ID=${AUTH0_CLIENT_ID}
|
- AUTH0_CLIENT_ID=${AUTH0_CLIENT_ID}
|
||||||
|
Reference in New Issue
Block a user