Commit 179097b6 authored by David Haynes's avatar David Haynes 🙆
Browse files

Add in go_forward

parent 267806e3
......@@ -15,3 +15,5 @@ htmlcov/
__pycache__/
.vscode
go/sourceme.sh
.DS_STORE
node_modules/
......@@ -32,11 +32,11 @@
},
"django": {
"hashes": [
"sha256:97886b8a13bbc33bfeba2ff133035d3eca014e2309dff2b6da0bdfc0b8656613",
"sha256:e900b73beee8977c7b887d90c6c57d68af10066b9dac898e1eaf0f82313de334"
"sha256:0c5b65847d00845ee404bbc0b4a85686f15eb3001ffddda3db4e9baa265bf136",
"sha256:68aeea369a8130259354b6ba1fa9babe0c5ee6bced505dea4afcd00f765ae38b"
],
"index": "pypi",
"version": "==2.0.7"
"version": "==2.0.8"
},
"django-cas-client": {
"hashes": [
......@@ -132,10 +132,10 @@
"develop": {
"astroid": {
"hashes": [
"sha256:0a0c484279a5f08c9bcedd6fa9b42e378866a7dcc695206b92d59dc9f2d9760d",
"sha256:218e36cf8d98a42f16214e8670819ce307fa707d1dcf7f9af84c7aede1febc7f"
"sha256:a48b57ede295c3188ef5c84273bc2a8eadc46e4cbb001eae0d49fb5d1fabbb19",
"sha256:d066cdeec5faeb51a4be5010da612680653d844b57afd86a5c8315f2f801b4cc"
],
"version": "==2.0.1"
"version": "==2.0.2"
},
"coverage": {
"hashes": [
......@@ -226,19 +226,19 @@
},
"pylint": {
"hashes": [
"sha256:248a7b19138b22e6390cba71adc0cb03ac6dd75a25d3544f03ea1728fa20e8f4",
"sha256:9cd70527ef3b099543eeabeb5c80ff325d86b477aa2b3d49e264e12d12153bc8"
"sha256:0edfec21270725c5aa8e8d8d06ef5666f766e0e748ed2f1ab23624727303b935",
"sha256:4cadcaa4f1fb19123d4baa758d9fbe6286c5b3aa513af6ea42a2d51d405db205"
],
"index": "pypi",
"version": "==2.0.0"
"version": "==2.1.0"
},
"pylint-django": {
"hashes": [
"sha256:70a723115a9649d6082f6ef09209ff299ce5b90c19005e351f7eb62889888694",
"sha256:ff10fbf6e0ab207fbb8ec26f5b6a3f4fa604233b38182ccda038a08ba1b8ba80"
"sha256:5c5a20c443b4e70fdc8c47e42cff8ce79c953954e918f8e559f6e1d05a971585",
"sha256:70f2b5397aa2468373fcf87d64a700b359050e905e56e2dbaf954e6edb04c593"
],
"index": "pypi",
"version": "==0.11.1"
"version": "==2.0"
},
"pylint-plugin-utils": {
"hashes": [
......@@ -253,6 +253,42 @@
],
"version": "==1.11.0"
},
"typed-ast": {
"hashes": [
"sha256:0948004fa228ae071054f5208840a1e88747a357ec1101c17217bfe99b299d58",
"sha256:10703d3cec8dcd9eef5a630a04056bbc898abc19bac5691612acba7d1325b66d",
"sha256:1f6c4bd0bdc0f14246fd41262df7dfc018d65bb05f6e16390b7ea26ca454a291",
"sha256:25d8feefe27eb0303b73545416b13d108c6067b846b543738a25ff304824ed9a",
"sha256:29464a177d56e4e055b5f7b629935af7f49c196be47528cc94e0a7bf83fbc2b9",
"sha256:2e214b72168ea0275efd6c884b114ab42e316de3ffa125b267e732ed2abda892",
"sha256:3e0d5e48e3a23e9a4d1a9f698e32a542a4a288c871d33ed8df1b092a40f3a0f9",
"sha256:519425deca5c2b2bdac49f77b2c5625781abbaf9a809d727d3a5596b30bb4ded",
"sha256:57fe287f0cdd9ceaf69e7b71a2e94a24b5d268b35df251a88fef5cc241bf73aa",
"sha256:668d0cec391d9aed1c6a388b0d5b97cd22e6073eaa5fbaa6d2946603b4871efe",
"sha256:68ba70684990f59497680ff90d18e756a47bf4863c604098f10de9716b2c0bdd",
"sha256:6de012d2b166fe7a4cdf505eee3aaa12192f7ba365beeefaca4ec10e31241a85",
"sha256:79b91ebe5a28d349b6d0d323023350133e927b4de5b651a8aa2db69c761420c6",
"sha256:8550177fa5d4c1f09b5e5f524411c44633c80ec69b24e0e98906dd761941ca46",
"sha256:898f818399cafcdb93cbbe15fc83a33d05f18e29fb498ddc09b0214cdfc7cd51",
"sha256:94b091dc0f19291adcb279a108f5d38de2430411068b219f41b343c03b28fb1f",
"sha256:a26863198902cda15ab4503991e8cf1ca874219e0118cbf07c126bce7c4db129",
"sha256:a8034021801bc0440f2e027c354b4eafd95891b573e12ff0418dec385c76785c",
"sha256:bc978ac17468fe868ee589c795d06777f75496b1ed576d308002c8a5756fb9ea",
"sha256:c05b41bc1deade9f90ddc5d988fe506208019ebba9f2578c622516fd201f5863",
"sha256:c9b060bd1e5a26ab6e8267fd46fc9e02b54eb15fffb16d112d4c7b1c12987559",
"sha256:edb04bdd45bfd76c8292c4d9654568efaedf76fe78eb246dde69bdb13b2dad87",
"sha256:f19f2a4f547505fe9072e15f6f4ae714af51b5a681a97f187971f50c283193b6"
],
"version": "==1.1.0"
},
"typing": {
"hashes": [
"sha256:3a887b021a77b292e151afb75323dea88a7bc1b3dfa92176cff8e44c8b68bddf",
"sha256:b2c689d54e1144bbcfd191b0832980a21c2dbcf7b5ff7a66248a60c90e951eb8",
"sha256:d400a9344254803a2368533e4533a4200d21eb7b6b729c173bc38201a74db3f2"
],
"version": "==3.6.4"
},
"wrapt": {
"hashes": [
"sha256:d4d560d479f2c21e1b5443bbd15fe7ec4b37fe7e53d335d3b9b0a7b1226fe3c6"
......
"""
settings/urls.py
The URLs of the project and their associated view that requests are routed to.
"""
# Django Imports
from django.urls import path, re_path, include
from django.contrib import admin
from django.views.decorators.cache import cache_page
from django.views.generic import TemplateView
# App Imports
from . import views
from cas import views as cas_views
# Third Party
from rest_framework import routers
router = routers.DefaultRouter()
router.register(r'golinks', views.URLViewSet, base_name="golinks")
# This function attempts to import an admin module in each installed
# application. Such modules are expected to register models with the admin.
admin.autodiscover()
urlpatterns = [
# Root API URL
path("api", include(router.urls)),
# Authentication URLs
path('auth/login/', cas_views.login, name='cas_login'),
path('auth/logout/', cas_views.logout, {'next_page': '/'}, name='cas_logout'),
# /admin - Administrator interface.
path('admin/', admin.site.urls, name='go_admin'),
path('auth/', include('rest_framework.urls'))
# # /view/<short> - View URL data. Cached for 15 minutes
# re_path(r'^view/(?P<short>([\U00010000-\U0010ffff][\U0000200D]?)+)$',
# cache_page(60 * 15)(go.views.view), name='view'),
# re_path(r'^view/(?P<short>[-\w]+)$',
# cache_page(60 * 15)(go.views.view), name='view'),
# # Redirection regex.
# re_path(r'^(?P<short>([\U00010000-\U0010ffff][\U0000200D]?)+)$',
# go.views.redirection, name='redirection'),
# re_path(r'^(?P<short>[-\w]+)$',
# go.views.redirection, name='redirection'),
]
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class GoForwardConfig(AppConfig):
name = 'go_forward'
from django.db import models
# Create your models here.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.2/css/bulma.min.css">
<title>Django DRF - React : Quickstart - Valentino G. - www.valentinog.com</title>
</head>
<body>
<section class="section">
<div class="container">
<div id="app" class="columns">
<!-- React -->
</div>
</div>
</section>
</body>
</html>
from django.test import TestCase
# Create your tests here.
from django.urls import path
from . import views
urlpatterns = [
path('', views.index),
]
from django.shortcuts import render
def index(request):
return render(request, 'index.html')
......@@ -26,6 +26,8 @@ else:
}
# STANDALONE VARS
# /go/go
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# You can generate a secret key from the following link:
......@@ -74,7 +76,8 @@ TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.join(BASE_DIR, 'templates')
os.path.join(BASE_DIR, 'templates'),
'./go/go_forward/templates/'
],
'APP_DIRS': True,
'OPTIONS': {
......@@ -124,6 +127,7 @@ INSTALLED_APPS = (
'django.contrib.staticfiles',
'django.contrib.admin',
'go',
'go_forward',
# Third party
'crispy_forms',
'cas',
......
"""
settings/urls.py
The URLs of the project and their associated view that requests are routed to.
"""
# Django Imports
import django.contrib.auth.views
from django.urls import path, re_path, include
from django.contrib import admin
from django.views.decorators.cache import cache_page
from django.views.generic import TemplateView
# App Imports
from go import views
from cas import views as cas_views
# Third Party
from rest_framework import routers
router = routers.DefaultRouter()
router.register(r'golinks', views.URLViewSet, base_name="golinks")
# This function attempts to import an admin module in each installed
# application. Such modules are expected to register models with the admin.
admin.autodiscover()
from django.urls import path, include
urlpatterns = [
# Root API URL
path("", include(router.urls)),
# Authentication URLs
path('auth/login/', cas_views.login, name='cas_login'),
path('auth/logout/', cas_views.logout, {'next_page': '/'}, name='cas_logout'),
# /admin - Administrator interface.
path('admin/', admin.site.urls, name='go_admin'),
path('auth/', include('rest_framework.urls'))
# # /view/<short> - View URL data. Cached for 15 minutes
# re_path(r'^view/(?P<short>([\U00010000-\U0010ffff][\U0000200D]?)+)$',
# cache_page(60 * 15)(go.views.view), name='view'),
# re_path(r'^view/(?P<short>[-\w]+)$',
# cache_page(60 * 15)(go.views.view), name='view'),
# # Redirection regex.
# re_path(r'^(?P<short>([\U00010000-\U0010ffff][\U0000200D]?)+)$',
# go.views.redirection, name='redirection'),
# re_path(r'^(?P<short>[-\w]+)$',
# go.views.redirection, name='redirection'),
path('', include('go.urls')),
path('', include('go_forward.urls')),
]
.begin {
margin-top: 6rem;
}
.landing-card {
box-shadow: 0 0 4px 2px rgba(0, 0, 0, .2);
}
.pointer:hover,
.shadow-hover {
cursor: pointer
}
.shadow-hover {
position: relative;
transition: all .5s cubic-bezier(.165, .84, .44, 1)
}
.shadow-hover:after {
content: "";
box-shadow: 0 0 16px 2px rgba(0, 0, 0, .2);
border-radius: inherit;
opacity: 0;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
transition: opacity .5s cubic-bezier(.165, .84, .44, 1)
}
.shadow-hover:focus:after,
.shadow-hover:hover:after {
opacity: 1
}
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 2100 2100" enable-background="new 0 0 2100 2100" xml:space="preserve">
<g>
<polygon fill="none" points="1299,908.2 1299,1221.6 1295.3,1223.7 1023,1380.4 1023,1446.7 1299,1606.1 1351.5,1636.4
1680,1446.7 1680,1126.7 1680,1067.5 1352.2,878.2 1352.2,878.2 1351.6,877.9 1351.6,877.9 1350.2,878.7 1300.4,907.5
1299.2,908.2 1299.1,908.2 "/>
<polygon fill="none" points="988.4,1046.6 1019.7,1064.7 1023.8,1067.1 1019.7,1064.7 "/>
<polygon fill="#FBB03B" points="1352.1,560.5 1352,560.4 1024.3,749.6 1077.1,780.1 1214.7,859.5 1299,908.1 1299.2,908.2
1300.4,907.5 1350.2,878.7 1351.6,877.9 1351.6,877.9 1351.6,877.9 1352.2,878.2 1352.2,878.2 1680,1067.5 1680,1126.7
1680,1446.7 1351.5,1636.4 1299,1606.1 1023,1446.7 1023,1380.4 1023,1221.6 1023,1067.5 1023.8,1067.1 1019.7,1064.7
988.4,1046.6 749.1,908.4 749.1,908.4 749,908.6 749,1220.9 749,1379.7 749,1538.6 749,1605.6 1352,1954.1 1955,1605.6 1955,908.6
"/>
<polygon fill="#FBB03B" points="749.1,908.4 749.1,908.4 749.1,908.4 "/>
<polygon fill="#FBB03B" points="1680,1067.5 1352.2,878.2 1352.2,878.2 1352.2,878.2 "/>
<polygon fill="#FBB03B" points="1351.6,877.9 1350.2,878.7 1351.6,877.9 "/>
<polygon fill="#006837" points="749.2,908.4 749.1,908.4 988.4,1046.6 855.9,969.9 "/>
<polygon fill="#006837" points="855.9,969.9 749.3,908.3 749.2,908.4 "/>
<polygon fill="#006837" points="1024,749.4 1023.9,749.4 1023.9,749.4 1024.3,749.6 1024.3,749.6 "/>
<polygon fill="#006837" points="749.2,908.4 749.2,908.3 749.1,908.4 749.1,908.4 "/>
<polygon fill="#006837" points="749.3,908.3 749.2,908.2 749.2,908.3 749.2,908.4 "/>
<polygon fill="#006837" points="1214.6,859.5 1299,908.2 1299,908.1 1214.7,859.5 1077.1,780.1 1024.3,749.6 1024.3,749.6
1077.1,780.1 "/>
<polygon fill="#006837" points="1299.1,908.2 1299.2,908.2 1299,908.1 1299,908.2 "/>
<polygon fill="#006837" points="988.4,1046.6 1019.7,1064.7 1023.8,1067.1 1023,1067.5 1023,1221.6 1023,1380.4 1295.3,1223.7
1299,1221.6 1299,908.2 1214.6,859.5 1077.1,780.1 1024.3,749.6 749.3,908.3 855.9,969.9 "/>
<polygon fill="#006837" points="749,1220.9 420,1031.6 420,657.1 420,652.4 748.5,462.8 752.7,465.1 1066.2,646.1 1203.8,566.7
1341.4,487.2 1027.9,306.2 748.6,145 145,493.5 145,1190.5 749,1538.6 749,1379.7 "/>
</g>
</svg>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment