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
|
||||
|
||||
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()
|
||||
|
@ -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"),
|
||||
|
Reference in New Issue
Block a user