From e9b9d00c8290b387abd6e0f4b45e64fa8fccd336 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 2 Aug 2026 15:46:01 -0400 Subject: [PATCH] Initial Commit --- deploy.sh | 20 +++++++++++ manage.py | 22 ++++++++++++ requirements.txt | 1 + templates/bindex.html | 58 +++++++++++++++++++++++++++++++ templates/cssindex.html | 45 ++++++++++++++++++++++++ templates/index.html | 76 +++++++++++++++++++++++++++++++++++++++++ web/__init__.py | 0 web/asgi.py | 16 +++++++++ web/urls.py | 22 ++++++++++++ web/wsgi.py | 16 +++++++++ 10 files changed, 276 insertions(+) create mode 100755 deploy.sh create mode 100755 manage.py create mode 100644 requirements.txt create mode 100644 templates/bindex.html create mode 100644 templates/cssindex.html create mode 100644 templates/index.html create mode 100644 web/__init__.py create mode 100644 web/asgi.py create mode 100644 web/urls.py create mode 100644 web/wsgi.py diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..4591309 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +echo "Deploying" + +# Activate virtual environment +source venv/bin/activate + +# Pull latest changes +git pull + +# Install any new dependencies +pip install -r requirements.txt + +# Run database migrations +python manage.py migrate + +# Collect static files +python manage.py collectstatic --noinput + +# Restart diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..19be6dd --- /dev/null +++ b/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'web.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main() diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d3e4ba5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +django diff --git a/templates/bindex.html b/templates/bindex.html new file mode 100644 index 0000000..c2ca111 --- /dev/null +++ b/templates/bindex.html @@ -0,0 +1,58 @@ + + + + + + + +
Hello
+ + + + diff --git a/templates/cssindex.html b/templates/cssindex.html new file mode 100644 index 0000000..47a932a --- /dev/null +++ b/templates/cssindex.html @@ -0,0 +1,45 @@ + + + + + + +
+
Hello
+
+ + diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..aa9ef24 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,76 @@ + + + + + + + +
Hello
+ + + + diff --git a/web/__init__.py b/web/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/web/asgi.py b/web/asgi.py new file mode 100644 index 0000000..b124e1e --- /dev/null +++ b/web/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for web 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', 'web.settings') + +application = get_asgi_application() diff --git a/web/urls.py b/web/urls.py new file mode 100644 index 0000000..2b2fae8 --- /dev/null +++ b/web/urls.py @@ -0,0 +1,22 @@ +""" +URL configuration for web 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.urls import path +from django.views.generic import TemplateView + +urlpatterns = [ + path('', TemplateView.as_view(template_name='index.html')), +] diff --git a/web/wsgi.py b/web/wsgi.py new file mode 100644 index 0000000..1d14994 --- /dev/null +++ b/web/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for web 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', 'web.settings') + +application = get_wsgi_application()