diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..69fc25e --- /dev/null +++ b/Pipfile @@ -0,0 +1,13 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +django = "*" +gunicorn = "*" + +[dev-packages] + +[requires] +python_version = "3.8" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 0000000..859c6cb --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,61 @@ +{ + "_meta": { + "hash": { + "sha256": "8406c88dd72dca81bf19e078be4d2bf789f5202903d10e4efd681365a35855ab" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.8" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "asgiref": { + "hashes": [ + "sha256:1d2880b792ae8757289136f1db2b7b99100ce959b2aa57fd69dab783d05afac4", + "sha256:4a29362a6acebe09bf1d6640db38c1dc3d9217c68e6f9f6204d72667fc19a424" + ], + "markers": "python_version >= '3.7'", + "version": "==3.5.2" + }, + "django": { + "hashes": [ + "sha256:26dc24f99c8956374a054bcbf58aab8dc0cad2e6ac82b0fe036b752c00eee793", + "sha256:b8d843714810ab88d59344507d4447be8b2cf12a49031363b6eed9f1b9b2280f" + ], + "index": "pypi", + "version": "==4.1.2" + }, + "gunicorn": { + "hashes": [ + "sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e", + "sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8" + ], + "index": "pypi", + "version": "==20.1.0" + }, + "setuptools": { + "hashes": [ + "sha256:1b6bdc6161661409c5f21508763dc63ab20a9ac2f8ba20029aaaa7fdb9118012", + "sha256:3050e338e5871e70c72983072fe34f6032ae1cdeeeb67338199c2f74e083a80e" + ], + "markers": "python_version >= '3.7'", + "version": "==65.4.1" + }, + "sqlparse": { + "hashes": [ + "sha256:0323c0ec29cd52bceabc1b4d9d579e311f3e4961b98d174201d5622a23b85e34", + "sha256:69ca804846bb114d2ec380e4360a8a340db83f0ccf3afceeb1404df028f57268" + ], + "markers": "python_version >= '3.5'", + "version": "==0.4.3" + } + }, + "develop": {} +} diff --git a/global/__init__.py b/global/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/global/apps/base/__init__.py b/global/apps/base/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/global/apps/base/admin.py b/global/apps/base/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/global/apps/base/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/global/apps/base/apps.py b/global/apps/base/apps.py new file mode 100644 index 0000000..05011e8 --- /dev/null +++ b/global/apps/base/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class BaseConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'base' diff --git a/global/apps/base/migrations/__init__.py b/global/apps/base/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/global/apps/base/models.py b/global/apps/base/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/global/apps/base/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/global/apps/base/tests.py b/global/apps/base/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/global/apps/base/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/global/apps/base/urls.py b/global/apps/base/urls.py new file mode 100644 index 0000000..40fd22e --- /dev/null +++ b/global/apps/base/urls.py @@ -0,0 +1,11 @@ +from django.contrib.auth.views import LogoutView + +from django.urls import path + + + +from . import views + +urlpatterns = [ + path("", views.under_construction) +] diff --git a/global/apps/base/views.py b/global/apps/base/views.py new file mode 100644 index 0000000..c100492 --- /dev/null +++ b/global/apps/base/views.py @@ -0,0 +1,5 @@ +from django.shortcuts import render + +# Create your views here. +def under_construction(request): + return render("base/under_construction.html") diff --git a/global/asgi.py b/global/asgi.py new file mode 100644 index 0000000..343221b --- /dev/null +++ b/global/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for global 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', 'global.settings') + +application = get_asgi_application() diff --git a/global/settings/__init__.py b/global/settings/__init__.py new file mode 100644 index 0000000..9a7be8d --- /dev/null +++ b/global/settings/__init__.py @@ -0,0 +1,125 @@ +""" +Django settings for global 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/ +""" + +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/4.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-$ilb3n76m-u+1#xt^^%zck!)t)pizy1u&o(%g-i3wgln^!*k81' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'global.apps.base', + + '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 = 'global.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 = 'global.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/4.1/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / '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/' + +# Default primary key field type +# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/global/templates/base.html b/global/templates/base.html new file mode 100644 index 0000000..18ecdcb --- /dev/null +++ b/global/templates/base.html @@ -0,0 +1 @@ + diff --git a/global/templates/base/under_construction.html b/global/templates/base/under_construction.html new file mode 100644 index 0000000..fbda7c6 --- /dev/null +++ b/global/templates/base/under_construction.html @@ -0,0 +1,509 @@ + + + + + + Global Studies 2022 + + + + +
+

< global />

+

Global site currently under construction.

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Creative Commons License + + \ No newline at end of file diff --git a/global/urls.py b/global/urls.py new file mode 100644 index 0000000..5423f37 --- /dev/null +++ b/global/urls.py @@ -0,0 +1,22 @@ +"""global 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 path + +urlpatterns = ([ + path('admin/', admin.site.urls), + path('', include('global.apps.base.urls')) +] diff --git a/global/wsgi.py b/global/wsgi.py new file mode 100644 index 0000000..f80d3e6 --- /dev/null +++ b/global/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for global 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', 'global.settings') + +application = get_wsgi_application() diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..8919d5d --- /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', 'global.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()