diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..72b89a2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,156 @@ + +### Django ### +*.log +*.pot +*.pyc +__pycache__/ +local_settings.py +db.sqlite3 +db.sqlite3-journal +media +staticfiles + +# If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/ +# in your Git repository. Update and uncomment the following line accordingly. +# /staticfiles/ + +### Django.Python Stack ### +# Byte-compiled / optimized / DLL files +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +pytestdebug.log + +# Translations +*.mo + +# Django stuff: + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ +doc/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +pythonenv* + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# profiling data +.prof + +### vscode ### +.vscode + +### Sass ### +.sass-cache/ +*.css.map +*.sass.map +*.scss.map diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..5a27daa --- /dev/null +++ b/Pipfile @@ -0,0 +1,16 @@ +[[source]] +name = "pypi" +url = "https://pypi.org/simple" +verify_ssl = true + +[dev-packages] + +[packages] +django = "*" +django-crispy-forms = "*" +requests = "*" +django-secrets = "*" +whitenoise = "*" + +[requires] +python_version = "3.8" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 0000000..dd44ebb --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,129 @@ +{ + "_meta": { + "hash": { + "sha256": "427084201aade7b7c577a0d31ba0ee64034e37413b5f2ee0e3dfce51927283d7" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.8" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "asgiref": { + "hashes": [ + "sha256:5ee950735509d04eb673bd7f7120f8fa1c9e2df495394992c73234d526907e17", + "sha256:7162a3cb30ab0609f1a4c95938fd73e8604f63bdba516a7f7d64b83ff09478f0" + ], + "markers": "python_version >= '3.5'", + "version": "==3.3.1" + }, + "certifi": { + "hashes": [ + "sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c", + "sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830" + ], + "version": "==2020.12.5" + }, + "chardet": { + "hashes": [ + "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa", + "sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==4.0.0" + }, + "django": { + "hashes": [ + "sha256:169e2e7b4839a7910b393eec127fd7cbae62e80fa55f89c6510426abf673fe5f", + "sha256:c6c0462b8b361f8691171af1fb87eceb4442da28477e12200c40420176206ba7" + ], + "index": "pypi", + "version": "==3.1.6" + }, + "django-crispy-forms": { + "hashes": [ + "sha256:21cf717b621f93cdf01bac0a419b520fe3b17bffd67e140b6c16558d9b75ab80", + "sha256:a2aa34ee3fccafdebb33c016cbd60246b37df85dae717637c6419b929fa24b25" + ], + "index": "pypi", + "version": "==1.11.0" + }, + "django-secrets": { + "hashes": [ + "sha256:33fc09493654744171b6d8e7fff211d8d4df0036d0a3670921648fcfb8c0225c" + ], + "index": "pypi", + "version": "==1.0.2" + }, + "future": { + "hashes": [ + "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d" + ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==0.18.2" + }, + "idna": { + "hashes": [ + "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6", + "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.10" + }, + "pytz": { + "hashes": [ + "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da", + "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798" + ], + "version": "==2021.1" + }, + "requests": { + "hashes": [ + "sha256:27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804", + "sha256:c210084e36a42ae6b9219e00e48287def368a26d03a048ddad7bfee44f75871e" + ], + "index": "pypi", + "version": "==2.25.1" + }, + "six": { + "hashes": [ + "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", + "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.15.0" + }, + "sqlparse": { + "hashes": [ + "sha256:017cde379adbd6a1f15a61873f43e8274179378e95ef3fede90b5aa64d304ed0", + "sha256:0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8" + ], + "markers": "python_version >= '3.5'", + "version": "==0.4.1" + }, + "urllib3": { + "hashes": [ + "sha256:1b465e494e3e0d8939b50680403e3aedaa2bc434b7d5af64dfd3c958d7f5ae80", + "sha256:de3eedaad74a2683334e282005cd8d7f22f4d55fa690a2a1020a416cb0a47e73" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", + "version": "==1.26.3" + }, + "whitenoise": { + "hashes": [ + "sha256:05ce0be39ad85740a78750c86a93485c40f08ad8c62a6006de0233765996e5c7", + "sha256:05d00198c777028d72d8b0bbd234db605ef6d60e9410125124002518a48e515d" + ], + "index": "pypi", + "version": "==5.2.0" + } + }, + "develop": {} +} diff --git a/README.md b/README.md index e91b466..5c06b26 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # launchx -LaunchX TJHSST Website +Source repo for LaunchX @ TJHSST diff --git a/config/__init__.py b/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/config/asgi.py b/config/asgi.py new file mode 100644 index 0000000..8a9fda7 --- /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/3.1/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..1598205 --- /dev/null +++ b/config/settings.py @@ -0,0 +1,154 @@ +""" +Django settings for config project. + +Generated by 'django-admin startproject' using Django 3.1.6. + +For more information on this file, see +https://docs.djangoproject.com/en/3.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/3.1/ref/settings/ +""" + +from pathlib import Path +from my_secrets import secrets +import os + +# 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/3.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = secrets.SECRET_KEY + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = secrets.DEBUG == "True" + +if DEBUG: + ALLOWED_HOSTS = ["*"] +else: + ALLOWED_HOSTS = ["activities.tjhsst.edu"] + + +# Application definition + +INSTALLED_APPS = [ + 'launchx', + 'users', + 'innovate', + + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'whitenoise.runserver_nostatic', + 'django.contrib.staticfiles', + + 'django_secrets' +] + +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 = 'config.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + '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 = 'config.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/3.1/ref/settings/#databases + +if DEBUG: + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } + } +else: + DATABASES = { + 'default': { + "ENGINE": "django_prometheus.db.backends.postgresql", + "NAME": os.environ["DIRECTOR_DATABASE_NAME"], + "USER": os.environ["DIRECTOR_DATABASE_USERNAME"], + "PASSWORD": os.environ["DIRECTOR_DATABASE_PASSWORD"], + "HOST": os.environ["DIRECTOR_DATABASE_HOST"], + "PORT": os.environ["DIRECTOR_DATABASE_PORT"], + } + } + + +# Password validation +# https://docs.djangoproject.com/en/3.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/3.1/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/3.1/howto/static-files/ + +STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') +STATIC_URL = '/static/' + +CRISPY_TEMPLATE_PACK = 'bootstrap4' + +MEDIA_ROOT = os.path.join(BASE_DIR, 'media') +MEDIA_URL = '/media/' + +LOGIN_REDIRECT_URL = 'blog-home' +LOGIN_URL = 'login' \ No newline at end of file diff --git a/config/urls.py b/config/urls.py new file mode 100644 index 0000000..20bd978 --- /dev/null +++ b/config/urls.py @@ -0,0 +1,26 @@ +"""config URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/3.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 path, include +from users import views as user_views + +urlpatterns = [ + path('', include('launchx.urls')), + path('innovate/', include('innovate.urls'), name='innovate'), + path('login/', user_views.login, name='login'), + path('logout/', user_views.login, name='logout'), + path('admin/', admin.site.urls), +] diff --git a/config/wsgi.py b/config/wsgi.py new file mode 100644 index 0000000..94fcaf1 --- /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/3.1/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/innovate/__init__.py b/innovate/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/innovate/admin.py b/innovate/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/innovate/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/innovate/apps.py b/innovate/apps.py new file mode 100644 index 0000000..c05715f --- /dev/null +++ b/innovate/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class InnovateConfig(AppConfig): + name = 'innovate' diff --git a/innovate/migrations/__init__.py b/innovate/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/innovate/models.py b/innovate/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/innovate/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/innovate/static/innovate/styles.css b/innovate/static/innovate/styles.css new file mode 100644 index 0000000..e69de29 diff --git a/innovate/templates/innovate/index.html b/innovate/templates/innovate/index.html new file mode 100644 index 0000000..45e26a5 --- /dev/null +++ b/innovate/templates/innovate/index.html @@ -0,0 +1,4 @@ +{% extends "launchx/base.html" %} +{% block content %} +

InnovateTJ!

+{% endblock %} \ No newline at end of file diff --git a/innovate/tests.py b/innovate/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/innovate/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/innovate/urls.py b/innovate/urls.py new file mode 100644 index 0000000..8f34929 --- /dev/null +++ b/innovate/urls.py @@ -0,0 +1,6 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.home, name='innovate-home') +] \ No newline at end of file diff --git a/innovate/views.py b/innovate/views.py new file mode 100644 index 0000000..bbfbb7b --- /dev/null +++ b/innovate/views.py @@ -0,0 +1,5 @@ +from django.shortcuts import render + +# Create your views here. +def home(request): + return render(request, 'innovate/index.html') \ No newline at end of file diff --git a/launchx/__init__.py b/launchx/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/launchx/admin.py b/launchx/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/launchx/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/launchx/apps.py b/launchx/apps.py new file mode 100644 index 0000000..00b26ee --- /dev/null +++ b/launchx/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class LaunchxConfig(AppConfig): + name = 'launchx' diff --git a/launchx/migrations/__init__.py b/launchx/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/launchx/models.py b/launchx/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/launchx/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/launchx/static/launchx/img/lightbulb-bw.png b/launchx/static/launchx/img/lightbulb-bw.png new file mode 100644 index 0000000..466331f Binary files /dev/null and b/launchx/static/launchx/img/lightbulb-bw.png differ diff --git a/launchx/static/launchx/img/lightbulb.png b/launchx/static/launchx/img/lightbulb.png new file mode 100644 index 0000000..6243845 Binary files /dev/null and b/launchx/static/launchx/img/lightbulb.png differ diff --git a/launchx/static/launchx/img/text.png b/launchx/static/launchx/img/text.png new file mode 100644 index 0000000..63df157 Binary files /dev/null and b/launchx/static/launchx/img/text.png differ diff --git a/launchx/static/launchx/landing.css b/launchx/static/launchx/landing.css new file mode 100644 index 0000000..cbb61ff --- /dev/null +++ b/launchx/static/launchx/landing.css @@ -0,0 +1,67 @@ +.img { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); +} + +.bulb { + margin-left: 25%; + margin-bottom: 5vh; + position: relative; + width: 300px; + height: 300px; +} + +.off { + position: absolute; + width: 100%; + height: 100%; + z-index: 0; + animation: landing-bulb 1s ease-in-out forwards; +} + +.on { + position: absolute; + width: 100%; + height: 100%; +} + +.text { + width: 600px; + height: 100px; + background-image: url(img/text.png); + opacity: 0; + animation: 0.5s landing-text 1s ease-in-out forwards; +} + +@keyframes landing-bulb { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +@keyframes landing-text { + from { + opacity: 0; + } + + to { + opacity: 1; + } +} + +@media only screen and (max-width: 768px) { + .bulb { + height: 25vh; + width: 25vh; + margin: 0; + } + + .text { + display: none; + } +} diff --git a/launchx/static/launchx/styles.css b/launchx/static/launchx/styles.css new file mode 100644 index 0000000..0297730 --- /dev/null +++ b/launchx/static/launchx/styles.css @@ -0,0 +1,11 @@ +@import url('https://fonts.googleapis.com/css2?family=Karla&display=swap'); + +* { + padding: 0; + margin: 0; + font-family: 'Karla', sans-serif; +} + +body { + background-color: #08060e; +} \ No newline at end of file diff --git a/launchx/templates/launchx/base.html b/launchx/templates/launchx/base.html new file mode 100644 index 0000000..d27fa3c --- /dev/null +++ b/launchx/templates/launchx/base.html @@ -0,0 +1,56 @@ +{% load static %} + + + + + + + + + + + + + {% block styles %}{% endblock %} + + + + + LaunchX + + + + +
+ {% block content %}{% endblock %} +
+ + + + + diff --git a/launchx/templates/launchx/calendar.html b/launchx/templates/launchx/calendar.html new file mode 100644 index 0000000..5480a5c --- /dev/null +++ b/launchx/templates/launchx/calendar.html @@ -0,0 +1,4 @@ +{% extends "launchx/base.html" %} +{% block content %} +

