diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 33c678a..4526da4 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,7 +5,10 @@ - + + + + @@ -57,20 +61,20 @@ - { + "keyToString": { + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "WebServerToolWindowFactoryState": "false", + "last_opened_file_path": "C:/Users/willi/PycharmProjects/sinkhole/src/sinkhole/settings.py", + "node.js.detected.package.eslint": "true", + "node.js.detected.package.tslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "rest.client.default.execution.environment": "development", + "settings.editor.selected.configurable": "com.jetbrains.django.DjangoModulesConfigurable" } -}]]> +} + + + + + diff --git a/src/oauth_handler/__init__.py b/src/oauth_handler/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/oauth_handler/admin.py b/src/oauth_handler/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/src/oauth_handler/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/src/oauth_handler/apps.py b/src/oauth_handler/apps.py new file mode 100644 index 0000000..4c45bd9 --- /dev/null +++ b/src/oauth_handler/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class OauthHandlerConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'oauth_handler' diff --git a/src/oauth_handler/migrations/__init__.py b/src/oauth_handler/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/oauth_handler/models.py b/src/oauth_handler/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/src/oauth_handler/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/src/oauth_handler/templates/oauth_handler/base.html b/src/oauth_handler/templates/oauth_handler/base.html new file mode 100644 index 0000000..06ab032 --- /dev/null +++ b/src/oauth_handler/templates/oauth_handler/base.html @@ -0,0 +1,31 @@ + + + + + + + {% block bootstrap_header %} + + {% endblock bootstrap_header %} + {% block title %}{% endblock title %} + {% block head %} + {% endblock head %} + + + {% block body %} +
+ +
+ {% endblock body %} + {% block bootstrap_footer %} + + {% endblock bootstrap_footer %} + + \ No newline at end of file diff --git a/src/oauth_handler/templates/oauth_handler/callback.html b/src/oauth_handler/templates/oauth_handler/callback.html new file mode 100644 index 0000000..2466b0c --- /dev/null +++ b/src/oauth_handler/templates/oauth_handler/callback.html @@ -0,0 +1,9 @@ +{% extends 'oauth_handler/base.html' %} + +{% block title %}{{ title_string }}{% endblock title %} + +{% block body %} +
+

If you are not redirected in a few seconds, please click here.

+
+{% endblock body %} \ No newline at end of file diff --git a/src/oauth_handler/tests.py b/src/oauth_handler/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/src/oauth_handler/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/src/oauth_handler/urls.py b/src/oauth_handler/urls.py new file mode 100644 index 0000000..e2b38bd --- /dev/null +++ b/src/oauth_handler/urls.py @@ -0,0 +1,7 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.home, name='oauth-home'), + path('callback/', views.callback) +] \ No newline at end of file diff --git a/src/oauth_handler/views.py b/src/oauth_handler/views.py new file mode 100644 index 0000000..837224e --- /dev/null +++ b/src/oauth_handler/views.py @@ -0,0 +1,20 @@ +from django.shortcuts import render + + +# Create your views here. +def home(request): + return render( + request, + 'oauth_handler/base.html', + context={} + ) + + +def callback(request): + return render( + request, + 'oauth_handler/callback.html', + context={ + 'title_string': "This is a test. This is only, a test." + } + ) diff --git a/src/sinkhole/settings.py b/src/sinkhole/settings.py index 2b9e9dd..e2713af 100644 --- a/src/sinkhole/settings.py +++ b/src/sinkhole/settings.py @@ -31,6 +31,7 @@ ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ + 'oauth_handler.apps.OauthHandlerConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', diff --git a/src/sinkhole/urls.py b/src/sinkhole/urls.py index 3aba4f0..19a5879 100644 --- a/src/sinkhole/urls.py +++ b/src/sinkhole/urls.py @@ -14,8 +14,9 @@ Including another URLconf 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin -from django.urls import path +from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), + path('oauth/', include('oauth_handler.urls')) ]