{"action":"closed","issue":{"url":"https://api.github.com/repos/nephila/djangocms-installer/issues/234","repository_url":"https://api.github.com/repos/nephila/djangocms-installer","labels_url":"https://api.github.com/repos/nephila/djangocms-installer/issues/234/labels{/name}","comments_url":"https://api.github.com/repos/nephila/djangocms-installer/issues/234/comments","events_url":"https://api.github.com/repos/nephila/djangocms-installer/issues/234/events","html_url":"https://github.com/nephila/djangocms-installer/issues/234","id":131319762,"number":234,"title":"Installer sets wrong settings for DATABASES for sqlite","user":{"login":"zanderle","id":5232693,"avatar_url":"https://avatars.githubusercontent.com/u/5232693?v=3","gravatar_id":"","url":"https://api.github.com/users/zanderle","html_url":"https://github.com/zanderle","followers_url":"https://api.github.com/users/zanderle/followers","following_url":"https://api.github.com/users/zanderle/following{/other_user}","gists_url":"https://api.github.com/users/zanderle/gists{/gist_id}","starred_url":"https://api.github.com/users/zanderle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanderle/subscriptions","organizations_url":"https://api.github.com/users/zanderle/orgs","repos_url":"https://api.github.com/users/zanderle/repos","events_url":"https://api.github.com/users/zanderle/events{/privacy}","received_events_url":"https://api.github.com/users/zanderle/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-04T11:33:13Z","updated_at":"2016-02-04T14:35:06Z","closed_at":"2016-02-04T14:35:06Z","body":"The installer sets the `DATABASES` dictionary slightly wrong for sqlite.\r\n\r\nIt sets\r\n\r\n```python\r\nDATABASES = {\r\n    'default': {\r\n        'CONN_MAX_AGE': '0',\r\n        'ENGINE': 'django.db.backends.sqlite3',\r\n        'HOST': 'localhost',\r\n        'NAME': 'project.db',\r\n        'PASSWORD': '',\r\n        'PORT': '',\r\n        'USER': ''\r\n    }\r\n}\r\n```\r\n\r\ninstead of \r\n\r\n```python\r\nDATABASES = {\r\n    'default': {\r\n        'CONN_MAX_AGE': 0,\r\n        'ENGINE': 'django.db.backends.sqlite3',\r\n        'HOST': 'localhost',\r\n        'NAME': 'project.db',\r\n        'PASSWORD': '',\r\n        'PORT': '',\r\n        'USER': ''\r\n    }\r\n}\r\n```\r\n\r\n`CONN_MAX_AGE` value should be an integer, not a string.\r\n\r\nThe problem seems to be [here](https://github.com/nephila/djangocms-installer/blob/d4899ad4cbed89b4c82c411241e38ac031472ee8/djangocms_installer/django/__init__.py#L371)\r\n\r\nThe exception that follows this mistake (after running djangocms command):\r\n\r\n```bash\r\nCreating the project\r\nTraceback (most recent call last):\r\n  File \"manage.py\", line 10, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/Users/zanderle/.virtualenvs/cms-test/lib/python2.7/site-packages/django/core/management/__init__.py\", line 354, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/Users/zanderle/.virtualenvs/cms-test/lib/python2.7/site-packages/django/core/management/__init__.py\", line 346, in execute\r\n    self.fetch_command(subcommand).run_from_argv(self.argv)\r\n  File \"/Users/zanderle/.virtualenvs/cms-test/lib/python2.7/site-packages/django/core/management/base.py\", line 394, in run_from_argv\r\n    self.execute(*args, **cmd_options)\r\n  File \"/Users/zanderle/.virtualenvs/cms-test/lib/python2.7/site-packages/django/core/management/base.py\", line 445, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/Users/zanderle/.virtualenvs/cms-test/lib/python2.7/site-packages/django/core/management/commands/migrate.py\", line 93, in handle\r\n    executor = MigrationExecutor(connection, self.migration_progress_callback)\r\n  File \"/Users/zanderle/.virtualenvs/cms-test/lib/python2.7/site-packages/django/db/migrations/executor.py\", line 19, in __init__\r\n    self.loader = MigrationLoader(self.connection)\r\n  File \"/Users/zanderle/.virtualenvs/cms-test/lib/python2.7/site-packages/django/db/migrations/loader.py\", line 47, in __init__\r\n    self.build_graph()\r\n  File \"/Users/zanderle/.virtualenvs/cms-test/lib/python2.7/site-packages/django/db/migrations/loader.py\", line 191, in build_graph\r\n    self.applied_migrations = recorder.applied_migrations()\r\n  File \"/Users/zanderle/.virtualenvs/cms-test/lib/python2.7/site-packages/django/db/migrations/recorder.py\", line 59, in applied_migrations\r\n    self.ensure_schema()\r\n  File \"/Users/zanderle/.virtualenvs/cms-test/lib/python2.7/site-packages/django/db/migrations/recorder.py\", line 49, in ensure_schema\r\n    if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):\r\n  File \"/Users/zanderle/.virtualenvs/cms-test/lib/python2.7/site-packages/django/db/backends/base/base.py\", line 162, in cursor\r\n    cursor = self.make_debug_cursor(self._cursor())\r\n  File \"/Users/zanderle/.virtualenvs/cms-test/lib/python2.7/site-packages/django/db/backends/base/base.py\", line 135, in _cursor\r\n    self.ensure_connection()\r\n  File \"/Users/zanderle/.virtualenvs/cms-test/lib/python2.7/site-packages/django/db/backends/base/base.py\", line 130, in ensure_connection\r\n    self.connect()\r\n  File \"/Users/zanderle/.virtualenvs/cms-test/lib/python2.7/site-packages/django/db/backends/base/base.py\", line 114, in connect\r\n    self.close_at = None if max_age is None else time.time() + max_age\r\nTypeError: unsupported operand type(s) for +: 'float' and 'str'\r\n```\r\n\r\nThanks to @jarshwah for helping to pinpoint the problem."}}