Metadata-Version: 2.4
Name: ocyan.plugin.django
Version: 1.3.2rc4
Summary: Installs Django and provides some essential configuration
Home-page: https://git.mandelblog.com/mandel-plugins/ocyan.plugin.django
Author: Mandel
Author-email: info@mandelblog.com
Classifier: Framework :: Ocyan
Classifier: Environment :: Plugins
Requires-Python: >=3.12,<3.13
Description-Content-Type: text/markdown
Requires-Dist: Django<6,>=5
Requires-Dist: ocyan.core>=1.2.7
Requires-Dist: ocyan.main>=2.0.1
Requires-Dist: whitenoise
Provides-Extra: spooler
Requires-Dist: uwsgidecorators-fallback; extra == "spooler"
Provides-Extra: test
Requires-Dist: wheel; extra == "test"
Requires-Dist: pylint-django; extra == "test"
Requires-Dist: isort; extra == "test"
Requires-Dist: ruff; extra == "test"
Requires-Dist: vdt.versionplugin.wheel; extra == "test"
Requires-Dist: coverage; extra == "test"
Provides-Extra: screenshots
Requires-Dist: ocyan.plugin.testing>=2.0.0; extra == "screenshots"
Requires-Dist: oxyan.themes>=2.0.2; extra == "screenshots"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Mandel plugin Django

Installation
-------------
Add `ocyan.plugin.django` to your project dependencies.


Desxcription
------------
This plugin installs django and provides some essential configuration, like
the email address django uses to mail with and to.

This package never creates privileged users automatically. Projects that need
an administrator must explicitly invoke the controlled bootstrap command:
```
export OCYAN_DJANGO_ALLOW_SUPERUSER_BOOTSTRAP=1
export INITIAL_ADMIN_PASSWORD='provide through your approved secret mechanism'
manage.py bootstrap_superuser --username admin --email admin@example.invalid --password-env INITIAL_ADMIN_PASSWORD
```
The command never changes an existing account and never prints its password.


Changing TIME_ZONE settings
--------------------------
Add ( "time_zone": "your/time/zone" ) to django settings in ocyan.json



Configuration
-------------
Settings you need to configure in ocyan.json

##### Required fields:

* name
    * Project name, better to use letters only

* username
    * Project metadata only. It does not create an account.

* domain
    * Live domain name for your project.
    * It is necessary to use www. ex: www.mandelblog.com

* email_from
    * The e-mail address from which you'll be sending.

* email_to
    * Target e-mail addresses (Enter a list if you want to have multiple emails) like this: [¨email-1¨,¨email-2¨,¨email-3¨]. When using just 1 email enter it as a string like: "info@mandelblog.com"
    * Sending the order email as a bcc to this email
    * Sending the contact form to this email as a default (can be changed in the contact_form plugin).

##### Optional fields:

* email_host
    * Outgoing email server (SMTP)

* email_port
    * The default email port is 587

* email_host_user
    * Username to connect to the mail server

* email_host_password
    * Password to connect to the mail server
    * No password is supplied by this package. Configure it through the
      project's approved secret mechanism.

* email_use_tls
    * Use TLS to connect to the mail server.
    * Choose between true or false
    * The default value is true

* language_code
    * To choose the main language
    * Default language is Dutch (¨ nl ¨)

* description
    * Your project description
    * This field is optional



Example: 

```json
    "django": {
      "multilanguage": false,
      "description": "Nang Treats ♥♥♥ A rebuild of Nang treats using Slurpee goodness.\n\n",
      "name": "Nangtreats",
      "short_name": "shabby",
      "secret_key": "doe maar iets",
      "domain": "www.mandelblog.com",
      "username": "mandel",
      "base_url": "https://www.mandelblog.com",
      "email_from": "info@mandelblog.com",
      "email_to": "info@mandelblog.com",
      "language_code": "nl"
    },

```

uWSGI spooler support is optional. Install `ocyan.plugin.django[spooler]` only
on a host that explicitly enables `django.enable_spooler`.
