From 9b4ad492fe0569d1c4f38484165348a4340c76fb Mon Sep 17 00:00:00 2001 From: Viswamedha Nalabotu Date: Tue, 18 Nov 2025 18:30:21 +0000 Subject: [PATCH] Remapped structure for apps and frontend --- config/__init__.py | 0 config/__pycache__/__init__.cpython-313.pyc | Bin 0 -> 148 bytes config/__pycache__/settings.cpython-313.pyc | Bin 0 -> 2480 bytes config/asgi.py | 16 + config/settings.py | 122 +++ config/urls.py | 22 + config/wsgi.py | 16 + src/app/App.vue | 93 +++ src/app/NxWelcome.vue | 806 ++++++++++++++++++++ src/main.ts | 8 + src/router/index.ts | 23 + src/styles.css | 41 + src/views/AboutView.vue | 16 + src/views/HomeView.vue | 9 + src/vue-shims.d.ts | 5 + 15 files changed, 1177 insertions(+) create mode 100644 config/__init__.py create mode 100644 config/__pycache__/__init__.cpython-313.pyc create mode 100644 config/__pycache__/settings.cpython-313.pyc create mode 100644 config/asgi.py create mode 100644 config/settings.py create mode 100644 config/urls.py create mode 100644 config/wsgi.py create mode 100644 src/app/App.vue create mode 100644 src/app/NxWelcome.vue create mode 100644 src/main.ts create mode 100644 src/router/index.ts create mode 100644 src/styles.css create mode 100644 src/views/AboutView.vue create mode 100644 src/views/HomeView.vue create mode 100644 src/vue-shims.d.ts diff --git a/config/__init__.py b/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/config/__pycache__/__init__.cpython-313.pyc b/config/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ed6cd84e3331bd38b9fed746e25bd9c6e2464816 GIT binary patch literal 148 zcmey&%ge<81i{;6GC}lX5CH>>P{wB#AY&>+I)f&o-%5reCLr%KNa~icvsFxJacWU< zOkQG6Vp2?KUS=7PmswI7Q&y2@WN03foS&DLnI01#pP83g5+AQuP_n4ysOIZZ^Uz25vLW1LjuSaY>79MN%2v z5Q#Ciyv6i&0Aa?M8|)qSK6q~dq@oebNGhN!q9JK217BlTf_RdQzlHEPv}+hW{b454 z)>=9{iZRKcr70P#W&ki_Xg#T=XD0b(M)1ZiW;%UYW@Je>7_D=XAS@APPn7#u z|39$^?o0*x%RbT+ZFwr9v1@LQS&&p6xB3L9d!3~R;_{QdH*4C1HFZgOyWbRrwvxWR z_u%GA|88e}d8ujW-PcN^o?C-v=rF>>`1j7R529cVqL#laUR@#S%S7(H_3sw!| zpoevHVMeKAT?d-aDilzNUGTUv>tVpbwCv;1Q+_i&)+$oFE#rNWVAk2EWE`-_-Y`sx zpLOQlS+H?vxnOsC5Z#oYS*1((8 zatd+Eads0Es-~TbBl@PizB^|VvebJ0N^HG`W?+BZBBFxJJ-h1lDZlWj%h*1Vbu%*t zF|g8;q0!hTcw@CaX#_Us^jvMM)~$qd`fm*ZTBHRzX+%%C&6Qc0vsNs@Z=ekf^Y+-* zHgPJ?rs*7en?7@W#`rTe=QvDsDUapfOI7xJpHEX8v-emM@o(xc~rg z*RcC~S7OCp514a~#qzgtN9@bS=Q?dSPf5|=$dZBA%@7F3^OVc-@uls2iMKo@uE-O( zAu03eOx{i{^h90X*GOA{8$oJ2;n=#431`?u^bL$8MUq9k#9xdoG-5vfQlz4!N=jcT zV6|)Pp89|PrT(MRuZ(j%1$gqM0HwZyiPSoa;KgdXuUqbVEo=JW-i8*)nAgX!z@(zJ zv8=P3QWsi8+mf){E~OSMzaYSsEC`mr2N$0#HHjOjwE}`*Ulz8UU|o~7DKS>LvzT%l0j;d8>%GO8gfmM@_ih(G|f;GNaDR4C&S@9jToww}^`7CD_k`>HxHO>x;tVOO~dn!~o zgm%i+obZAxr;p-^qvYaog!xE$mSRJ)2eOf^+ZUFNbay_ywFrWqR>^dQlxME=I4p-cgIgo7DW`AbK2`9|VuX bbA!M!B<&kUsMrD|8lo<398w9g3|#yRm7*@+ literal 0 HcmV?d00001 diff --git a/config/asgi.py b/config/asgi.py new file mode 100644 index 0000000..ed7c431 --- /dev/null +++ b/config/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for config project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/5.2/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') + +application = get_asgi_application() diff --git a/config/settings.py b/config/settings.py new file mode 100644 index 0000000..babf03a --- /dev/null +++ b/config/settings.py @@ -0,0 +1,122 @@ +""" +Django settings for config project. + +Generated by 'django-admin startproject' using Django 5.2.8. + +For more information on this file, see +https://docs.djangoproject.com/en/5.2/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/5.2/ref/settings/ +""" + +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-pf#9a$@vq1o91n#mxwba_dm-+v9&*u4f3$#bts%zanu-$0*whk' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'config.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'config.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/5.2/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/5.2/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/5.2/howto/static-files/ + +STATIC_URL = 'static/' + +# Default primary key field type +# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/config/urls.py b/config/urls.py new file mode 100644 index 0000000..35a0802 --- /dev/null +++ b/config/urls.py @@ -0,0 +1,22 @@ +""" +URL configuration for config project. + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/5.2/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path + +urlpatterns = [ + path('admin/', admin.site.urls), +] diff --git a/config/wsgi.py b/config/wsgi.py new file mode 100644 index 0000000..e2fbd58 --- /dev/null +++ b/config/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for config project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/5.2/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') + +application = get_wsgi_application() diff --git a/src/app/App.vue b/src/app/App.vue new file mode 100644 index 0000000..6c00741 --- /dev/null +++ b/src/app/App.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..70e0fa8 --- /dev/null +++ b/src/main.ts @@ -0,0 +1,8 @@ +import './styles.css'; +import router from './router'; +import { createApp } from 'vue'; +import App from './app/App.vue'; + +const app = createApp(App); +app.use(router); +app.mount('#root'); diff --git a/src/router/index.ts b/src/router/index.ts new file mode 100644 index 0000000..f4b2afd --- /dev/null +++ b/src/router/index.ts @@ -0,0 +1,23 @@ +import { createRouter, createWebHistory } from 'vue-router'; +import HomeView from '../views/HomeView.vue'; + +const router = createRouter({ + history: createWebHistory(import.meta.env.BASE_URL), + routes: [ + { + path: '/', + name: 'home', + component: HomeView, + }, + { + path: '/about', + name: 'about', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/AboutView.vue'), + }, + ], +}); + +export default router; diff --git a/src/styles.css b/src/styles.css new file mode 100644 index 0000000..22b4e6a --- /dev/null +++ b/src/styles.css @@ -0,0 +1,41 @@ +html { + -webkit-text-size-adjust: 100%; + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, + 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, + 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; + line-height: 1.5; + tab-size: 4; + scroll-behavior: smooth; +} +body { + font-family: inherit; + line-height: inherit; + margin: 0; +} +h1, +h2, +p, +pre { + margin: 0; +} +*, +::before, +::after { + box-sizing: border-box; + border-width: 0; + border-style: solid; + border-color: currentColor; +} +h1, +h2 { + font-size: inherit; + font-weight: inherit; +} +a { + color: inherit; + text-decoration: inherit; +} +pre { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, + 'Liberation Mono', 'Courier New', monospace; +} diff --git a/src/views/AboutView.vue b/src/views/AboutView.vue new file mode 100644 index 0000000..0fb2cc0 --- /dev/null +++ b/src/views/AboutView.vue @@ -0,0 +1,16 @@ + + + diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue new file mode 100644 index 0000000..b54b496 --- /dev/null +++ b/src/views/HomeView.vue @@ -0,0 +1,9 @@ + + + diff --git a/src/vue-shims.d.ts b/src/vue-shims.d.ts new file mode 100644 index 0000000..798e8fc --- /dev/null +++ b/src/vue-shims.d.ts @@ -0,0 +1,5 @@ +declare module '*.vue' { + import { defineComponent } from 'vue'; + const component: ReturnType; + export default component; +}