added support for user profiles
This commit is contained in:
parent
eeb74027eb
commit
1f314f1c20
8 changed files with 137 additions and 32 deletions
|
@ -10,14 +10,12 @@ For the full list of settings and their values, see
|
|||
https://docs.djangoproject.com/en/5.1/ref/settings/
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
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/5.1/howto/deployment/checklist/
|
||||
|
||||
|
@ -30,13 +28,13 @@ DEBUG = bool(os.environ.get("DEBUG", default=0))
|
|||
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS", "127.0.0.1").split(",")
|
||||
CORS_ALLOWED_ORIGINS = ["http://localhost:3000"]
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
"django.contrib.admin",
|
||||
"django.contrib.auth",
|
||||
"django.contrib.contenttypes",
|
||||
"corsheaders",
|
||||
"django.contrib.sessions",
|
||||
"django.contrib.messages",
|
||||
"django.contrib.staticfiles",
|
||||
|
@ -44,7 +42,7 @@ INSTALLED_APPS = [
|
|||
"rest_framework.authtoken",
|
||||
"knox",
|
||||
"movie_manager",
|
||||
"corsheaders",
|
||||
"users",
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
@ -78,7 +76,6 @@ TEMPLATES = [
|
|||
|
||||
WSGI_APPLICATION = "movienight.wsgi.application"
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
|
||||
|
||||
|
@ -95,7 +92,6 @@ DATABASES = {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
|
||||
|
||||
|
@ -114,7 +110,6 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||
},
|
||||
]
|
||||
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/5.1/topics/i18n/
|
||||
|
||||
|
@ -131,7 +126,6 @@ OMDB_API_KEY = os.environ.get("OMDB_API_KEY")
|
|||
# Django Rest Framework
|
||||
REST_FRAMEWORK = {
|
||||
"DEFAULT_AUTHENTICATION_CLASSES": [
|
||||
#'rest_framework.authentication.SessionAuthentication',
|
||||
"knox.auth.TokenAuthentication",
|
||||
],
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue