Re: django charm broken or am I just doing it wrong?

2017-05-22 Thread Erik Lönroth
Hello Tim!

Thanx for interacting on the subject.

Would you be able to assist me in be able to deploy my website/django with
juju and/or improve the docs for the charm?

I am not an expert but love to help.

/Erik

Den 22 maj 2017 9:15 fm skrev "Tim Penhey" :

> 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.lonr...@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/
>> 
>>
>> * My website repo is here: 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 
>>  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@lists.ubuntu.com 
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>> 
>>
>>
>>
>>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: django charm broken or am I just doing it wrong?

2017-05-22 Thread Tim Penhey

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" > 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/


* My website repo is here: 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 
 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@lists.ubuntu.com 
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/juju






--
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: django charm broken or am I just doing it wrong?

2017-05-21 Thread John Meinel
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"  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/
>
> * My website repo is here: 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 
> 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@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju
>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju