0

I am trying to see django-jet-demo in action, i.e. https://github.com/geex-arts/django-jet-demo, but It didn't work.

  • git clone https://github.com/geex-arts/django-jet-demo.git
  • mkvirtualenv venv
  • cd django-jet-demo
  • pip install -r requirements/base.txt
  • django makemigrations

I have the errors

1- configparser.NoSectionError: No section: 'common'

If I remove config.get(..., 'common') inside application/settings.py

2- configparser.NoSectionError: No section: 'email'

If I remove config.get(..., 'email') inside application/settings.py

3- configparser.NoSectionError: No section: 'database'

How could I fix this problem? What are the steps to make django-jet-demo works? Does it work well on your computer?

UPDATE

If I modify default.conf file, I got the same first error.

[common]
secret_key='t_g&c7^(!jb*$caaeue%$t_0pdtx5z(a7v%b6#svl1&0$5h9o-'
debug=False

[email]
server_email=test@test.com
host=localhost
port=1025
user=
password=
tls=True

[database]
ENGINE=django.db.backends.mysql
NAME=capitaine
USER=root
PASSWORD=wd9598%%DD
HOST='localhost'
PORT=3306
dave
  • 93
  • 2
  • 10

1 Answers1

1

There is a file named default.conf where the values of each section are empty and you should add appropriate values for at least secret_key, server_email and the [database] section.

If you don't want to use mysql as the db backend, use sqlite instead (without the need of NAME, USER, PASSWORD etc).

Also note that you have to create this .conf file under the path:

/path/to/project/conf/project_name.conf

Of course, change project_name to your actual project's name.

nik_m
  • 11,825
  • 4
  • 43
  • 57
  • Yes, I have seen that file. Although I fill that file, I still have the same errors. I will modify the question. Did you test out `django-jet-demo`? – dave Jan 05 '18 at 14:23
  • With `default.conf` inside the question, I still have the same first error, i.e. `configparser.NoSectionError: No section: 'common'` – dave Jan 05 '18 at 14:27
  • Hmmm... If you insert `print config_path` under `config_path=...` inside the settings file, what do you get? Also try removing the single quotes from each value (i.e use `NAME=capitaine` instead of `NAME='capitaine'`). – nik_m Jan 05 '18 at 14:33
  • I got `/home/infinity/Projects/Work_Projects/django-jet-demo/conf/jet_demo.conf`. – dave Jan 05 '18 at 14:37
  • OK, so does this file `j‌​et_demo.conf` exists under this path? – nik_m Jan 05 '18 at 14:38
  • Weird, because there is no file jet_demo.conf. – dave Jan 05 '18 at 14:40
  • That's what you have to create then. This file under this path. Got it? – nik_m Jan 05 '18 at 14:42
  • Yes, this is what I have done. Thanks! Did you get the same problem? – dave Jan 05 '18 at 14:43
  • Great. I've updated my answer to reflect your changes. Let me know if it worked. – nik_m Jan 05 '18 at 14:46