-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #242 from uw-it-aca/django-upgrade
Django upgrade
- Loading branch information
Showing
110 changed files
with
1,800 additions
and
2,758 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,9 @@ spotseeker_web | |
# IDE files | ||
.idea/ | ||
|
||
# vscode files | ||
.vscode/ | ||
|
||
# pipenv | ||
Pipfile | ||
Pipfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
autoscaling: | ||
enabled: false | ||
minReplicas: 1 | ||
maxReplicas: 1 | ||
ingress: | ||
enabled: true | ||
tls: | ||
spotseeker: | ||
secretName: dev.api.scout.uw.edu-ingress-cert | ||
hosts: | ||
- dev.api.scout.uw.edu | ||
hosts: | ||
spotseeker: | ||
host: dev.api.scout.uw.edu | ||
paths: | ||
- "/" | ||
annotations: | ||
cert-manager.io/cluster-issuer: letsencrypt | ||
nginx.ingress.kubernetes.io/client-body-buffer-size: "16K" | ||
nginx.ingress.kubernetes.io/proxy-body-size: "20m" | ||
nginx.ingress.kubernetes.io/proxy-read-timeout: "500" | ||
nginx.ingress.kubernetes.io/ssl-ciphers: "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256" | ||
lifecycle: | ||
enabled: true | ||
preStop: | ||
enabled: true | ||
affinity: | ||
podsSpanNodes: true | ||
readiness: | ||
enabled: true | ||
securityPolicy: | ||
enabled: true | ||
externalService: | ||
enabled: true | ||
name: spotseeker-dev-db-service | ||
type: ClusterIP | ||
serviceAddress: 172.18.0.196 | ||
servicePort: 3306 | ||
database: | ||
engine: mysql | ||
name: api_dev | ||
hostname: spotseeker-dev-db-service | ||
secretName: dev.api.scout.uw.edu-sql-secrets | ||
repo: spotseeker | ||
instance: dev | ||
image: | ||
repository: gcr.io/uwit-mci-axdd/spotseeker | ||
tag: IMAGE_TAG | ||
memcached: | ||
enabled: true | ||
replicaCount: 1 | ||
updateStrategy: | ||
type: RollingUpdate | ||
gcsCredentials: | ||
mounted: true | ||
secretName: dev.api.scout.uw.edu-gc-service-credentials | ||
cronjob: | ||
enabled: false | ||
jobs: | ||
- name: sync-techloan | ||
schedule: "0,15,30,45 * * * *" | ||
command: ["/scripts/management_command.sh"] | ||
args: ["sync_techloan"] | ||
daemon: | ||
enabled: false # cronjob is probably more appropriate | ||
daemons: | ||
- name: sync-techloan | ||
replicaCount: 1 | ||
command: ["/scripts/management_daemon.sh"] | ||
args: ["--delay", "300", "sync_techloan"] | ||
environmentVariables: | ||
- name: AUTH_MODULE | ||
value: oauth | ||
- name: CLUSTER_CNAME | ||
value: dev.api.scout.uw.edu | ||
- name: ENV | ||
value: dev | ||
- name: WEBSERVER | ||
value: nginx | ||
- name: CACHE_MAX_ENTRIES | ||
value: "1000" | ||
- name: CACHE_TIMEOUT | ||
value: "86400" | ||
externalSecrets: | ||
enabled: true | ||
secrets: | ||
- name: dev.api.scout.uw.edu-secrets | ||
externalKey: axdd/kv/data/scout/dev-api/secrets | ||
data: | ||
- name: django-secret | ||
property: django-secret | ||
- name: spotseeker-auth-admins | ||
property: spotseeker-auth-admins | ||
- name: storage-bucket-name | ||
property: storage-bucket-name | ||
- name: storage-project-id | ||
property: storage-project-id | ||
- name: spotseeker-techloan-url | ||
property: spotseeker-techloan-url | ||
- name: spotseeker-web-server-host | ||
property: spotseeker-web-server-host | ||
- name: spotseeker-web-oauth-key | ||
property: spotseeker-web-oauth-key | ||
- name: spotseeker-web-oauth-secret | ||
property: spotseeker-web-oauth-secret | ||
- name: spotseeker-web-oauth-user | ||
property: spotseeker-web-oauth-user | ||
- name: dev.api.scout.uw.edu-sql-secrets | ||
externalKey: axdd/kv/data/scout/common/sql-secrets | ||
data: | ||
- name: username | ||
property: username | ||
- name: password | ||
property: password | ||
- name: dev.api.scout.uw.edu-gc-service-credentials | ||
externalKey: axdd/kv/data/scout/common/gc-service-credentials | ||
data: | ||
- name: credentials.json | ||
property: credentials.json | ||
environmentVariablesSecrets: | ||
djangoSecret: | ||
name: DJANGO_SECRET | ||
secretName: dev.api.scout.uw.edu-secrets | ||
secretKey: django-secret | ||
spotseekerAuthAdmins: | ||
name: SPOTSEEKER_AUTH_ADMINS | ||
secretName: dev.api.scout.uw.edu-secrets | ||
secretKey: spotseeker-auth-admins | ||
storageBucketName: | ||
name: STORAGE_BUCKET_NAME | ||
secretName: dev.api.scout.uw.edu-secrets | ||
secretKey: storage-bucket-name | ||
storageProjectId: | ||
name: STORAGE_PROJECT_ID | ||
secretName: dev.api.scout.uw.edu-secrets | ||
secretKey: storage-project-id | ||
spotseekerTechloanUrl: | ||
name: SPOTSEEKER_TECHLOAN_URL | ||
secretName: dev.api.scout.uw.edu-secrets | ||
secretKey: spotseeker-techloan-url | ||
spotseekerWebServerHost: | ||
name: SPOTSEEKER_WEB_SERVER_HOST | ||
secretName: dev.api.scout.uw.edu-secrets | ||
secretKey: spotseeker-web-server-host | ||
spotseekerWebOauthKey: | ||
name: SPOTSEEKER_WEB_OAUTH_KEY | ||
secretName: dev.api.scout.uw.edu-secrets | ||
secretKey: spotseeker-web-oauth-key | ||
spotseekerWebOauthSecret: | ||
name: SPOTSEEKER_WEB_OAUTH_SECRET | ||
secretName: dev.api.scout.uw.edu-secrets | ||
secretKey: spotseeker-web-oauth-secret | ||
spotseekerWebOauthUser: | ||
name: SPOTSEEKER_WEB_OAUTH_USER | ||
secretName: dev.api.scout.uw.edu-secrets | ||
secretKey: spotseeker-web-oauth-user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,24 @@ | ||
"""docker URL Configuration | ||
# Copyright 2024 UW-IT, University of Washington | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
The `urlpatterns` list routes URLs to views. For more information please see: | ||
https://docs.djangoproject.com/en/1.11/topics/http/urls/ | ||
Examples: | ||
Function views | ||
1. Add an import: from my_app import views | ||
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') | ||
Class-based views | ||
1. Add an import: from other_app.views import Home | ||
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') | ||
Including another URLconf | ||
1. Import the include() function: from django.conf.urls import url, include | ||
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) | ||
""" | ||
from .base_urls import * | ||
from django.conf import settings | ||
from django.conf.urls import url, include | ||
from django.urls import path, include | ||
from django.contrib import admin | ||
|
||
urlpatterns = [ | ||
url(r'^auth/', include('oauth_provider.urls')), | ||
url(r'^api/', include('spotseeker_server.urls')), | ||
url(r'^', include('django_prometheus.urls')), # add here for django 1.11 compatibility | ||
urlpatterns += [ | ||
path("api/", include("spotseeker_server.urls")), | ||
path( | ||
"auth/", include("oauth2_provider.urls", namespace="oauth2_provider") | ||
), | ||
] | ||
|
||
if settings.DEBUG: | ||
from django.contrib import admin | ||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns | ||
|
||
urlpatterns += [ | ||
url(r'^admin/doc/', include('django.contrib.admindocs.urls')), | ||
url(r'^admin/', include(admin.site.urls)), | ||
path("admin/doc/", include("django.contrib.admindocs.urls")), | ||
path("admin/", admin.site.urls), | ||
] | ||
|
||
urlpatterns += staticfiles_urlpatterns() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# these two can be upgraded when django gets an update | ||
mysqlclient~=1.3 | ||
django-prometheus~=2.0 | ||
# this is temporary for testing migrations in upgrade | ||
django-extensions==2.2.* | ||
-e . |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,8 @@ | |
[email protected]: use the same forms as used for REST. | ||
""" | ||
|
||
from importlib import import_module | ||
from django.db import models | ||
from django.contrib import admin | ||
from django.conf import settings | ||
from django.contrib.auth.admin import UserAdmin | ||
from spotseeker_server.models import * | ||
from spotseeker_server.forms.spot import SpotForm, SpotExtendedInfoForm | ||
from spotseeker_server.forms.item import ItemForm, ItemExtendedInfoForm | ||
|
@@ -117,7 +115,7 @@ class SpotExtendedInfoAdmin(admin.ModelAdmin): | |
|
||
|
||
admin.site.register(SpotType) | ||
admin.site.register(TrustedOAuthClient) | ||
admin.site.register(Client, UserAdmin) | ||
|
||
|
||
class ItemAdmin(admin.ModelAdmin): | ||
|
Empty file.
Oops, something went wrong.