Add local config
This commit is contained in:
parent
09fb27a48c
commit
95376290d6
11
README.md
11
README.md
|
|
@ -56,7 +56,12 @@ npm run dev
|
|||
* In the .idea/vbv_lernwelt.iml file change the module type to "PYTHON_MODULE".
|
||||
* Add django facet in "Project Structure".
|
||||
* Run configuration with "Python -> server.py" to have async debugging support.
|
||||
### Optional
|
||||
* Install the EnvFile Plugin
|
||||
* Install the tailwind css Plugin from Jetbrains
|
||||
|
||||
### Optional
|
||||
|
||||
#### Install the EnvFile Plugin
|
||||
|
||||

|
||||
|
||||
#### Install the tailwind css Plugin from Jetbrains
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import path from 'path'
|
||||
import { fileURLToPath, URL } from 'url'
|
||||
import {fileURLToPath, URL} from 'url'
|
||||
|
||||
import {defineConfig, loadEnv} from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
|
@ -32,6 +32,7 @@ export default ({mode}) => {
|
|||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'^.*': process.env.VITE_PROXY_TARGET_BASE,
|
||||
'/sso': process.env.VITE_PROXY_TARGET_BASE,
|
||||
'/api': process.env.VITE_PROXY_TARGET_BASE,
|
||||
'/todo': process.env.VITE_PROXY_TARGET_BASE,
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 80 KiB |
Binary file not shown.
|
|
@ -129,7 +129,10 @@ AUTH_USER_MODEL = "core.User"
|
|||
# https://docs.djangoproject.com/en/dev/ref/settings/#login-redirect-url
|
||||
# LOGIN_REDIRECT_URL = "users:redirect"
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#login-url
|
||||
LOGIN_URL = "/sso/login/"
|
||||
|
||||
# FIXME make configurable!?
|
||||
# LOGIN_URL = "/sso/login/"
|
||||
LOGIN_URL = "/login/"
|
||||
|
||||
ALLOW_LOCAL_LOGIN = env.bool("IT_ALLOW_LOCAL_LOGIN", default=False)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
from django.contrib.auth.base_user import BaseUserManager
|
||||
from django.contrib.auth.models import AbstractUser
|
||||
from django.db import models
|
||||
|
||||
|
||||
class UserManager(models.Manager):
|
||||
class UserManager(BaseUserManager):
|
||||
def create_or_update_by_email(self, email: str, first_name: str, last_name: str, username: str) -> tuple[
|
||||
AbstractUser, bool]:
|
||||
# create or sync user with OpenID Data
|
||||
|
|
|
|||
|
|
@ -2,15 +2,14 @@ from django.contrib.auth.models import AbstractUser
|
|||
from django.db import models
|
||||
from django.db.models import JSONField
|
||||
|
||||
from vbv_lernwelt.core.managers import UserManager
|
||||
|
||||
|
||||
class User(AbstractUser):
|
||||
"""
|
||||
Default custom user model for VBV Lernwelt.
|
||||
If adding fields that need to be filled at user signup,
|
||||
"""
|
||||
objects = UserManager()
|
||||
# FIXME: look into it...
|
||||
# objects = UserManager()
|
||||
|
||||
|
||||
class SecurityRequestResponseLog(models.Model):
|
||||
|
|
|
|||
Loading…
Reference in New Issue