# 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.

The djang plugin also creates a superuser with the a unique password.
You can find out the password with the following command:
```
    manage.py 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
    * Username for auto generated account. 
    * The password is fixed and must be changed, you can find it in the README.md

* 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

* 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"
    },

```
