Bartosz Stebel | f5b1a21 | 2023-02-04 23:47:44 +0100 | [diff] [blame] | 1 | #: Mailman Core default API Path |
| 2 | MAILMAN_REST_API_URL = 'http://localhost:8001' |
| 3 | #: Mailman Core API user |
| 4 | MAILMAN_REST_API_USER = 'restadmin' |
| 5 | #: Mailman Core API user's password. |
| 6 | MAILMAN_REST_API_PASS = 'restpass' |
| 7 | #: Mailman Core Shared archiving key. This value is set in the : |
| 8 | #: mailman-hyperkitty's configuration file. |
| 9 | MAILMAN_ARCHIVER_KEY = 'SecretArchiverAPIKey' |
| 10 | #: Host for Mailman Core, from where Hyperkitty will accept connections |
| 11 | #: for archiving. |
| 12 | MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1') |
| 13 | |
| 14 | #: Base URL where Django/Mailman-web would be listening for requests. Used by |
| 15 | #: Mailman Core for fetching templates. |
| 16 | POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8000' |
| 17 | |
| 18 | #: Use gravatar in HyperKitty and Postorius. |
| 19 | #: If disabled django_gravatar can be removed from INSTALLED_APPS: |
| 20 | #: INSTALLED_APPS.remove('django_gravatar') |
| 21 | HYPERKITTY_ENABLE_GRAVATAR = True |
| 22 | |
| 23 | #: Filter visible Mailing Lists based on the current host being used to serve. |
| 24 | FILTER_VHOST = False |
| 25 | |
| 26 | #: Sender in Emails sent out by Postorius. |
| 27 | DEFAULT_FROM_EMAIL = 'postorius@localhost' |
| 28 | |
| 29 | |
| 30 | #: Django Allauth |
| 31 | ACCOUNT_AUTHENTICATION_METHOD = "username_email" |
| 32 | ACCOUNT_EMAIL_REQUIRED = True |
| 33 | ACCOUNT_EMAIL_VERIFICATION = "mandatory" |
| 34 | ACCOUNT_UNIQUE_EMAIL = True |
| 35 | |
| 36 | #: Protocol for URLs generated for authentication, like email |
| 37 | #: confirmation. |
| 38 | ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https" |
| 39 | |
| 40 | |
| 41 | #: Extra configuration for Social auth. For these configuration to be used. |
| 42 | #: each of the social account providers must be first added in INSTALLED_APPS. |
| 43 | #: See :py:data:`mailman_web.settings.base.INSTALLED_APPS` for more |
| 44 | #: configuration. |
| 45 | SOCIALACCOUNT_PROVIDERS = { |
| 46 | 'openid': { |
| 47 | 'SERVERS': [ |
| 48 | dict(id='yahoo', |
| 49 | name='Yahoo', |
| 50 | openid_url='http://me.yahoo.com'), |
| 51 | ], |
| 52 | }, |
| 53 | 'google': { |
| 54 | 'SCOPE': ['profile', 'email'], |
| 55 | 'AUTH_PARAMS': {'access_type': 'online'}, |
| 56 | }, |
| 57 | 'facebook': { |
| 58 | 'METHOD': 'oauth2', |
| 59 | 'SCOPE': ['email'], |
| 60 | 'FIELDS': [ |
| 61 | 'email', |
| 62 | 'name', |
| 63 | 'first_name', |
| 64 | 'last_name', |
| 65 | 'locale', |
| 66 | 'timezone', |
| 67 | ], |
| 68 | 'VERSION': 'v2.4', |
| 69 | }, |
| 70 | } |
| 71 | |
| 72 | |
| 73 | #: django-compressor |
| 74 | #: https://pypi.python.org/pypi/django_compressor |
| 75 | COMPRESS_PRECOMPILERS = ( |
| 76 | ('text/x-scss', 'sassc -t compressed {infile} {outfile}'), |
| 77 | ('text/x-sass', 'sassc -t compressed {infile} {outfile}'), |
| 78 | ) |
| 79 | |
| 80 | |
| 81 | # Social auth |
| 82 | # |
| 83 | #: Authentication backends for Django to be used. |
| 84 | AUTHENTICATION_BACKENDS = ( |
| 85 | 'django.contrib.auth.backends.ModelBackend', |
| 86 | 'allauth.account.auth_backends.AuthenticationBackend', |
| 87 | ) |
| 88 | |
| 89 | # |
| 90 | # Full-text search engine |
| 91 | # |
| 92 | #: Django-Haystack connection parameters. |
| 93 | HAYSTACK_CONNECTIONS = { |
| 94 | 'default': { |
| 95 | 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', |
| 96 | 'PATH': "fulltext_index", |
| 97 | # You can also use the Xapian engine, it's faster and more accurate, |
| 98 | # but requires another library. |
| 99 | # http://django-haystack.readthedocs.io/en/v2.4.1/installing_search_engines.html#xapian |
| 100 | # Example configuration for Xapian: |
| 101 | # 'ENGINE': 'xapian_backend.XapianEngine' |
| 102 | }, |
| 103 | } |
| 104 | |
| 105 | |
| 106 | # Asynchronous tasks |
| 107 | # |
| 108 | #: Django Q connection parameters. |
| 109 | Q_CLUSTER = { |
| 110 | 'retry': 360, |
| 111 | 'timeout': 300, |
| 112 | 'save_limit': 100, |
| 113 | 'orm': 'default', |
| 114 | } |
| 115 | |
| 116 | #: On a production setup, setting COMPRESS_OFFLINE to True will bring a |
| 117 | #: significant performance improvement, as CSS files will not need to be |
| 118 | #: recompiled on each requests. It means running an additional "compress" |
| 119 | #: management command after each code upgrade. |
| 120 | #: http://django-compressor.readthedocs.io/en/latest/usage/#offline-compression |
| 121 | COMPRESS_OFFLINE = True |
| 122 | |
| 123 | # Needed for debug mode |
| 124 | # INTERNAL_IPS = ('127.0.0.1',) |