Calendar coming soon.

+{% endblock %} \ No newline at end of file diff --git a/launchx/templates/launchx/landing.html b/launchx/templates/launchx/landing.html new file mode 100644 index 0000000..560effe --- /dev/null +++ b/launchx/templates/launchx/landing.html @@ -0,0 +1,18 @@ +{% extends "launchx/base.html" %} +{% load static %} + +{% block styles %} + +{% endblock %} + +{% block content %} +
+
+
+ + +
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/launchx/templates/launchx/officers.html b/launchx/templates/launchx/officers.html new file mode 100644 index 0000000..aebf2e2 --- /dev/null +++ b/launchx/templates/launchx/officers.html @@ -0,0 +1,4 @@ +{% extends "launchx/base.html" %} +{% block content %} +

Officers coming soon.

+{% endblock %} \ No newline at end of file diff --git a/launchx/tests.py b/launchx/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/launchx/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/launchx/urls.py b/launchx/urls.py new file mode 100644 index 0000000..718fec7 --- /dev/null +++ b/launchx/urls.py @@ -0,0 +1,8 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.landing, name='landing'), + path('calendar/', views.calendar, name='calendar'), + path('officers/', views.officers, name='officers') +] \ No newline at end of file diff --git a/launchx/views.py b/launchx/views.py new file mode 100644 index 0000000..1489602 --- /dev/null +++ b/launchx/views.py @@ -0,0 +1,11 @@ +from django.shortcuts import render + +# Create your views here. +def landing(request): + return render(request, 'launchx/landing.html') + +def calendar(request): + return render(request, 'launchx/calendar.html') + +def officers(request): + return render(request, 'launchx/officers.html') \ No newline at end of file diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..becaf01 --- /dev/null +++ b/manage.py @@ -0,0 +1,25 @@ +#!/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', 'config.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__': + from django_secrets.startup import check + check() + + main() diff --git a/my_secrets/.gitignore b/my_secrets/.gitignore new file mode 100644 index 0000000..ef418f5 --- /dev/null +++ b/my_secrets/.gitignore @@ -0,0 +1 @@ +secrets.py diff --git a/my_secrets/__init__.py b/my_secrets/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/my_secrets/definitions.py b/my_secrets/definitions.py new file mode 100644 index 0000000..9e3c19d --- /dev/null +++ b/my_secrets/definitions.py @@ -0,0 +1,14 @@ +# coding=utf-8 + +# Add your secrets to this list and run manage.py to set their values. +# Use them in settings.py like this: +# from secrets import secrets +# SECRET_KEY = secrets.SECRET_KEY + +SECRET_KEYS = [ + # start with your Django secret key like this: + "SECRET_KEY", + "DEBUG", + "DB_USER", + "DB_PASS" +] diff --git a/users/__init__.py b/users/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/users/admin.py b/users/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/users/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/users/apps.py b/users/apps.py new file mode 100644 index 0000000..4ce1fab --- /dev/null +++ b/users/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class UsersConfig(AppConfig): + name = 'users' diff --git a/users/migrations/__init__.py b/users/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/users/models.py b/users/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/users/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/users/static/users/styles.css b/users/static/users/styles.css new file mode 100644 index 0000000..0297730 --- /dev/null +++ b/users/static/users/styles.css @@ -0,0 +1,11 @@ +@import url('https://fonts.googleapis.com/css2?family=Karla&display=swap'); + +* { + padding: 0; + margin: 0; + font-family: 'Karla', sans-serif; +} + +body { + background-color: #08060e; +} \ No newline at end of file diff --git a/users/templates/users/base.html b/users/templates/users/base.html new file mode 100644 index 0000000..65f8694 --- /dev/null +++ b/users/templates/users/base.html @@ -0,0 +1,30 @@ +{% load static %} + + + + + + + + + + + + + {% block styles %}{% endblock %} + + + + + LaunchX + + + +
+ {% block content %}{% endblock %} +
+ + + + + diff --git a/users/templates/users/login.html b/users/templates/users/login.html new file mode 100644 index 0000000..f36ba74 --- /dev/null +++ b/users/templates/users/login.html @@ -0,0 +1,4 @@ +{% extends 'users/base.html' %} +{% block content %} +

Login page also in development

+{% endblock %} \ No newline at end of file diff --git a/users/tests.py b/users/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/users/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/users/views.py b/users/views.py new file mode 100644 index 0000000..7ea4b80 --- /dev/null +++ b/users/views.py @@ -0,0 +1,5 @@ +from django.shortcuts import render + +# Create your views here. +def login(request): + return render(request, 'users/login.html') \ No newline at end of file