:py:mod:`own_comments.settings` =============================== .. py:module:: own_comments.settings .. autoapi-nested-parse:: This module leverages on pydantic to provide a unique place to define the backend configuration. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: own_comments.settings.Settings Attributes ~~~~~~~~~~ .. autoapisummary:: own_comments.settings.settings .. py:class:: Settings Bases: :py:obj:`pydantic.BaseSettings` These are the backend settings for _own-comments_ To modify the default value, place a ``.env`` file in the current dir when launching the backend. .. py:class:: Config .. py:attribute:: env_file .. py:attribute:: SQLALCHEMY_DATABASE_URL :annotation: :str A URL supported by SQLAlchemy. Refer to `their docs `_ to see the different options. ``sqlite:////somewhere/on/your/computer/comments.db`` is probably a good choice .. py:attribute:: ADMIN_USERNAME :annotation: :str = admin Username of the admin. Needs to be used for with basic HTTP auth for privileged endpoints. .. py:attribute:: ADMIN_PASS :annotation: :str = pass Password of the admin. Needs to be used for with basic HTTP auth for privileged endpoints. .. py:attribute:: AUTO_APPROVE_NEW_THREADS :annotation: :bool = True Whether newly posted comments are automatically approved by default. .. py:attribute:: ALLOW_ORIGIN_REGEX :annotation: :str = .* A python regex to allow origin (CORS stuff). .. py:attribute:: URL_PREFIX :annotation: = If your own-comments instance does not lie at the root of the webserver, specify it here to ensure redirects work properly. .. py:attribute:: SMTP_SERVER :annotation: :Optional[str] SMTP server for sending email notifications to the admin .. py:attribute:: SMTP_PORT :annotation: :Optional[str] SMTP server port .. py:attribute:: SMTP_LOGIN :annotation: :Optional[str] SMTP username .. py:attribute:: SMTP_PASS :annotation: :Optional[str] SMTP password .. py:attribute:: SMTP_FROM :annotation: :Optional[str] The email or name that should be used to populate the "from" field of sent emails .. py:attribute:: SMTP_TO :annotation: :Optional[str] The email that should be used to populate the "to" field of sent emails .. py:method:: warn_default_value(cls, v: str, field: pydantic.fields.ModelField) .. py:data:: settings