Coverage for tests/settings.py: 100%

18 statements  

« prev     ^ index     » next       coverage.py v7.3.4, created at 2024-01-20 17:58 +0000

1""" 

2Generated by 'django-admin startproject' using Django 3.2.22. 

3 

4For more information on this file, see 

5https://docs.djangoproject.com/en/3.2/topics/settings/ 

6 

7For the full list of settings and their values, see 

8https://docs.djangoproject.com/en/3.2/ref/settings/ 

9""" 

10 

11import os 

12from pathlib import Path 

13 

14# Set default terminal width for help outputs - necessary for 

15# testing help output in CI environments. 

16os.environ["TERMINAL_WIDTH"] = "80" 

17 

18# Build paths inside the project like this: BASE_DIR / 'subdir'. 

19BASE_DIR = Path(__file__).resolve().parent.parent 

20 

21 

22# Quick-start development settings - unsuitable for production 

23# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ 

24 

25# SECURITY WARNING: keep the secret key used in production secret! 

26SECRET_KEY = "django-insecure-$druy$m$nio-bkagw_%=@(1w)q0=k^mk_5sfk3zi9#4v!%mh*u" 

27 

28# SECURITY WARNING: don't run with debug turned on in production! 

29DEBUG = True 

30 

31ALLOWED_HOSTS = [] 

32 

33 

34# Application definition 

35 

36INSTALLED_APPS = [ 

37 "django_typer.tests.test_app", 

38 "django_typer", 

39 "django.contrib.admin", 

40 "django.contrib.auth", 

41 "django.contrib.contenttypes", 

42 "django.contrib.sessions", 

43 "django.contrib.messages", 

44 "django.contrib.staticfiles", 

45] 

46 

47MIDDLEWARE = [ 

48 "django.middleware.security.SecurityMiddleware", 

49 "django.contrib.sessions.middleware.SessionMiddleware", 

50 "django.middleware.common.CommonMiddleware", 

51 "django.middleware.csrf.CsrfViewMiddleware", 

52 "django.contrib.auth.middleware.AuthenticationMiddleware", 

53 "django.contrib.messages.middleware.MessageMiddleware", 

54 "django.middleware.clickjacking.XFrameOptionsMiddleware", 

55] 

56 

57 

58TEMPLATES = [ 

59 { 

60 "BACKEND": "django.template.backends.django.DjangoTemplates", 

61 "DIRS": [], 

62 "APP_DIRS": True, 

63 "OPTIONS": { 

64 "context_processors": [ 

65 "django.template.context_processors.debug", 

66 "django.template.context_processors.request", 

67 "django.contrib.auth.context_processors.auth", 

68 "django.contrib.messages.context_processors.messages", 

69 ], 

70 }, 

71 }, 

72] 

73 

74 

75# Database 

76# https://docs.djangoproject.com/en/3.2/ref/settings/#databases 

77 

78DATABASES = { 

79 "default": { 

80 "ENGINE": "django.db.backends.sqlite3", 

81 "NAME": BASE_DIR / "db.sqlite3", 

82 } 

83} 

84 

85 

86# Password validation 

87# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators 

88 

89AUTH_PASSWORD_VALIDATORS = [ 

90 { 

91 "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", 

92 }, 

93 { 

94 "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator", 

95 }, 

96 { 

97 "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator", 

98 }, 

99 { 

100 "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", 

101 }, 

102] 

103 

104 

105# Internationalization 

106# https://docs.djangoproject.com/en/3.2/topics/i18n/ 

107 

108LANGUAGE_CODE = "en-us" 

109# LANGUAGE_CODE = 'de' 

110 

111 

112TIME_ZONE = "UTC" 

113 

114USE_TZ = True 

115 

116 

117# Static files (CSS, JavaScript, Images) 

118# https://docs.djangoproject.com/en/3.2/howto/static-files/ 

119 

120STATIC_URL = "/static/" 

121 

122# Default primary key field type 

123# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field 

124 

125DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" 

126 

127 

128SETTINGS_FILE = 1