From 3fed94375c24d9e0974e091f0df48a8f9161c7e2 Mon Sep 17 00:00:00 2001 From: wleong1 Date: Sun, 14 Apr 2024 13:57:30 +0100 Subject: [PATCH] Removed django --- django-stock-tracker/CHANGELOG.md | 127 ------- django-stock-tracker/Dockerfile | 18 - django-stock-tracker/LICENSE.md | 32 -- django-stock-tracker/README.md | 202 ---------- django-stock-tracker/README_deploy.md | 24 -- django-stock-tracker/build.sh | 10 - django-stock-tracker/core/__init__.py | 0 django-stock-tracker/core/asgi.py | 16 - django-stock-tracker/core/settings.py | 165 -------- django-stock-tracker/core/urls.py | 23 -- django-stock-tracker/core/wsgi.py | 16 - django-stock-tracker/db.sqlite3 | Bin 131072 -> 0 bytes django-stock-tracker/docker-compose.yml | 27 -- django-stock-tracker/env.sample | 11 - django-stock-tracker/gunicorn-cfg.py | 11 - django-stock-tracker/home/__init__.py | 0 django-stock-tracker/home/admin.py | 3 - django-stock-tracker/home/apps.py | 6 - .../home/migrations/__init__.py | 0 django-stock-tracker/home/models.py | 3 - django-stock-tracker/home/templates/base.html | 54 --- .../home/templates/charts.html | 41 -- .../home/templates/custom-footer.html | 23 -- .../home/templates/dashboard.html | 235 ------------ .../home/templates/includes/footer.html | 9 - .../home/templates/includes/head.html | 45 --- .../home/templates/includes/nav.html | 14 - .../home/templates/includes/navigation.html | 241 ------------ .../home/templates/includes/scripts.html | 42 -- .../home/templates/includes/sidebar.html | 358 ------------------ .../templates/includes/theme-settings.html | 38 -- .../home/templates/sandbox.html | 252 ------------ django-stock-tracker/home/tests.py | 3 - django-stock-tracker/home/urls.py | 10 - django-stock-tracker/home/views.py | 43 --- django-stock-tracker/manage.py | 22 -- django-stock-tracker/nginx/appseed-app.conf | 15 - django-stock-tracker/render.yaml | 15 - django-stock-tracker/requirements.txt | 13 - django-stock-tracker/static/.gitkeep | 0 django-stock-tracker/static/chart.js | 21 - 41 files changed, 2188 deletions(-) delete mode 100644 django-stock-tracker/CHANGELOG.md delete mode 100644 django-stock-tracker/Dockerfile delete mode 100644 django-stock-tracker/LICENSE.md delete mode 100644 django-stock-tracker/README.md delete mode 100644 django-stock-tracker/README_deploy.md delete mode 100644 django-stock-tracker/build.sh delete mode 100644 django-stock-tracker/core/__init__.py delete mode 100644 django-stock-tracker/core/asgi.py delete mode 100644 django-stock-tracker/core/settings.py delete mode 100644 django-stock-tracker/core/urls.py delete mode 100644 django-stock-tracker/core/wsgi.py delete mode 100644 django-stock-tracker/db.sqlite3 delete mode 100644 django-stock-tracker/docker-compose.yml delete mode 100644 django-stock-tracker/env.sample delete mode 100644 django-stock-tracker/gunicorn-cfg.py delete mode 100644 django-stock-tracker/home/__init__.py delete mode 100644 django-stock-tracker/home/admin.py delete mode 100644 django-stock-tracker/home/apps.py delete mode 100644 django-stock-tracker/home/migrations/__init__.py delete mode 100644 django-stock-tracker/home/models.py delete mode 100644 django-stock-tracker/home/templates/base.html delete mode 100644 django-stock-tracker/home/templates/charts.html delete mode 100644 django-stock-tracker/home/templates/custom-footer.html delete mode 100644 django-stock-tracker/home/templates/dashboard.html delete mode 100644 django-stock-tracker/home/templates/includes/footer.html delete mode 100644 django-stock-tracker/home/templates/includes/head.html delete mode 100644 django-stock-tracker/home/templates/includes/nav.html delete mode 100644 django-stock-tracker/home/templates/includes/navigation.html delete mode 100644 django-stock-tracker/home/templates/includes/scripts.html delete mode 100644 django-stock-tracker/home/templates/includes/sidebar.html delete mode 100644 django-stock-tracker/home/templates/includes/theme-settings.html delete mode 100644 django-stock-tracker/home/templates/sandbox.html delete mode 100644 django-stock-tracker/home/tests.py delete mode 100644 django-stock-tracker/home/urls.py delete mode 100644 django-stock-tracker/home/views.py delete mode 100644 django-stock-tracker/manage.py delete mode 100644 django-stock-tracker/nginx/appseed-app.conf delete mode 100644 django-stock-tracker/render.yaml delete mode 100644 django-stock-tracker/requirements.txt delete mode 100644 django-stock-tracker/static/.gitkeep delete mode 100755 django-stock-tracker/static/chart.js diff --git a/django-stock-tracker/CHANGELOG.md b/django-stock-tracker/CHANGELOG.md deleted file mode 100644 index 8e08c01..0000000 --- a/django-stock-tracker/CHANGELOG.md +++ /dev/null @@ -1,127 +0,0 @@ -# Change Log - -## [1.0.14] 2023-02-14 -### Changes - -- Update [Custom Development](https://appseed.us/custom-development/) Section -- Minor Changes (readme) - -## [1.0.13] 2023-10-21 -### Changes - -- Update Dependencies -- Update README - -## [1.0.12] 2023-03-01 -### Changes - -- Bump design version: - - [Django Admin Volt](https://github.com/app-generator/django-admin-volt) `v1.0.10` - -## [1.0.11] 2023-01-31 -### Changes - -- DOCS Update (readme) -- Bump design version: - - [Django Admin Volt](https://github.com/app-generator/django-admin-volt) `v1.0.9` - -## [1.0.10] 2023-01-28 -### Changes - -- DOCS Update (readme). New sections: - - `How to customize the theme` - - Render deployment -- Configure the project to use `home/templates` -- Added `custom_footer` sample - -## [1.0.9] 2023-01-07 -### Changes - -- Move to a `theme-based` pattern - - [Django Admin Volt](https://github.com/app-generator/django-admin-volt) -- 🚀 `Deployment` - - `CI/CD` flow via `Render` - -## [1.0.8] 2022-09-14 -### Improvements - -- Added **Github OAuth** via AllAuth. requires in `.env`: - - `GITHUB_ID`= - - `GITHUB_SECRET`= -- `Docker` Improvements -- Pages UX Updates: - - `SignIN`, `SignUP`, `Settings` - -## [1.0.7] 2022-05-25 -### Improvements - -- Built with [Volt Dashboard Generator](https://appseed.us/generator/volt-dashboard/) - - Timestamp: `2022-05-25 22:38` -- Codebase refactoring -- Added CDN Support - - via `.env` **ASSETS_ROOT** - -## [1.0.6] 2022-01-16 -### Improvements - -- Bump Django Codebase to [v2stable.0.1](https://github.com/app-generator/boilerplate-code-django-dashboard/releases) -- Dependencies update (all packages) - - Django==4.0.1 -- Settings update for Django 4.x - - `New Parameter`: CSRF_TRUSTED_ORIGINS - - [Origin header checking isn`t performed in older versions](https://docs.djangoproject.com/en/4.0/ref/settings/#csrf-trusted-origins) - -## [1.0.5] 2021-10-06 -### Improvements - -- Mention `admin` section custom theme - - [Django Admin Volt](https://pypi.org/project/django-admin-volt/) available on PyPi and Github -- `Presentation` page - - Update Top links - -## [1.0.4] 2021-09-15 -### Improvements - -- Bump Django Codebase to [v2.0.4](https://github.com/app-generator/boilerplate-code-django-dashboard/releases) - - Codebase update - - `assets` & `templates` moved to `apps` folder - - `apps/base` renamed to `apps/home` - -## [1.0.3] 2021-09-07 -### Improvements & Fixes - -- Bump Django Codebase to [v2.0.2](https://github.com/app-generator/boilerplate-code-django-dashboard/releases) - - Dependencies update (all packages) - - Use Django==3.2.6 (latest stable version) - - Better Code formatting - - Improved Files organization - - Optimize imports - - Docker Scripts Update -- Fixes: - - Patch 500 Error when authenticated users access `admin` path (no slash at the end) - - Patch [#16](https://github.com/app-generator/boilerplate-code-django-dashboard/issues/16): Minor issue in Docker - -## [1.0.2] 2021-08-27 -### Improvements - -- Bump UI - [Volt Dashboard v1.4.1](https://github.com/themesberg/volt-bootstrap-5-dashboard/releases) - -## Unreleased 2021-08-05 -### Tooling - -- Added scripts to recompile the SCSS files - - `core/static/assets/` - gulpfile.js - - `core/static/assets/` - package.json -- `Update README` - [Recompile SCSS](https://github.com/app-generator/django-dashboard-volt#recompile-css) (new section) - -## [1.0.1] 2021-03-30 -### Improvements - -- Bump UI: [Jinja Volt](https://github.com/app-generator/jinja-volt-dashboard/releases) v1.0.1 -- [Volt Dashboard](https://github.com/themesberg/volt-bootstrap-5-dashboard/releases) v1.3.2 - -## [1.0.0] 2021-01-17 - -- Bump UI: [Jinja Volt](https://github.com/app-generator/jinja-volt-dashboard/releases) v1.0.0 -- [Volt Dashboard](https://github.com/themesberg/volt-bootstrap-5-dashboard/releases/tag) v1.2.0 -- Codebase: [Django Dashboard](https://github.com/app-generator/boilerplate-code-django-dashboard/releases) v1.0.4 diff --git a/django-stock-tracker/Dockerfile b/django-stock-tracker/Dockerfile deleted file mode 100644 index 253fafb..0000000 --- a/django-stock-tracker/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM python:3.9 - -# set environment variables -ENV PYTHONDONTWRITEBYTECODE 1 -ENV PYTHONUNBUFFERED 1 - -COPY requirements.txt . -# install python dependencies -RUN pip install --upgrade pip -RUN pip install --no-cache-dir -r requirements.txt - -COPY . . - -# running migrations -RUN python manage.py migrate - -# gunicorn -CMD ["gunicorn", "--config", "gunicorn-cfg.py", "core.wsgi"] diff --git a/django-stock-tracker/LICENSE.md b/django-stock-tracker/LICENSE.md deleted file mode 100644 index 5012dd9..0000000 --- a/django-stock-tracker/LICENSE.md +++ /dev/null @@ -1,32 +0,0 @@ -# MIT License - -Copyright (c) 2019 - present [AppSeed](http://appseed.us/) - -
- -## Licensing Information - -
- -| Item | - | -| ---------------------------------- | --- | -| License Type | MIT | -| Use for print | **YES** | -| Create single personal website/app | **YES** | -| Create single website/app for client | **YES** | -| Create multiple website/apps for clients | **YES** | -| Create multiple SaaS applications | **YES** | -| End-product paying users | **YES** | -| Product sale | **YES** | -| Remove footer credits | **YES** | -| --- | --- | -| Remove copyright mentions from source code | NO | -| Production deployment assistance | NO | -| Create HTML/CSS template for sale | NO | -| Create Theme/Template for CMS for sale | NO | -| Separate sale of our UI Elements | NO | - -
- ---- -For more information regarding licensing, please contact the AppSeed Service < *support@appseed.us* > diff --git a/django-stock-tracker/README.md b/django-stock-tracker/README.md deleted file mode 100644 index b0a38f7..0000000 --- a/django-stock-tracker/README.md +++ /dev/null @@ -1,202 +0,0 @@ -# [Volt Dashboard Django](https://appseed.us/product/volt-dashboard/django/) - -Open-source **[Django Dashboards](https://appseed.us/admin-dashboards/django/)** built on top of a modern design. **Volt Dashboard** is a free and open source `Bootstrap 5` Admin Dashboard featuring over 100 components, 11 example pages and 3 plugins with Vanilla JS. There are more than 100 free Bootstrap 5 components included some of them being buttons, alerts, modals, and date pickers. - -- 👉 [Volt Dashboard Django](https://appseed.us/product/volt-dashboard/django/) - Product page -- 👉 [Volt Dashboard Django](https://django-volt-dashboard.appseed-srv1.com/) - LIVE Demo - -
- -## Features - -> `Have questions?` Contact **[Support](https://appseed.us/support/)** (Email & Discord) provided by **AppSeed** - -| Free Version | [PRO Version](https://appseed.us/product/volt-dashboard-pro/django/) | 🚀 Custom - $5,999 | -| --------------------------------------| --------------------------------------| --------------------------------------| -| ✓ **Django 4.1.12** | **Everything in Free**, plus: | **Everything in PRO**, plus: | -| ✓ Best Practices | ✅ **Premium Bootstrap 5 Design** | ✅ **1mo Custom Development** | -| ✓ `Bootstrap 5`, Volt Dashboard UI | ✅ `OAuth` Google, GitHub | ✅ **Team**: PM, Developer, Tester | -| ✓ `Docker` | ✅ Extended User Model | ✅ Weekly Sprints | -| ✓ `CI/CD` Flow via Render | ✅ `Private REPO Access` | ✅ Technical SPECS | -| ✓ `Free Support` | ✅ **PRO Support** - [Email & Discord](https://appseed.us/support/) | ✅ Documentation | -| - | ✅ Deployment Assistance | ✅ **30 days Delivery Warranty** | -| ------------------------------------ | ------------------------------------ | ------------------------------------| -| ✓ [LIVE Demo](https://django-volt-dashboard.appseed-srv1.com/) | 🚀 [LIVE Demo](https://django-volt-enh.appseed-srv1.com/) | 🛒 `Order`: **[$5,999](https://appseed.gumroad.com/l/rocket-package)** (GUMROAD) | - - -![Volt Dashboard - Full-Stack Starter generated by AppSeed.](https://user-images.githubusercontent.com/51070104/168843604-b026fd94-5969-4be7-81ac-5887cf0958e5.png) - -
- -## Manual Build - -> 👉 Download the code - -```bash -$ git clone https://github.com/app-generator/django-volt-dashboard.git -$ cd django-volt-dashboard -``` - -
- -> 👉 Install modules via `VENV` - -```bash -$ virtualenv env -$ source env/bin/activate -$ pip install -r requirements.txt -``` - -
- -> 👉 Set Up Database - -```bash -$ python manage.py makemigrations -$ python manage.py migrate -``` - -
- -> 👉 Create the Superuser - -```bash -$ python manage.py createsuperuser -``` - -
- -> 👉 Start the app - -```bash -$ python manage.py runserver -``` - -At this point, the app runs at `http://127.0.0.1:8000/`. - -
- -## Codebase structure - -The project is coded using a simple and intuitive structure presented below: - -```bash -< PROJECT ROOT > - | - |-- core/ - | |-- settings.py # Project Configuration - | |-- urls.py # Project Routing - | - |-- home/ - | |-- views.py # APP Views - | |-- urls.py # APP Routing - | |-- models.py # APP Models - | |-- tests.py # Tests - | |-- templates/ # Theme Customisation - | |-- includes # - | |-- custom-footer.py # Custom Footer - | - |-- requirements.txt # Project Dependencies - | - |-- env.sample # ENV Configuration (default values) - |-- manage.py # Start the app - Django default start script - | - |-- ************************************************************************ -``` - -
- -## How to Customize - -When a template file is loaded in the controller, `Django` scans all template directories starting from the ones defined by the user, and returns the first match or an error in case the template is not found. -The theme used to style this starter provides the following files: - -```bash -# This exists in ENV: LIB/admin_volt -< UI_LIBRARY_ROOT > - | - |-- templates/ # Root Templates Folder - | | - | |-- accounts/ - | | |-- sign-in.html # Sign IN Page - | | |-- sign-up.html # Sign UP Page - | | - | |-- includes/ - | | |-- footer.html # Footer component - | | |-- sidebar.html # Sidebar component - | | |-- navigation.html # Navigation Bar - | | |-- scripts.html # Scripts Component - | | - | |-- layouts/ - | | |-- base.html # Masterpage - | | |-- base-auth.html # Masterpage for Auth Pages - | | - | |-- pages/ - | |-- index.html # Index Page (presentation) - | |-- settings.html # Settings Page - | |-- dashboard.html # Dashboard page - | |-- *.html # All other pages - | - |-- ************************************************************************ -``` - -When the project requires customization, we need to copy the original file that needs an update (from the virtual environment) and place it in the template folder using the same path. - -> For instance, if we want to **customize the footer.html** these are the steps: - -- ✅ `Step 1`: create the `templates` DIRECTORY inside the `home` app -- ✅ `Step 2`: configure the project to use this new template directory - - `core/settings.py` TEMPLATES section -- ✅ `Step 3`: copy the `footer.html` from the original location (inside your ENV) and save it to the `home/templates` DIR - - Source PATH: `/LIB/admin_volt/includes/footer.html` - - Destination PATH: `home/templates/includes/footer.html` - -> To speed up all these steps, the **codebase is already configured** (`Steps 1, and 2`) and a `custom footer` can be found at this location: - -`home/templates/includes/custom_footer.html` - -By default, this file is unused because the `theme` expects `footer.html` (without the `custom-` prefix). - -In order to use it, simply rename it to `footer.html`. Like this, the default version shipped in the library is ignored by Django. - -In a similar way, all other files and components can be customized easily. - -
- -## Deploy on [Render](https://render.com/) - -- Create a Blueprint instance - - Go to https://dashboard.render.com/blueprints this link. -- Click `New Blueprint Instance` button. -- Connect your `repo` which you want to deploy. -- Fill the `Service Group Name` and click on `Update Existing Resources` button. -- After that your deployment will start automatically. - -At this point, the product should be LIVE. - -
- -## [PRO Version](https://appseed.us/product/volt-dashboard-pro/django/) - -This design is a pixel-perfect [Bootstrap 5](https://www.admin-dashboards.com/bootstrap-5-templates/) Dashboard with a fresh, new design inspired by Google's Material Design. `Volt Dashboard PRO` is built with over 300 frontend individual elements, like buttons, inputs, navbars, nav tabs, cards, or alerts, giving you the freedom of choosing and combining. - -> Features: - -- ✅ `Up-to-date Dependencies` -- ✅ `Design`: [Django Theme Volt](https://github.com/app-generator/django-admin-volt-pro) - `PRO Version` -- ✅ `Sections` covered by the design: - - ✅ **Admin section** (reserved for superusers) - - ✅ **Authentication**: `Django.contrib.AUTH`, Registration - - ✅ **All Pages** available in for ordinary users -- ✅ `Docker` -- 🚀 `Deployment` - - `CI/CD` flow via `Render` - -
- -![Volt Dashboard PRO - Starter generated by AppSeed.](https://user-images.githubusercontent.com/51070104/172672843-8c40a801-3438-4e9c-86db-38a34191fbdf.png) - -
- ---- -[Django Volt Dashboard](https://appseed.us/product/volt-dashboard/django/) - **Django** starter provided by **[AppSeed](https://appseed.us/)** diff --git a/django-stock-tracker/README_deploy.md b/django-stock-tracker/README_deploy.md deleted file mode 100644 index a1ac7e5..0000000 --- a/django-stock-tracker/README_deploy.md +++ /dev/null @@ -1,24 +0,0 @@ -# How to deploy on `Render` - -> This document should contains all the steps to deploy the app on render without much effort, using PostgreSQL - -https://render.com/docs/deploy-django - -## ALL STEPS below - -
- -### 👉 Create `PostgreSQL` database on render - - Go to https://dashboard.render.com/new/database this link. - - Database name should be `berry`. - - Keep the Database, User and Datadog API Key as it is. - - If you want to change database name anything else then you have to change your `render.yaml` file database name too. - -
- -### 👉 Create a Blueprint instance - - Go to https://dashboard.render.com/blueprints this link. - - Click `New Blueprint Instance` button. - - Connect your `repo` which you want to deploy. - - Fill the `Service Group Name` and click on `Update Existing Resources` button. - - After that your deployment will start automatically. \ No newline at end of file diff --git a/django-stock-tracker/build.sh b/django-stock-tracker/build.sh deleted file mode 100644 index 475c139..0000000 --- a/django-stock-tracker/build.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -# exit on error -set -o errexit - -python -m pip install --upgrade pip - -pip install -r requirements.txt - -python manage.py collectstatic --no-input -python manage.py migrate diff --git a/django-stock-tracker/core/__init__.py b/django-stock-tracker/core/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django-stock-tracker/core/asgi.py b/django-stock-tracker/core/asgi.py deleted file mode 100644 index 26a5940..0000000 --- a/django-stock-tracker/core/asgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -ASGI config for core 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/4.1/howto/deployment/asgi/ -""" - -import os - -from django.core.asgi import get_asgi_application - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings") - -application = get_asgi_application() diff --git a/django-stock-tracker/core/settings.py b/django-stock-tracker/core/settings.py deleted file mode 100644 index 0a2ce3b..0000000 --- a/django-stock-tracker/core/settings.py +++ /dev/null @@ -1,165 +0,0 @@ -""" -Django settings for core project. - -Generated by 'django-admin startproject' using Django 4.1.2. - -For more information on this file, see -https://docs.djangoproject.com/en/4.1/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/4.1/ref/settings/ -""" - -import os, random, string -from pathlib import Path -from dotenv import load_dotenv - -load_dotenv() # take environment variables from .env. - -# 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/4.1/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = os.environ.get('SECRET_KEY') -if not SECRET_KEY: - SECRET_KEY = ''.join(random.choice( string.ascii_lowercase ) for i in range( 32 )) - -# Render Deployment Code -DEBUG = 'RENDER' not in os.environ - -ALLOWED_HOSTS = [] - -RENDER_EXTERNAL_HOSTNAME = os.environ.get('RENDER_EXTERNAL_HOSTNAME') -if RENDER_EXTERNAL_HOSTNAME: - ALLOWED_HOSTS.append(RENDER_EXTERNAL_HOSTNAME) - -# Application definition - -INSTALLED_APPS = [ - 'admin_volt.apps.AdminVoltConfig', - "django.contrib.admin", - "django.contrib.auth", - "django.contrib.contenttypes", - "django.contrib.sessions", - "django.contrib.messages", - "django.contrib.staticfiles", - - "home", -] - -MIDDLEWARE = [ - "django.middleware.security.SecurityMiddleware", - "whitenoise.middleware.WhiteNoiseMiddleware", - "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 = "core.urls" - -HOME_TEMPLATES = os.path.join(BASE_DIR, 'home', 'templates') - -TEMPLATES = [ - { - "BACKEND": "django.template.backends.django.DjangoTemplates", - "DIRS": [HOME_TEMPLATES], - "APP_DIRS": True, - "OPTIONS": { - "context_processors": [ - "django.template.context_processors.debug", - "django.template.context_processors.request", - "django.contrib.auth.context_processors.auth", - "django.contrib.messages.context_processors.messages", - ], - }, - }, -] - -WSGI_APPLICATION = "core.wsgi.application" - - -# Database -# https://docs.djangoproject.com/en/4.1/ref/settings/#databases - -DB_ENGINE = os.getenv('DB_ENGINE' , None) -DB_USERNAME = os.getenv('DB_USERNAME' , None) -DB_PASS = os.getenv('DB_PASS' , None) -DB_HOST = os.getenv('DB_HOST' , None) -DB_PORT = os.getenv('DB_PORT' , None) -DB_NAME = os.getenv('DB_NAME' , None) - -if DB_ENGINE and DB_NAME and DB_USERNAME: - DATABASES = { - 'default': { - 'ENGINE' : 'django.db.backends.' + DB_ENGINE, - 'NAME' : DB_NAME, - 'USER' : DB_USERNAME, - 'PASSWORD': DB_PASS, - 'HOST' : DB_HOST, - 'PORT' : DB_PORT, - }, - } -else: - DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': 'db.sqlite3', - } - } - -# Password validation -# https://docs.djangoproject.com/en/4.1/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/4.1/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/4.1/howto/static-files/ - -STATIC_URL = '/static/' -# STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') -STATICFILES_DIRS = [ - BASE_DIR / 'static', -] - -#if not DEBUG: -# STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' - -# Default primary key field type -# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field - -DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" - -LOGIN_REDIRECT_URL = '/' -EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' diff --git a/django-stock-tracker/core/urls.py b/django-stock-tracker/core/urls.py deleted file mode 100644 index 202d1bd..0000000 --- a/django-stock-tracker/core/urls.py +++ /dev/null @@ -1,23 +0,0 @@ -"""core URL Configuration - -The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/4.1/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 include, path - -urlpatterns = [ - path('', include('home.urls')), - path("admin/", admin.site.urls), - path("", include('admin_volt.urls')) -] diff --git a/django-stock-tracker/core/wsgi.py b/django-stock-tracker/core/wsgi.py deleted file mode 100644 index e9b9d8a..0000000 --- a/django-stock-tracker/core/wsgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -WSGI config for core 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/4.1/howto/deployment/wsgi/ -""" - -import os - -from django.core.wsgi import get_wsgi_application - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings") - -application = get_wsgi_application() diff --git a/django-stock-tracker/db.sqlite3 b/django-stock-tracker/db.sqlite3 deleted file mode 100644 index 76c578876b739410315f80b556fdc46e56dd1fb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 131072 zcmeI5TZ|*wS;t-Nvfb{sefm1pWTvOxp6%T+J-zMwWtPD9&UR)xJKM867d9gi6=l1+ z#}i+AZ1-Fg3E|01f;PYdQ6dEimKP)tJaAPWl1K=I5FiMk1c^%!JS`w4K_JKjMB+Qg zRjzWm+TAN{2AYj0n!cJ$~@vsKqR(X?mEBT1fDqfw8? zbDI9=f6dQ%`XZYN`YYMKAN2LK=jC@k>f^@jf4Pm)`*V;v_JaTjfB*=900@8p2!H?x zfB*=900{ix3Cz!i$?44GTORf&>#2quQxzwNxUNSxcnW zQu$~ycRrgupUS>mEM#)I%%y3cXa1cHZNGDi>{F^%>*y_YzfGH+YOCE*8(Ljg>)L&_ zrZ;vww_H8tsc7caDe`pD^psTh_bOUPSNB@Y`w!GTy;ZOFbh&!S7W0YZ1x6m;G(98? zExWDe{@#&fWD|*e_F{yb+%TLZiuMZCv?JChT}%~o9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tracker/docker-compose.yml deleted file mode 100644 index d8a7514..0000000 --- a/django-stock-tracker/docker-compose.yml +++ /dev/null @@ -1,27 +0,0 @@ -version: '3.8' -services: - appseed-app: - container_name: appseed_app - restart: always - build: . - networks: - - db_network - - web_network - nginx: - container_name: nginx - restart: always - image: "nginx:latest" - ports: - - "5085:5085" - volumes: - - ./nginx:/etc/nginx/conf.d - networks: - - web_network - depends_on: - - appseed-app -networks: - db_network: - driver: bridge - web_network: - driver: bridge - \ No newline at end of file diff --git a/django-stock-tracker/env.sample b/django-stock-tracker/env.sample deleted file mode 100644 index 731756c..0000000 --- a/django-stock-tracker/env.sample +++ /dev/null @@ -1,11 +0,0 @@ -# True for development, False for production -DEBUG=True - -SECRET_KEY= - -# DB_ENGINE=mysql -# DB_HOST=localhost -# DB_NAME=appseed_db -# DB_USERNAME=appseed_db_usr -# DB_PASS=pass -# DB_PORT=3306 \ No newline at end of file diff --git a/django-stock-tracker/gunicorn-cfg.py b/django-stock-tracker/gunicorn-cfg.py deleted file mode 100644 index 3acce75..0000000 --- a/django-stock-tracker/gunicorn-cfg.py +++ /dev/null @@ -1,11 +0,0 @@ -# -*- encoding: utf-8 -*- -""" -Copyright (c) 2019 - present AppSeed.us -""" - -bind = '0.0.0.0:5005' -workers = 1 -accesslog = '-' -loglevel = 'debug' -capture_output = True -enable_stdio_inheritance = True diff --git a/django-stock-tracker/home/__init__.py b/django-stock-tracker/home/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django-stock-tracker/home/admin.py b/django-stock-tracker/home/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/django-stock-tracker/home/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/django-stock-tracker/home/apps.py b/django-stock-tracker/home/apps.py deleted file mode 100644 index e7d1c7e..0000000 --- a/django-stock-tracker/home/apps.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.apps import AppConfig - - -class HomeConfig(AppConfig): - default_auto_field = "django.db.models.BigAutoField" - name = "home" diff --git a/django-stock-tracker/home/migrations/__init__.py b/django-stock-tracker/home/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django-stock-tracker/home/models.py b/django-stock-tracker/home/models.py deleted file mode 100644 index 71a8362..0000000 --- a/django-stock-tracker/home/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/django-stock-tracker/home/templates/base.html b/django-stock-tracker/home/templates/base.html deleted file mode 100644 index d5e1fcc..0000000 --- a/django-stock-tracker/home/templates/base.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - {% include 'includes/head.html' %} - {% block extrastyle %}{% endblock extrastyle %} - {% block extrahead %}{% endblock extrahead %} - - - {% block nav %} - {% include 'includes/nav.html' %} - {% endblock nav %} - - {% block sidebar %} - {% include 'includes/sidebar.html' %} - {% endblock sidebar %} - -
- {% block header %} - {% include 'includes/navigation.html' %} - {% endblock header %} - - {% block content %}{% endblock content %} - - {% block theme_settings %} - {% include 'includes/theme-settings.html' %} - {% endblock theme_settings %} - - {% block footer %} - {% include 'includes/footer.html' %} - {% endblock footer %} - -
- - {% include 'includes/scripts.html' %} - {% block extra_js %}{% endblock extra_js %} - \ No newline at end of file diff --git a/django-stock-tracker/home/templates/charts.html b/django-stock-tracker/home/templates/charts.html deleted file mode 100644 index 069677f..0000000 --- a/django-stock-tracker/home/templates/charts.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - Chart.js Example - - - - - - - - diff --git a/django-stock-tracker/home/templates/custom-footer.html b/django-stock-tracker/home/templates/custom-footer.html deleted file mode 100644 index 4e8cf23..0000000 --- a/django-stock-tracker/home/templates/custom-footer.html +++ /dev/null @@ -1,23 +0,0 @@ - \ No newline at end of file diff --git a/django-stock-tracker/home/templates/dashboard.html b/django-stock-tracker/home/templates/dashboard.html deleted file mode 100644 index 4da0d7c..0000000 --- a/django-stock-tracker/home/templates/dashboard.html +++ /dev/null @@ -1,235 +0,0 @@ -{% extends 'base.html' %} -{% load static %} - -{% block content %} - -
- - - - -
-
-
-
-
- - - -
-
-
-
-
-
-
-
-
- - - - -
-
-
-
-

Current price

-

0

-
- - Feb 1 - Apr 1, - - - - USA - -
-
Since last month - - 22%
-
-
-
-
-
-
-
-
-
-
-
-
- - - -
-
-
-
-

Current News

-
News
-
- - Feb 1 - Apr 1, - - - - GER - -
-
Since last month - - 2%
-
-
-
-
-
-
-
-
-
- -{% endblock content %} diff --git a/django-stock-tracker/home/templates/includes/footer.html b/django-stock-tracker/home/templates/includes/footer.html deleted file mode 100644 index edc3559..0000000 --- a/django-stock-tracker/home/templates/includes/footer.html +++ /dev/null @@ -1,9 +0,0 @@ -
-
-
-

- Stock Tracker - yoinked from AppSeed. -

-
-
-
\ No newline at end of file diff --git a/django-stock-tracker/home/templates/includes/head.html b/django-stock-tracker/home/templates/includes/head.html deleted file mode 100644 index 9ce1b8f..0000000 --- a/django-stock-tracker/home/templates/includes/head.html +++ /dev/null @@ -1,45 +0,0 @@ -{% load static %} - - - -Volt Free Bootstrap Dashboard - Settings - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/django-stock-tracker/home/templates/includes/nav.html b/django-stock-tracker/home/templates/includes/nav.html deleted file mode 100644 index 84eb1de..0000000 --- a/django-stock-tracker/home/templates/includes/nav.html +++ /dev/null @@ -1,14 +0,0 @@ -{% load static %} - - \ No newline at end of file diff --git a/django-stock-tracker/home/templates/includes/navigation.html b/django-stock-tracker/home/templates/includes/navigation.html deleted file mode 100644 index 80878c6..0000000 --- a/django-stock-tracker/home/templates/includes/navigation.html +++ /dev/null @@ -1,241 +0,0 @@ -{% load static %} - - \ No newline at end of file diff --git a/django-stock-tracker/home/templates/includes/scripts.html b/django-stock-tracker/home/templates/includes/scripts.html deleted file mode 100644 index 4ee5e71..0000000 --- a/django-stock-tracker/home/templates/includes/scripts.html +++ /dev/null @@ -1,42 +0,0 @@ -{% load static %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/django-stock-tracker/home/templates/includes/sidebar.html b/django-stock-tracker/home/templates/includes/sidebar.html deleted file mode 100644 index 1682ee1..0000000 --- a/django-stock-tracker/home/templates/includes/sidebar.html +++ /dev/null @@ -1,358 +0,0 @@ -{% load i18n static admin_volt %} - - \ No newline at end of file diff --git a/django-stock-tracker/home/templates/includes/theme-settings.html b/django-stock-tracker/home/templates/includes/theme-settings.html deleted file mode 100644 index 4a93202..0000000 --- a/django-stock-tracker/home/templates/includes/theme-settings.html +++ /dev/null @@ -1,38 +0,0 @@ -{% load static %} - -
-
- -
-

Open source 💛

- Star -
- - Download - - - - -

Actively supported by AppSeed.

-
-
- -
-
- - - - - Settings - -
-
\ No newline at end of file diff --git a/django-stock-tracker/home/templates/sandbox.html b/django-stock-tracker/home/templates/sandbox.html deleted file mode 100644 index e55fdc8..0000000 --- a/django-stock-tracker/home/templates/sandbox.html +++ /dev/null @@ -1,252 +0,0 @@ -{% extends 'base.html' %} -{% load static %} - -{% block content %} - -
- -
-
-
-
-
-
-
Sales Value
-

$10,567

-
- Yesterday - - 10.57% -
-
-
- Month - Week -
-
-
- - - -
-
-
-
-
-
-
-
-
- - - - -
-
-

Customers

-

345,678

-
-
-
-
-

Customers

-

345k

-
- - Feb 1 - Apr 1, - - - - USA - -
-
Since last month - - 22%
-
-
-
-
-
-
-
-
-
-
-
-
- - - -
-
-

Revenue

-

$43,594

-
-
-
-
-

Revenue

-

$43,594

-
- - Feb 1 - Apr 1, - - - - GER - -
-
Since last month - - 2%
-
-
-
-
-
-
-
-
-
-
-
-
- - - -
-
-

Bounce Rate

-

50.88%

-
-
-
-
-

Bounce Rate

-

50.88%

-
- - Feb 1 - Apr 1 - -
-
Since last month - - 4%
-
-
-
-
-
-
-
-
-
- -{% endblock content %} - - -document.getElementById('dropdown-menu').addEventListener('change', function() { - var selectedValue = this.value; // Get selected value - updateGraph(selectedValue); // Call function to update the graph -}); - -// Function to update the graph based on selected value -function updateGraph(selectedValue) { - // Send AJAX request to backend with selected value - var xhr = new XMLHttpRequest(); - xhr.open('POST', '/update-graph/', true); // Replace with your backend URL - xhr.setRequestHeader('Content-Type', 'application/json'); - xhr.onreadystatechange = function() { - if (xhr.readyState === 4 && xhr.status === 200) { - var responseData = JSON.parse(xhr.responseText); - // Call function to update the graph with received data - updateChart(responseData); - } - }; - xhr.send(JSON.stringify({ value: selectedValue })); -} - -// Function to update the chart with new data -function updateChart(data) { - var dates = data.map(item => item.date); - var closes = data.map(item => item.close); - - // Update the existing chart with new data - myChart.data.labels = dates; - myChart.data.datasets[0].data = closes; - myChart.update(); -} \ No newline at end of file diff --git a/django-stock-tracker/home/tests.py b/django-stock-tracker/home/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/django-stock-tracker/home/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/django-stock-tracker/home/urls.py b/django-stock-tracker/home/urls.py deleted file mode 100644 index 5fdaaeb..0000000 --- a/django-stock-tracker/home/urls.py +++ /dev/null @@ -1,10 +0,0 @@ -from django.urls import path - -from . import views - -urlpatterns = [ - path('', views.index, name='index'), - path('graph', views.update_graph, name="graph"), - path('price', views.update_price, name="price"), - path('news', views.update_news, name="news"), -] diff --git a/django-stock-tracker/home/views.py b/django-stock-tracker/home/views.py deleted file mode 100644 index d036cd9..0000000 --- a/django-stock-tracker/home/views.py +++ /dev/null @@ -1,43 +0,0 @@ -from django.shortcuts import render -from django.http import HttpResponse, JsonResponse -import sys, json -sys.path.append("/usr/workspace/") -sys.path.append("/home/wleong/Personal_project/StockTracker") -from src.model import Model -from src.data_processing import DataProcessing -from src.live_price_display import LivePriceDisplay -from src.news_display import NewsDisplay -import pandas as pd - -# Create your views here. -models = Model() -news_disp = NewsDisplay() -price_disp = LivePriceDisplay() -all_data = models.process_data() - -def index(request): - # Uncomment below for full company names in selection rather than ticker symbols. - # options = models.generate_company_list()[1] - options = models.generate_company_list()[0] - return render(request, 'dashboard.html', {'dropdown_items': options}) - -def update_graph(request): - company = request.GET.get('company') - raw_data = all_data[company] - data = { - "date": raw_data["trade_date"], - "close": raw_data["close"] - } - df = pd.DataFrame(data) - chart_data = df.to_json(orient='records') - return JsonResponse(chart_data, safe=False) - -def update_price(request): - company = request.GET.get('company') - price = price_disp.display_final_price_yf(company) - return HttpResponse(price) - -def update_news(request): - company = request.GET.get('company') - news = json.dumps(news_disp.format_news_django(company)) - return HttpResponse(news) \ No newline at end of file diff --git a/django-stock-tracker/manage.py b/django-stock-tracker/manage.py deleted file mode 100644 index 4e20ce5..0000000 --- a/django-stock-tracker/manage.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/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", "core.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/django-stock-tracker/nginx/appseed-app.conf b/django-stock-tracker/nginx/appseed-app.conf deleted file mode 100644 index 61c7a1e..0000000 --- a/django-stock-tracker/nginx/appseed-app.conf +++ /dev/null @@ -1,15 +0,0 @@ -upstream webapp { - server appseed_app:5005; -} - -server { - listen 5085; - server_name localhost; - - location / { - proxy_pass http://webapp; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } - -} diff --git a/django-stock-tracker/render.yaml b/django-stock-tracker/render.yaml deleted file mode 100644 index e90d409..0000000 --- a/django-stock-tracker/render.yaml +++ /dev/null @@ -1,15 +0,0 @@ -services: - - type: web - name: django-volt-dash - plan: starter - env: python - region: frankfurt # region should be same as your database region. - buildCommand: "./build.sh" - startCommand: "gunicorn core.wsgi:application" - envVars: - - key: DEBUG - value: False - - key: SECRET_KEY - generateValue: true - - key: WEB_CONCURRENCY - value: 4 diff --git a/django-stock-tracker/requirements.txt b/django-stock-tracker/requirements.txt deleted file mode 100644 index e1908df..0000000 --- a/django-stock-tracker/requirements.txt +++ /dev/null @@ -1,13 +0,0 @@ -# Core -django==4.1.12 -python-dotenv==1.0.0 - -# UI -django-admin-volt==1.0.10 - -# Deployment -whitenoise==6.5.0 -gunicorn==21.2.0 - -# psycopg2-binary -# mysqlclient diff --git a/django-stock-tracker/static/.gitkeep b/django-stock-tracker/static/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/django-stock-tracker/static/chart.js b/django-stock-tracker/static/chart.js deleted file mode 100755 index 78804ab..0000000 --- a/django-stock-tracker/static/chart.js +++ /dev/null @@ -1,21 +0,0 @@ -var ctx = document.getElementById('myChart').getContext('2d'); -var myChart = new Chart(ctx, { - type: 'bar', - data: { - labels: ['A', 'B', 'C', 'D', 'E'], - datasets: [{ - label: 'Data', - data: chartData, // Replace chartData with your actual data - backgroundColor: 'rgba(255, 99, 132, 0.2)', - borderColor: 'rgba(255, 99, 132, 1)', - borderWidth: 1 - }] - }, - options: { - scales: { - y: { - beginAtZero: true - } - } - } -});