django charm broken or am I just doing it wrong?
Tim Penhey
tim.penhey at canonical.com
Mon May 22 07:15:04 UTC 2017
Hmm.. I kinda do, but haven't touched it for a long time.
I also use the subordinate charm method of delivering the webapp to the
charm.
I found that to use the charm properly you had to have the settings for
the django project be a directory rather than a simple .py file.
Tim
On 22/05/17 04:15, John Meinel wrote:
> I believe Tim Penhey makes active use of the python-django charm, but
> it's possible he uses it in a different fashion.
>
> John
> =:->
>
> On May 21, 2017 14:25, "Erik Lönroth" <erik.lonroth at gmail.com
> <mailto:erik.lonroth at gmail.com>> wrote:
>
> Hello!
>
> I'm trying out the django charm to deploy a django website I was
> going to try to create with juju.
>
> * I followed the instructions here:
> https://jujucharms.com/python-django/
> <https://jujucharms.com/python-django/>
>
> * My website repo is here: https://github.com/erik78se/dsite
> <https://github.com/erik78se/dsite>
>
> It has installed the website from github but there is an error:
>
> unit-dsite-1: 12:22:13 INFO unit.dsite/1.pgsql-relation-changed 0
> upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> unit-dsite-1: 12:22:14 DEBUG unit.dsite/1.juju-log pgsql:2: found
> django admin: /usr/bin/django-admin
> unit-dsite-1: 12:22:14 DEBUG unit.dsite/1.juju-log pgsql:2:
> PYTHONPATH=/srv/dsite/../ /usr/bin/django-admin syncdb --noinput
> --settings=dsite.settings
> unit-dsite-1: 12:22:14 ERROR unit.dsite/1.juju-log pgsql:2:
> status=1, output=Traceback (most recent call last):
> File "/usr/bin/django-admin", line 5, in <module>
> management.execute_from_command_line()
> File
> "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 399, in execute_from_command_line
> utility.execute()
> File
> "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 392, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
> File
> "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 261, in fetch_command
> commands = get_commands()
> File
> "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 107, in get_commands
> apps = settings.INSTALLED_APPS
> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py",
> line 54, in __getattr__
> self._setup(name)
> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py",
> line 49, in _setup
> self._wrapped = Settings(settings_module)
> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py",
> line 132, in __init__
> % (self.SETTINGS_MODULE, e)
> ImportError: Could not import settings 'dsite.settings' (Is it on
> sys.path? Is there an import error in the settings file?): No module
> named dsite.settings
>
> unit-dsite-1: 12:22:14 ERROR juju.worker.uniter.operation hook
> "pgsql-relation-changed" failed: exit status 1
> unit-dsite-1: 12:22:14 INFO juju.worker.uniter awaiting error
> resolution for "relation-changed" hook
>
> As I'm not sure if I'm doing anything wrong or the charm is broken,
> I wonder what your suggestion is in how to resolve this issue or if
> I'm just doing it wrong.
>
> /Erik Lönroth
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com <mailto:Juju at lists.ubuntu.com>
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
> <https://lists.ubuntu.com/mailman/listinfo/juju>
>
>
>
More information about the Juju
mailing list