librelist archives

« back to archive

Fwd: Re: [geonode] problem with Django installation

Fwd: Re: [geonode] problem with Django installation

From:
Garey Mills
Date:
2011-01-28 @ 19:21
David -

     When I make the changes you suggest, I get this

[Fri Jan 28 11:17:48 2011] [error] [client 128.32.99.171] ImportError: 
Could not import settings 
'/opt/geonode/src/GeoNodePy/geonode/settings.py' (Is it on sys.path? 
Does it have syntax errors?): Import by filename is not supported.

      No permissions problems that I can see. Import by filename?

Garey

-------- Original Message --------
Subject: 	Re: [geonode] problem with Django installation
Date: 	Thu, 27 Jan 2011 15:54:07 -0500
From: 	David Winslow <dwinslow@opengeo.org>
Reply-To: 	geonode@librelist.com
To: 	geonode@librelist.com



Use:
   import site
   site.addsitedir("/opt/geonode/lib/python2.6/site-packages")

Rather than:
   import sys
   sys.path.append("/opt/geonode")

The directory that you get from unpacking geonode does not directly 
contain python modules, and uses some tricks (pth files etc) which afaik 
are not caught when using sys.path.append.

Hope this helps.

--
David Winslow
OpenGeo - http://opengeo.org/


On Thu, Jan 27, 2011 at 2:01 PM, Garey Mills 
<gmills@library.berkeley.edu <mailto:gmills@library.berkeley.edu>> wrote:

    Hi -

         I followed the instructions found in
    docs.geonode.org/1.0/deployment.html
    <http://docs.geonode.org/1.0/deployment.html> and found myself
    construction a
    django.wsgi file that looks like this:

    import os
    import sys

    path = '/opt/geonode'
    if path not in sys.path:
         sys.path.append(path)

    os.environ['DJANGO_SETTINGS_MODULE'] =
    '/opt/geonode/src/GeoNodePy/geonode/settings.py'

    import django.core.handlers.wsgi
    application = django.core.handlers.wsgi.WSGIHandler()


    I am getting the error:

    [Thu Jan 27 10:57:40 2011] [error] [client *************]   File
    "/opt/geonode/django.wsgi", line 10, in ?
    [Thu Jan 27 10:57:40 2011] [error] [client *************]     import
    django.core.handlers.wsgi
    [Thu Jan 27 10:57:40 2011] [error] [client *************] ImportError:
    No module named django.core.handlers.wsgi


    Anybody have an idea why django.core.handlers.wsgi is not being found?

    Garey Mills
    Library Systems Office
    UC Berkeley

Re: Re: [geonode] problem with Django installation

From:
David Winslow
Date:
2011-01-28 @ 19:25
Sorry I didn't catch this the first time around: the DJANGO_SETTINGS_MODULE
should be a Python module name, not a file path.  Change that line to:

os.environ['DJANGO_SETTINGS_MODULE'] =
'geonode.settings'

Hope this helps.

--
David Winslow
OpenGeo - http://opengeo.org/

On Fri, Jan 28, 2011 at 2:21 PM, Garey Mills <gmills@library.berkeley.edu>wrote:

>  David -
>
>     When I make the changes you suggest, I get this
>
> [Fri Jan 28 11:17:48 2011] [error] [client 128.32.99.171] ImportError:
> Could not import settings '/opt/geonode/src/GeoNodePy/geonode/settings.py'
> (Is it on sys.path? Does it have syntax errors?): Import by filename is not
> supported.
>
>      No permissions problems that I can see. Import by filename?
>
> Garey
>
> -------- Original Message --------  Subject: Re: [geonode] problem with
> Django installation  Date: Thu, 27 Jan 2011 15:54:07 -0500  From: David
> Winslow <dwinslow@opengeo.org> <dwinslow@opengeo.org>  Reply-To:
> geonode@librelist.com  To: geonode@librelist.com
>
>
> Use:
>   import site
>   site.addsitedir("/opt/geonode/lib/python2.6/site-packages")
>
>  Rather than:
>   import sys
>   sys.path.append("/opt/geonode")
>
>  The directory that you get from unpacking geonode does not directly
> contain python modules, and uses some tricks (pth files etc) which afaik are
> not caught when using sys.path.append.
>
>  Hope this helps.
>
>  --
> David Winslow
> OpenGeo - http://opengeo.org/
>
>
> On Thu, Jan 27, 2011 at 2:01 PM, Garey Mills <gmills@library.berkeley.edu>wrote:
>
>> Hi -
>>
>>     I followed the instructions found in
>> docs.geonode.org/1.0/deployment.html and found myself construction a
>> django.wsgi file that looks like this:
>>
>> import os
>> import sys
>>
>> path = '/opt/geonode'
>> if path not in sys.path:
>>     sys.path.append(path)
>>
>> os.environ['DJANGO_SETTINGS_MODULE'] =
>> '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>>
>> import django.core.handlers.wsgi
>> application = django.core.handlers.wsgi.WSGIHandler()
>>
>>
>> I am getting the error:
>>
>> [Thu Jan 27 10:57:40 2011] [error] [client *************]   File
>> "/opt/geonode/django.wsgi", line 10, in ?
>> [Thu Jan 27 10:57:40 2011] [error] [client *************]     import
>> django.core.handlers.wsgi
>> [Thu Jan 27 10:57:40 2011] [error] [client *************] ImportError:
>> No module named django.core.handlers.wsgi
>>
>>
>> Anybody have an idea why django.core.handlers.wsgi is not being found?
>>
>> Garey Mills
>> Library Systems Office
>> UC Berkeley
>>
>
>

Re: [geonode] problem with Django installation

From:
Garey Mills
Date:
2011-01-28 @ 21:48
David -

     That worked, but now I have this:

     GEOSERVER_CREDENTIALS = "geoserver_admin", 
open(path_extrapolate('../../geoserver_token')).readline()[0:-1]
[Fri Jan 28 13:45:43 2011] [error] [client 128.32.99.171] IOError: 
[Errno 2] No such file or directory: 
'/opt/geonode/src/GeoNodePy/../../geoserver_token'

     Where is geoserver_token? Is is something I have to create?

Garey

On 1/28/2011 11:25 AM, David Winslow wrote:
> Sorry I didn't catch this the first time around: the 
> DJANGO_SETTINGS_MODULE should be a Python module name, not a file 
> path.  Change that line to:
>
> os.environ['DJANGO_SETTINGS_MODULE'] =
> 'geonode.settings'
>
> Hope this helps.
>
> --
> David Winslow
> OpenGeo - http://opengeo.org/
>
> On Fri, Jan 28, 2011 at 2:21 PM, Garey Mills 
> <gmills@library.berkeley.edu <mailto:gmills@library.berkeley.edu>> wrote:
>
>     David -
>
>         When I make the changes you suggest, I get this
>
>     [Fri Jan 28 11:17:48 2011] [error] [client 128.32.99.171]
>     ImportError: Could not import settings
>     '/opt/geonode/src/GeoNodePy/geonode/settings.py' (Is it on
>     sys.path? Does it have syntax errors?): Import by filename is not
>     supported.
>
>          No permissions problems that I can see. Import by filename?
>
>     Garey
>
>     -------- Original Message --------
>     Subject: 	Re: [geonode] problem with Django installation
>     Date: 	Thu, 27 Jan 2011 15:54:07 -0500
>     From: 	David Winslow <dwinslow@opengeo.org>
>     <mailto:dwinslow@opengeo.org>
>     Reply-To: 	geonode@librelist.com <mailto:geonode@librelist.com>
>     To: 	geonode@librelist.com <mailto:geonode@librelist.com>
>
>
>
>     Use:
>       import site
>       site.addsitedir("/opt/geonode/lib/python2.6/site-packages")
>
>     Rather than:
>       import sys
>       sys.path.append("/opt/geonode")
>
>     The directory that you get from unpacking geonode does not
>     directly contain python modules, and uses some tricks (pth files
>     etc) which afaik are not caught when using sys.path.append.
>
>     Hope this helps.
>
>     --
>     David Winslow
>     OpenGeo - http://opengeo.org/
>
>
>     On Thu, Jan 27, 2011 at 2:01 PM, Garey Mills
>     <gmills@library.berkeley.edu <mailto:gmills@library.berkeley.edu>>
>     wrote:
>
>         Hi -
>
>             I followed the instructions found in
>         docs.geonode.org/1.0/deployment.html
>         <http://docs.geonode.org/1.0/deployment.html> and found myself
>         construction a
>         django.wsgi file that looks like this:
>
>         import os
>         import sys
>
>         path = '/opt/geonode'
>         if path not in sys.path:
>             sys.path.append(path)
>
>         os.environ['DJANGO_SETTINGS_MODULE'] =
>         '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>
>         import django.core.handlers.wsgi
>         application = django.core.handlers.wsgi.WSGIHandler()
>
>
>         I am getting the error:
>
>         [Thu Jan 27 10:57:40 2011] [error] [client *************]   File
>         "/opt/geonode/django.wsgi", line 10, in ?
>         [Thu Jan 27 10:57:40 2011] [error] [client *************]    
>         import
>         django.core.handlers.wsgi
>         [Thu Jan 27 10:57:40 2011] [error] [client *************]
>         ImportError:
>         No module named django.core.handlers.wsgi
>
>
>         Anybody have an idea why django.core.handlers.wsgi is not
>         being found?
>
>         Garey Mills
>         Library Systems Office
>         UC Berkeley
>
>
>

Re: [geonode] problem with Django installation

From:
David Winslow
Date:
2011-01-28 @ 22:16
geoserver_token should be a file containing some random string; it's used to
tag internal requests between the Django app and GeoServer.  If you are
using the bootstrap.py script included in the GeoNode tarball one should be
randomly generated as part of the setup process... otherwise you can really
just open up the file and type in the first thing to come to mind, or do
something like:

$ base64 <( head -c 30 /dev/random ) > /path/to/geoserver_token

--
David Winslow
OpenGeo - http://opengeo.org/

On Fri, Jan 28, 2011 at 4:48 PM, Garey Mills <gmills@library.berkeley.edu>wrote:

>  David -
>
>     That worked, but now I have this:
>
>     GEOSERVER_CREDENTIALS = "geoserver_admin",
> open(path_extrapolate('../../geoserver_token')).readline()[0:-1]
> [Fri Jan 28 13:45:43 2011] [error] [client 128.32.99.171] IOError: [Errno
> 2] No such file or directory:
> '/opt/geonode/src/GeoNodePy/../../geoserver_token'
>
>     Where is geoserver_token? Is is something I have to create?
>
> Garey
>
>
> On 1/28/2011 11:25 AM, David Winslow wrote:
>
> Sorry I didn't catch this the first time around: the DJANGO_SETTINGS_MODULE
> should be a Python module name, not a file path.  Change that line to:
>
>  os.environ['DJANGO_SETTINGS_MODULE'] =
> 'geonode.settings'
>
>  Hope this helps.
>
>  --
> David Winslow
> OpenGeo - http://opengeo.org/
>
>  On Fri, Jan 28, 2011 at 2:21 PM, Garey Mills <gmills@library.berkeley.edu
> > wrote:
>
>>  David -
>>
>>     When I make the changes you suggest, I get this
>>
>> [Fri Jan 28 11:17:48 2011] [error] [client 128.32.99.171] ImportError:
>> Could not import settings '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>> (Is it on sys.path? Does it have syntax errors?): Import by filename is not
>> supported.
>>
>>      No permissions problems that I can see. Import by filename?
>>
>> Garey
>>
>> -------- Original Message --------  Subject: Re: [geonode] problem with
>> Django installation  Date: Thu, 27 Jan 2011 15:54:07 -0500  From: David
>> Winslow <dwinslow@opengeo.org> <dwinslow@opengeo.org>  Reply-To:
>> geonode@librelist.com  To: geonode@librelist.com
>>
>>
>> Use:
>>   import site
>>   site.addsitedir("/opt/geonode/lib/python2.6/site-packages")
>>
>>  Rather than:
>>   import sys
>>   sys.path.append("/opt/geonode")
>>
>>  The directory that you get from unpacking geonode does not directly
>> contain python modules, and uses some tricks (pth files etc) which afaik are
>> not caught when using sys.path.append.
>>
>>  Hope this helps.
>>
>>  --
>> David Winslow
>> OpenGeo - http://opengeo.org/
>>
>>
>> On Thu, Jan 27, 2011 at 2:01 PM, Garey Mills <gmills@library.berkeley.edu
>> > wrote:
>>
>>> Hi -
>>>
>>>     I followed the instructions found in
>>> docs.geonode.org/1.0/deployment.html and found myself construction a
>>> django.wsgi file that looks like this:
>>>
>>> import os
>>> import sys
>>>
>>> path = '/opt/geonode'
>>> if path not in sys.path:
>>>     sys.path.append(path)
>>>
>>> os.environ['DJANGO_SETTINGS_MODULE'] =
>>> '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>>>
>>> import django.core.handlers.wsgi
>>> application = django.core.handlers.wsgi.WSGIHandler()
>>>
>>>
>>> I am getting the error:
>>>
>>> [Thu Jan 27 10:57:40 2011] [error] [client *************]   File
>>> "/opt/geonode/django.wsgi", line 10, in ?
>>> [Thu Jan 27 10:57:40 2011] [error] [client *************]     import
>>> django.core.handlers.wsgi
>>> [Thu Jan 27 10:57:40 2011] [error] [client *************] ImportError:
>>> No module named django.core.handlers.wsgi
>>>
>>>
>>> Anybody have an idea why django.core.handlers.wsgi is not being found?
>>>
>>> Garey Mills
>>> Library Systems Office
>>> UC Berkeley
>>>
>>
>>
>

Re: [geonode] problem with Django installation

From:
Garey Mills
Date:
2011-01-28 @ 22:33
David -

     I'm also getting this when I try to run geonetwork:

java.io.FileNotFoundException: 
/tmp/jetty-0.0.0.0-8080-geonetwork.war-_geonetwork-any-/webinf/WEB-INF/config.xml
(No such file or directory)


Garey


On 1/28/2011 2:16 PM, David Winslow wrote:
> geoserver_token should be a file containing some random string; it's 
> used to tag internal requests between the Django app and GeoServer. 
>  If you are using the bootstrap.py script included in the GeoNode 
> tarball one should be randomly generated as part of the setup 
> process... otherwise you can really just open up the file and type in 
> the first thing to come to mind, or do something like:
>
> $ base64 <( head -c 30 /dev/random ) > /path/to/geoserver_token
>
> --
> David Winslow
> OpenGeo - http://opengeo.org/
>
> On Fri, Jan 28, 2011 at 4:48 PM, Garey Mills 
> <gmills@library.berkeley.edu <mailto:gmills@library.berkeley.edu>> wrote:
>
>     David -
>
>         That worked, but now I have this:
>
>         GEOSERVER_CREDENTIALS = "geoserver_admin",
>     open(path_extrapolate('../../geoserver_token')).readline()[0:-1]
>     [Fri Jan 28 13:45:43 2011] [error] [client 128.32.99.171] IOError:
>     [Errno 2] No such file or directory:
>     '/opt/geonode/src/GeoNodePy/../../geoserver_token'
>
>         Where is geoserver_token? Is is something I have to create?
>
>     Garey
>
>
>     On 1/28/2011 11:25 AM, David Winslow wrote:
>>     Sorry I didn't catch this the first time around: the
>>     DJANGO_SETTINGS_MODULE should be a Python module name, not a file
>>     path.  Change that line to:
>>
>>     os.environ['DJANGO_SETTINGS_MODULE'] =
>>     'geonode.settings'
>>
>>     Hope this helps.
>>
>>     --
>>     David Winslow
>>     OpenGeo - http://opengeo.org/
>>
>>     On Fri, Jan 28, 2011 at 2:21 PM, Garey Mills
>>     <gmills@library.berkeley.edu
>>     <mailto:gmills@library.berkeley.edu>> wrote:
>>
>>         David -
>>
>>             When I make the changes you suggest, I get this
>>
>>         [Fri Jan 28 11:17:48 2011] [error] [client 128.32.99.171]
>>         ImportError: Could not import settings
>>         '/opt/geonode/src/GeoNodePy/geonode/settings.py' (Is it on
>>         sys.path? Does it have syntax errors?): Import by filename is
>>         not supported.
>>
>>              No permissions problems that I can see. Import by filename?
>>
>>         Garey
>>
>>         -------- Original Message --------
>>         Subject: 	Re: [geonode] problem with Django installation
>>         Date: 	Thu, 27 Jan 2011 15:54:07 -0500
>>         From: 	David Winslow <dwinslow@opengeo.org>
>>         <mailto:dwinslow@opengeo.org>
>>         Reply-To: 	geonode@librelist.com <mailto:geonode@librelist.com>
>>         To: 	geonode@librelist.com <mailto:geonode@librelist.com>
>>
>>
>>
>>         Use:
>>           import site
>>           site.addsitedir("/opt/geonode/lib/python2.6/site-packages")
>>
>>         Rather than:
>>           import sys
>>           sys.path.append("/opt/geonode")
>>
>>         The directory that you get from unpacking geonode does not
>>         directly contain python modules, and uses some tricks (pth
>>         files etc) which afaik are not caught when using sys.path.append.
>>
>>         Hope this helps.
>>
>>         --
>>         David Winslow
>>         OpenGeo - http://opengeo.org/
>>
>>
>>         On Thu, Jan 27, 2011 at 2:01 PM, Garey Mills
>>         <gmills@library.berkeley.edu
>>         <mailto:gmills@library.berkeley.edu>> wrote:
>>
>>             Hi -
>>
>>                 I followed the instructions found in
>>             docs.geonode.org/1.0/deployment.html
>>             <http://docs.geonode.org/1.0/deployment.html> and found
>>             myself construction a
>>             django.wsgi file that looks like this:
>>
>>             import os
>>             import sys
>>
>>             path = '/opt/geonode'
>>             if path not in sys.path:
>>                 sys.path.append(path)
>>
>>             os.environ['DJANGO_SETTINGS_MODULE'] =
>>             '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>>
>>             import django.core.handlers.wsgi
>>             application = django.core.handlers.wsgi.WSGIHandler()
>>
>>
>>             I am getting the error:
>>
>>             [Thu Jan 27 10:57:40 2011] [error] [client *************]
>>               File
>>             "/opt/geonode/django.wsgi", line 10, in ?
>>             [Thu Jan 27 10:57:40 2011] [error] [client *************]
>>                 import
>>             django.core.handlers.wsgi
>>             [Thu Jan 27 10:57:40 2011] [error] [client *************]
>>             ImportError:
>>             No module named django.core.handlers.wsgi
>>
>>
>>             Anybody have an idea why django.core.handlers.wsgi is not
>>             being found?
>>
>>             Garey Mills
>>             Library Systems Office
>>             UC Berkeley
>>
>>
>>
>

Re: [geonode] problem with Django installation

From:
David Winslow
Date:
2011-01-28 @ 22:42
Hm, I've not seen this type of error while using Jetty before.  Perhaps the
user running Jetty does not have write permissions to the /tmp/ directory?
 You could try unpacking GeoNetwork directly (unzipping it into the webapps/
directory).  Either way though, GeoNetwork won't run properly without write
access to the web app directory; it uses an embedded database to keep
metadata.  The same goes for GeoServer.

--
David Winslow
OpenGeo - http://opengeo.org/

On Fri, Jan 28, 2011 at 5:33 PM, Garey Mills <gmills@library.berkeley.edu>wrote:

>  David -
>
>     I'm also getting this when I try to run geonetwork:
>
> java.io.FileNotFoundException: 
/tmp/jetty-0.0.0.0-8080-geonetwork.war-_geonetwork-any-/webinf/WEB-INF/config.xml
(No such file or directory)
>
>
> Garey
>
>
> On 1/28/2011 2:16 PM, David Winslow wrote:
>
> geoserver_token should be a file containing some random string; it's used
> to tag internal requests between the Django app and GeoServer.  If you are
> using the bootstrap.py script included in the GeoNode tarball one should be
> randomly generated as part of the setup process... otherwise you can really
> just open up the file and type in the first thing to come to mind, or do
> something like:
>
>  $ base64 <( head -c 30 /dev/random ) > /path/to/geoserver_token
>
>  --
> David Winslow
> OpenGeo - http://opengeo.org/
>
> On Fri, Jan 28, 2011 at 4:48 PM, Garey Mills <gmills@library.berkeley.edu>wrote:
>
>>  David -
>>
>>     That worked, but now I have this:
>>
>>     GEOSERVER_CREDENTIALS = "geoserver_admin",
>> open(path_extrapolate('../../geoserver_token')).readline()[0:-1]
>> [Fri Jan 28 13:45:43 2011] [error] [client 128.32.99.171] IOError: [Errno
>> 2] No such file or directory:
>> '/opt/geonode/src/GeoNodePy/../../geoserver_token'
>>
>>     Where is geoserver_token? Is is something I have to create?
>>
>> Garey
>>
>>
>> On 1/28/2011 11:25 AM, David Winslow wrote:
>>
>> Sorry I didn't catch this the first time around: the
>> DJANGO_SETTINGS_MODULE should be a Python module name, not a file path.
>>  Change that line to:
>>
>>  os.environ['DJANGO_SETTINGS_MODULE'] =
>> 'geonode.settings'
>>
>>  Hope this helps.
>>
>>  --
>> David Winslow
>> OpenGeo - http://opengeo.org/
>>
>>  On Fri, Jan 28, 2011 at 2:21 PM, Garey Mills <
>> gmills@library.berkeley.edu> wrote:
>>
>>>  David -
>>>
>>>     When I make the changes you suggest, I get this
>>>
>>> [Fri Jan 28 11:17:48 2011] [error] [client 128.32.99.171] ImportError:
>>> Could not import settings '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>>> (Is it on sys.path? Does it have syntax errors?): Import by filename is not
>>> supported.
>>>
>>>      No permissions problems that I can see. Import by filename?
>>>
>>> Garey
>>>
>>> -------- Original Message --------  Subject: Re: [geonode] problem with
>>> Django installation  Date: Thu, 27 Jan 2011 15:54:07 -0500  From: David
>>> Winslow <dwinslow@opengeo.org> <dwinslow@opengeo.org>  Reply-To:
>>> geonode@librelist.com  To: geonode@librelist.com
>>>
>>>
>>> Use:
>>>   import site
>>>   site.addsitedir("/opt/geonode/lib/python2.6/site-packages")
>>>
>>>  Rather than:
>>>   import sys
>>>   sys.path.append("/opt/geonode")
>>>
>>>  The directory that you get from unpacking geonode does not directly
>>> contain python modules, and uses some tricks (pth files etc) which afaik are
>>> not caught when using sys.path.append.
>>>
>>>  Hope this helps.
>>>
>>>  --
>>> David Winslow
>>> OpenGeo - http://opengeo.org/
>>>
>>>
>>> On Thu, Jan 27, 2011 at 2:01 PM, Garey Mills <
>>> gmills@library.berkeley.edu> wrote:
>>>
>>>> Hi -
>>>>
>>>>     I followed the instructions found in
>>>> docs.geonode.org/1.0/deployment.html and found myself construction a
>>>> django.wsgi file that looks like this:
>>>>
>>>> import os
>>>> import sys
>>>>
>>>> path = '/opt/geonode'
>>>> if path not in sys.path:
>>>>     sys.path.append(path)
>>>>
>>>> os.environ['DJANGO_SETTINGS_MODULE'] =
>>>> '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>>>>
>>>> import django.core.handlers.wsgi
>>>> application = django.core.handlers.wsgi.WSGIHandler()
>>>>
>>>>
>>>> I am getting the error:
>>>>
>>>> [Thu Jan 27 10:57:40 2011] [error] [client *************]   File
>>>> "/opt/geonode/django.wsgi", line 10, in ?
>>>> [Thu Jan 27 10:57:40 2011] [error] [client *************]     import
>>>> django.core.handlers.wsgi
>>>> [Thu Jan 27 10:57:40 2011] [error] [client *************] ImportError:
>>>> No module named django.core.handlers.wsgi
>>>>
>>>>
>>>> Anybody have an idea why django.core.handlers.wsgi is not being found?
>>>>
>>>> Garey Mills
>>>> Library Systems Office
>>>> UC Berkeley
>>>>
>>>
>>>
>>
>

Re: [geonode] problem with Django installation

From:
Garey Mills
Date:
2011-01-28 @ 22:23
David -

     I saw nothing in the the installation instructions about 
bootstrap.py. I see that it is in GeoNode-1.0, but where do I run it? In 
the virtualenv environment set up for the Django app?

Garey

On 1/28/2011 2:16 PM, David Winslow wrote:
> geoserver_token should be a file containing some random string; it's 
> used to tag internal requests between the Django app and GeoServer. 
>  If you are using the bootstrap.py script included in the GeoNode 
> tarball one should be randomly generated as part of the setup 
> process... otherwise you can really just open up the file and type in 
> the first thing to come to mind, or do something like:
>
> $ base64 <( head -c 30 /dev/random ) > /path/to/geoserver_token
>
> --
> David Winslow
> OpenGeo - http://opengeo.org/
>
> On Fri, Jan 28, 2011 at 4:48 PM, Garey Mills 
> <gmills@library.berkeley.edu <mailto:gmills@library.berkeley.edu>> wrote:
>
>     David -
>
>         That worked, but now I have this:
>
>         GEOSERVER_CREDENTIALS = "geoserver_admin",
>     open(path_extrapolate('../../geoserver_token')).readline()[0:-1]
>     [Fri Jan 28 13:45:43 2011] [error] [client 128.32.99.171] IOError:
>     [Errno 2] No such file or directory:
>     '/opt/geonode/src/GeoNodePy/../../geoserver_token'
>
>         Where is geoserver_token? Is is something I have to create?
>
>     Garey
>
>
>     On 1/28/2011 11:25 AM, David Winslow wrote:
>>     Sorry I didn't catch this the first time around: the
>>     DJANGO_SETTINGS_MODULE should be a Python module name, not a file
>>     path.  Change that line to:
>>
>>     os.environ['DJANGO_SETTINGS_MODULE'] =
>>     'geonode.settings'
>>
>>     Hope this helps.
>>
>>     --
>>     David Winslow
>>     OpenGeo - http://opengeo.org/
>>
>>     On Fri, Jan 28, 2011 at 2:21 PM, Garey Mills
>>     <gmills@library.berkeley.edu
>>     <mailto:gmills@library.berkeley.edu>> wrote:
>>
>>         David -
>>
>>             When I make the changes you suggest, I get this
>>
>>         [Fri Jan 28 11:17:48 2011] [error] [client 128.32.99.171]
>>         ImportError: Could not import settings
>>         '/opt/geonode/src/GeoNodePy/geonode/settings.py' (Is it on
>>         sys.path? Does it have syntax errors?): Import by filename is
>>         not supported.
>>
>>              No permissions problems that I can see. Import by filename?
>>
>>         Garey
>>
>>         -------- Original Message --------
>>         Subject: 	Re: [geonode] problem with Django installation
>>         Date: 	Thu, 27 Jan 2011 15:54:07 -0500
>>         From: 	David Winslow <dwinslow@opengeo.org>
>>         <mailto:dwinslow@opengeo.org>
>>         Reply-To: 	geonode@librelist.com <mailto:geonode@librelist.com>
>>         To: 	geonode@librelist.com <mailto:geonode@librelist.com>
>>
>>
>>
>>         Use:
>>           import site
>>           site.addsitedir("/opt/geonode/lib/python2.6/site-packages")
>>
>>         Rather than:
>>           import sys
>>           sys.path.append("/opt/geonode")
>>
>>         The directory that you get from unpacking geonode does not
>>         directly contain python modules, and uses some tricks (pth
>>         files etc) which afaik are not caught when using sys.path.append.
>>
>>         Hope this helps.
>>
>>         --
>>         David Winslow
>>         OpenGeo - http://opengeo.org/
>>
>>
>>         On Thu, Jan 27, 2011 at 2:01 PM, Garey Mills
>>         <gmills@library.berkeley.edu
>>         <mailto:gmills@library.berkeley.edu>> wrote:
>>
>>             Hi -
>>
>>                 I followed the instructions found in
>>             docs.geonode.org/1.0/deployment.html
>>             <http://docs.geonode.org/1.0/deployment.html> and found
>>             myself construction a
>>             django.wsgi file that looks like this:
>>
>>             import os
>>             import sys
>>
>>             path = '/opt/geonode'
>>             if path not in sys.path:
>>                 sys.path.append(path)
>>
>>             os.environ['DJANGO_SETTINGS_MODULE'] =
>>             '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>>
>>             import django.core.handlers.wsgi
>>             application = django.core.handlers.wsgi.WSGIHandler()
>>
>>
>>             I am getting the error:
>>
>>             [Thu Jan 27 10:57:40 2011] [error] [client *************]
>>               File
>>             "/opt/geonode/django.wsgi", line 10, in ?
>>             [Thu Jan 27 10:57:40 2011] [error] [client *************]
>>                 import
>>             django.core.handlers.wsgi
>>             [Thu Jan 27 10:57:40 2011] [error] [client *************]
>>             ImportError:
>>             No module named django.core.handlers.wsgi
>>
>>
>>             Anybody have an idea why django.core.handlers.wsgi is not
>>             being found?
>>
>>             Garey Mills
>>             Library Systems Office
>>             UC Berkeley
>>
>>
>>
>

Re: [geonode] problem with Django installation

From:
David Winslow
Date:
2011-01-28 @ 22:38
Hm, you are following the generic instructions?  Now that I look, they don't
mention bootstrap.py, probably just an oversight.  bootstrap.py is intended
to create a virtual environment for you; I don't think it will work for an
already-created one.

--
David Winslow
OpenGeo - http://opengeo.org/

On Fri, Jan 28, 2011 at 5:23 PM, Garey Mills <gmills@library.berkeley.edu>wrote:

>  David -
>
>     I saw nothing in the the installation instructions about bootstrap.py.
> I see that it is in GeoNode-1.0, but where do I run it? In the virtualenv
> environment set up for the Django app?
>
> Garey
>
>
> On 1/28/2011 2:16 PM, David Winslow wrote:
>
> geoserver_token should be a file containing some random string; it's used
> to tag internal requests between the Django app and GeoServer.  If you are
> using the bootstrap.py script included in the GeoNode tarball one should be
> randomly generated as part of the setup process... otherwise you can really
> just open up the file and type in the first thing to come to mind, or do
> something like:
>
>  $ base64 <( head -c 30 /dev/random ) > /path/to/geoserver_token
>
>  --
> David Winslow
> OpenGeo - http://opengeo.org/
>
> On Fri, Jan 28, 2011 at 4:48 PM, Garey Mills <gmills@library.berkeley.edu>wrote:
>
>>  David -
>>
>>     That worked, but now I have this:
>>
>>     GEOSERVER_CREDENTIALS = "geoserver_admin",
>> open(path_extrapolate('../../geoserver_token')).readline()[0:-1]
>> [Fri Jan 28 13:45:43 2011] [error] [client 128.32.99.171] IOError: [Errno
>> 2] No such file or directory:
>> '/opt/geonode/src/GeoNodePy/../../geoserver_token'
>>
>>     Where is geoserver_token? Is is something I have to create?
>>
>> Garey
>>
>>
>> On 1/28/2011 11:25 AM, David Winslow wrote:
>>
>> Sorry I didn't catch this the first time around: the
>> DJANGO_SETTINGS_MODULE should be a Python module name, not a file path.
>>  Change that line to:
>>
>>  os.environ['DJANGO_SETTINGS_MODULE'] =
>> 'geonode.settings'
>>
>>  Hope this helps.
>>
>>  --
>> David Winslow
>> OpenGeo - http://opengeo.org/
>>
>>  On Fri, Jan 28, 2011 at 2:21 PM, Garey Mills <
>> gmills@library.berkeley.edu> wrote:
>>
>>>  David -
>>>
>>>     When I make the changes you suggest, I get this
>>>
>>> [Fri Jan 28 11:17:48 2011] [error] [client 128.32.99.171] ImportError:
>>> Could not import settings '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>>> (Is it on sys.path? Does it have syntax errors?): Import by filename is not
>>> supported.
>>>
>>>      No permissions problems that I can see. Import by filename?
>>>
>>> Garey
>>>
>>> -------- Original Message --------  Subject: Re: [geonode] problem with
>>> Django installation  Date: Thu, 27 Jan 2011 15:54:07 -0500  From: David
>>> Winslow <dwinslow@opengeo.org> <dwinslow@opengeo.org>  Reply-To:
>>> geonode@librelist.com  To: geonode@librelist.com
>>>
>>>
>>> Use:
>>>   import site
>>>   site.addsitedir("/opt/geonode/lib/python2.6/site-packages")
>>>
>>>  Rather than:
>>>   import sys
>>>   sys.path.append("/opt/geonode")
>>>
>>>  The directory that you get from unpacking geonode does not directly
>>> contain python modules, and uses some tricks (pth files etc) which afaik are
>>> not caught when using sys.path.append.
>>>
>>>  Hope this helps.
>>>
>>>  --
>>> David Winslow
>>> OpenGeo - http://opengeo.org/
>>>
>>>
>>> On Thu, Jan 27, 2011 at 2:01 PM, Garey Mills <
>>> gmills@library.berkeley.edu> wrote:
>>>
>>>> Hi -
>>>>
>>>>     I followed the instructions found in
>>>> docs.geonode.org/1.0/deployment.html and found myself construction a
>>>> django.wsgi file that looks like this:
>>>>
>>>> import os
>>>> import sys
>>>>
>>>> path = '/opt/geonode'
>>>> if path not in sys.path:
>>>>     sys.path.append(path)
>>>>
>>>> os.environ['DJANGO_SETTINGS_MODULE'] =
>>>> '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>>>>
>>>> import django.core.handlers.wsgi
>>>> application = django.core.handlers.wsgi.WSGIHandler()
>>>>
>>>>
>>>> I am getting the error:
>>>>
>>>> [Thu Jan 27 10:57:40 2011] [error] [client *************]   File
>>>> "/opt/geonode/django.wsgi", line 10, in ?
>>>> [Thu Jan 27 10:57:40 2011] [error] [client *************]     import
>>>> django.core.handlers.wsgi
>>>> [Thu Jan 27 10:57:40 2011] [error] [client *************] ImportError:
>>>> No module named django.core.handlers.wsgi
>>>>
>>>>
>>>> Anybody have an idea why django.core.handlers.wsgi is not being found?
>>>>
>>>> Garey Mills
>>>> Library Systems Office
>>>> UC Berkeley
>>>>
>>>
>>>
>>
>

Re: [geonode] problem with Django installation

From:
Garey Mills
Date:
2011-01-28 @ 23:09
David -

     If it will work, I would be happy to recreate the virtualenv. What 
are the steps to use bootstrap.py?

Garey

On 1/28/2011 2:38 PM, David Winslow wrote:
> Hm, you are following the generic instructions?  Now that I look, they 
> don't mention bootstrap.py, probably just an oversight.  bootstrap.py 
> is intended to create a virtual environment for you; I don't think it 
> will work for an already-created one.
>
> --
> David Winslow
> OpenGeo - http://opengeo.org/
>
> On Fri, Jan 28, 2011 at 5:23 PM, Garey Mills 
> <gmills@library.berkeley.edu <mailto:gmills@library.berkeley.edu>> wrote:
>
>     David -
>
>         I saw nothing in the the installation instructions about
>     bootstrap.py. I see that it is in GeoNode-1.0, but where do I run
>     it? In the virtualenv environment set up for the Django app?
>
>     Garey
>
>
>     On 1/28/2011 2:16 PM, David Winslow wrote:
>>     geoserver_token should be a file containing some random string;
>>     it's used to tag internal requests between the Django app and
>>     GeoServer.  If you are using the bootstrap.py script included in
>>     the GeoNode tarball one should be randomly generated as part of
>>     the setup process... otherwise you can really just open up the
>>     file and type in the first thing to come to mind, or do something
>>     like:
>>
>>     $ base64 <( head -c 30 /dev/random ) > /path/to/geoserver_token
>>
>>     --
>>     David Winslow
>>     OpenGeo - http://opengeo.org/
>>
>>     On Fri, Jan 28, 2011 at 4:48 PM, Garey Mills
>>     <gmills@library.berkeley.edu
>>     <mailto:gmills@library.berkeley.edu>> wrote:
>>
>>         David -
>>
>>             That worked, but now I have this:
>>
>>             GEOSERVER_CREDENTIALS = "geoserver_admin",
>>         open(path_extrapolate('../../geoserver_token')).readline()[0:-1]
>>         [Fri Jan 28 13:45:43 2011] [error] [client 128.32.99.171]
>>         IOError: [Errno 2] No such file or directory:
>>         '/opt/geonode/src/GeoNodePy/../../geoserver_token'
>>
>>             Where is geoserver_token? Is is something I have to create?
>>
>>         Garey
>>
>>
>>         On 1/28/2011 11:25 AM, David Winslow wrote:
>>>         Sorry I didn't catch this the first time around: the
>>>         DJANGO_SETTINGS_MODULE should be a Python module name, not a
>>>         file path.  Change that line to:
>>>
>>>         os.environ['DJANGO_SETTINGS_MODULE'] =
>>>         'geonode.settings'
>>>
>>>         Hope this helps.
>>>
>>>         --
>>>         David Winslow
>>>         OpenGeo - http://opengeo.org/
>>>
>>>         On Fri, Jan 28, 2011 at 2:21 PM, Garey Mills
>>>         <gmills@library.berkeley.edu
>>>         <mailto:gmills@library.berkeley.edu>> wrote:
>>>
>>>             David -
>>>
>>>                 When I make the changes you suggest, I get this
>>>
>>>             [Fri Jan 28 11:17:48 2011] [error] [client
>>>             128.32.99.171] ImportError: Could not import settings
>>>             '/opt/geonode/src/GeoNodePy/geonode/settings.py' (Is it
>>>             on sys.path? Does it have syntax errors?): Import by
>>>             filename is not supported.
>>>
>>>                  No permissions problems that I can see. Import by
>>>             filename?
>>>
>>>             Garey
>>>
>>>             -------- Original Message --------
>>>             Subject: 	Re: [geonode] problem with Django installation
>>>             Date: 	Thu, 27 Jan 2011 15:54:07 -0500
>>>             From: 	David Winslow <dwinslow@opengeo.org>
>>>             <mailto:dwinslow@opengeo.org>
>>>             Reply-To: 	geonode@librelist.com
>>>             <mailto:geonode@librelist.com>
>>>             To: 	geonode@librelist.com <mailto:geonode@librelist.com>
>>>
>>>
>>>
>>>             Use:
>>>               import site
>>>               site.addsitedir("/opt/geonode/lib/python2.6/site-packages")
>>>
>>>             Rather than:
>>>               import sys
>>>               sys.path.append("/opt/geonode")
>>>
>>>             The directory that you get from unpacking geonode does
>>>             not directly contain python modules, and uses some
>>>             tricks (pth files etc) which afaik are not caught when
>>>             using sys.path.append.
>>>
>>>             Hope this helps.
>>>
>>>             --
>>>             David Winslow
>>>             OpenGeo - http://opengeo.org/
>>>
>>>
>>>             On Thu, Jan 27, 2011 at 2:01 PM, Garey Mills
>>>             <gmills@library.berkeley.edu
>>>             <mailto:gmills@library.berkeley.edu>> wrote:
>>>
>>>                 Hi -
>>>
>>>                     I followed the instructions found in
>>>                 docs.geonode.org/1.0/deployment.html
>>>                 <http://docs.geonode.org/1.0/deployment.html> and
>>>                 found myself construction a
>>>                 django.wsgi file that looks like this:
>>>
>>>                 import os
>>>                 import sys
>>>
>>>                 path = '/opt/geonode'
>>>                 if path not in sys.path:
>>>                     sys.path.append(path)
>>>
>>>                 os.environ['DJANGO_SETTINGS_MODULE'] =
>>>                 '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>>>
>>>                 import django.core.handlers.wsgi
>>>                 application = django.core.handlers.wsgi.WSGIHandler()
>>>
>>>
>>>                 I am getting the error:
>>>
>>>                 [Thu Jan 27 10:57:40 2011] [error] [client
>>>                 *************]   File
>>>                 "/opt/geonode/django.wsgi", line 10, in ?
>>>                 [Thu Jan 27 10:57:40 2011] [error] [client
>>>                 *************]     import
>>>                 django.core.handlers.wsgi
>>>                 [Thu Jan 27 10:57:40 2011] [error] [client
>>>                 *************] ImportError:
>>>                 No module named django.core.handlers.wsgi
>>>
>>>
>>>                 Anybody have an idea why django.core.handlers.wsgi
>>>                 is not being found?
>>>
>>>                 Garey Mills
>>>                 Library Systems Office
>>>                 UC Berkeley
>>>
>>>
>>>
>>
>

Re: [geonode] problem with Django installation

From:
David Winslow
Date:
2011-01-28 @ 23:14
You must explicitly invoke the python interpreter, but the command-line
arguments accepted are the same as those for virtualenv.

So a basic usage would be:

python bootstrap.py /opt/geonode/venv/

--
David Winslow
OpenGeo - http://opengeo.org/

On Fri, Jan 28, 2011 at 6:09 PM, Garey Mills <gmills@library.berkeley.edu>wrote:

>  David -
>
>     If it will work, I would be happy to recreate the virtualenv. What are
> the steps to use bootstrap.py?
>
> Garey
>
>
> On 1/28/2011 2:38 PM, David Winslow wrote:
>
> Hm, you are following the generic instructions?  Now that I look, they
> don't mention bootstrap.py, probably just an oversight.  bootstrap.py is
> intended to create a virtual environment for you; I don't think it will work
> for an already-created one.
>
>  --
> David Winslow
> OpenGeo - http://opengeo.org/
>
> On Fri, Jan 28, 2011 at 5:23 PM, Garey Mills <gmills@library.berkeley.edu>wrote:
>
>>  David -
>>
>>     I saw nothing in the the installation instructions about bootstrap.py.
>> I see that it is in GeoNode-1.0, but where do I run it? In the virtualenv
>> environment set up for the Django app?
>>
>> Garey
>>
>>
>> On 1/28/2011 2:16 PM, David Winslow wrote:
>>
>> geoserver_token should be a file containing some random string; it's used
>> to tag internal requests between the Django app and GeoServer.  If you are
>> using the bootstrap.py script included in the GeoNode tarball one should be
>> randomly generated as part of the setup process... otherwise you can really
>> just open up the file and type in the first thing to come to mind, or do
>> something like:
>>
>>  $ base64 <( head -c 30 /dev/random ) > /path/to/geoserver_token
>>
>>  --
>> David Winslow
>> OpenGeo - http://opengeo.org/
>>
>> On Fri, Jan 28, 2011 at 4:48 PM, Garey Mills <gmills@library.berkeley.edu
>> > wrote:
>>
>>>  David -
>>>
>>>     That worked, but now I have this:
>>>
>>>     GEOSERVER_CREDENTIALS = "geoserver_admin",
>>> open(path_extrapolate('../../geoserver_token')).readline()[0:-1]
>>> [Fri Jan 28 13:45:43 2011] [error] [client 128.32.99.171] IOError: [Errno
>>> 2] No such file or directory:
>>> '/opt/geonode/src/GeoNodePy/../../geoserver_token'
>>>
>>>     Where is geoserver_token? Is is something I have to create?
>>>
>>> Garey
>>>
>>>
>>> On 1/28/2011 11:25 AM, David Winslow wrote:
>>>
>>> Sorry I didn't catch this the first time around: the
>>> DJANGO_SETTINGS_MODULE should be a Python module name, not a file path.
>>>  Change that line to:
>>>
>>>  os.environ['DJANGO_SETTINGS_MODULE'] =
>>> 'geonode.settings'
>>>
>>>  Hope this helps.
>>>
>>>  --
>>> David Winslow
>>> OpenGeo - http://opengeo.org/
>>>
>>>  On Fri, Jan 28, 2011 at 2:21 PM, Garey Mills <
>>> gmills@library.berkeley.edu> wrote:
>>>
>>>>  David -
>>>>
>>>>     When I make the changes you suggest, I get this
>>>>
>>>> [Fri Jan 28 11:17:48 2011] [error] [client 128.32.99.171] ImportError:
>>>> Could not import settings '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>>>> (Is it on sys.path? Does it have syntax errors?): Import by filename is not
>>>> supported.
>>>>
>>>>      No permissions problems that I can see. Import by filename?
>>>>
>>>> Garey
>>>>
>>>> -------- Original Message --------  Subject: Re: [geonode] problem with
>>>> Django installation  Date: Thu, 27 Jan 2011 15:54:07 -0500  From: David
>>>> Winslow <dwinslow@opengeo.org> <dwinslow@opengeo.org>  Reply-To:
>>>> geonode@librelist.com  To: geonode@librelist.com
>>>>
>>>>
>>>> Use:
>>>>   import site
>>>>   site.addsitedir("/opt/geonode/lib/python2.6/site-packages")
>>>>
>>>>  Rather than:
>>>>   import sys
>>>>   sys.path.append("/opt/geonode")
>>>>
>>>>  The directory that you get from unpacking geonode does not directly
>>>> contain python modules, and uses some tricks (pth files etc) which afaik are
>>>> not caught when using sys.path.append.
>>>>
>>>>  Hope this helps.
>>>>
>>>>  --
>>>> David Winslow
>>>> OpenGeo - http://opengeo.org/
>>>>
>>>>
>>>> On Thu, Jan 27, 2011 at 2:01 PM, Garey Mills <
>>>> gmills@library.berkeley.edu> wrote:
>>>>
>>>>> Hi -
>>>>>
>>>>>     I followed the instructions found in
>>>>> docs.geonode.org/1.0/deployment.html and found myself construction a
>>>>> django.wsgi file that looks like this:
>>>>>
>>>>> import os
>>>>> import sys
>>>>>
>>>>> path = '/opt/geonode'
>>>>> if path not in sys.path:
>>>>>     sys.path.append(path)
>>>>>
>>>>> os.environ['DJANGO_SETTINGS_MODULE'] =
>>>>> '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>>>>>
>>>>> import django.core.handlers.wsgi
>>>>> application = django.core.handlers.wsgi.WSGIHandler()
>>>>>
>>>>>
>>>>> I am getting the error:
>>>>>
>>>>> [Thu Jan 27 10:57:40 2011] [error] [client *************]   File
>>>>> "/opt/geonode/django.wsgi", line 10, in ?
>>>>> [Thu Jan 27 10:57:40 2011] [error] [client *************]     import
>>>>> django.core.handlers.wsgi
>>>>> [Thu Jan 27 10:57:40 2011] [error] [client *************] ImportError:
>>>>> No module named django.core.handlers.wsgi
>>>>>
>>>>>
>>>>> Anybody have an idea why django.core.handlers.wsgi is not being found?
>>>>>
>>>>> Garey Mills
>>>>> Library Systems Office
>>>>> UC Berkeley
>>>>>
>>>>
>>>>
>>>
>>
>

Re: [geonode] problem with Django installation

From:
Garey Mills
Date:
2011-01-28 @ 23:46
David -

     I had a directory called geonode in /opt. I deleted that. Then I ran

     python bootstrap.py /opt/geonode

     but no directory called /opt/geonode is being created. What am I 
doing wrong?

Garey Mills

On 1/28/2011 3:14 PM, David Winslow wrote:
> You must explicitly invoke the python interpreter, but the 
> command-line arguments accepted are the same as those for virtualenv.
>
> So a basic usage would be:
>
> python bootstrap.py /opt/geonode/venv/
>
> --
> David Winslow
> OpenGeo - http://opengeo.org/
>
> On Fri, Jan 28, 2011 at 6:09 PM, Garey Mills 
> <gmills@library.berkeley.edu <mailto:gmills@library.berkeley.edu>> wrote:
>
>     David -
>
>         If it will work, I would be happy to recreate the virtualenv.
>     What are the steps to use bootstrap.py?
>
>     Garey
>
>
>     On 1/28/2011 2:38 PM, David Winslow wrote:
>>     Hm, you are following the generic instructions?  Now that I look,
>>     they don't mention bootstrap.py, probably just an oversight.
>>      bootstrap.py is intended to create a virtual environment for
>>     you; I don't think it will work for an already-created one.
>>
>>     --
>>     David Winslow
>>     OpenGeo - http://opengeo.org/
>>
>>     On Fri, Jan 28, 2011 at 5:23 PM, Garey Mills
>>     <gmills@library.berkeley.edu
>>     <mailto:gmills@library.berkeley.edu>> wrote:
>>
>>         David -
>>
>>             I saw nothing in the the installation instructions about
>>         bootstrap.py. I see that it is in GeoNode-1.0, but where do I
>>         run it? In the virtualenv environment set up for the Django app?
>>
>>         Garey
>>
>>
>>         On 1/28/2011 2:16 PM, David Winslow wrote:
>>>         geoserver_token should be a file containing some random
>>>         string; it's used to tag internal requests between the
>>>         Django app and GeoServer.  If you are using the bootstrap.py
>>>         script included in the GeoNode tarball one should be
>>>         randomly generated as part of the setup process... otherwise
>>>         you can really just open up the file and type in the first
>>>         thing to come to mind, or do something like:
>>>
>>>         $ base64 <( head -c 30 /dev/random ) > /path/to/geoserver_token
>>>
>>>         --
>>>         David Winslow
>>>         OpenGeo - http://opengeo.org/
>>>
>>>         On Fri, Jan 28, 2011 at 4:48 PM, Garey Mills
>>>         <gmills@library.berkeley.edu
>>>         <mailto:gmills@library.berkeley.edu>> wrote:
>>>
>>>             David -
>>>
>>>                 That worked, but now I have this:
>>>
>>>                 GEOSERVER_CREDENTIALS = "geoserver_admin",
>>>             open(path_extrapolate('../../geoserver_token')).readline()[0:-1]
>>>             [Fri Jan 28 13:45:43 2011] [error] [client
>>>             128.32.99.171] IOError: [Errno 2] No such file or
>>>             directory:
>>>             '/opt/geonode/src/GeoNodePy/../../geoserver_token'
>>>
>>>                 Where is geoserver_token? Is is something I have to
>>>             create?
>>>
>>>             Garey
>>>
>>>
>>>             On 1/28/2011 11:25 AM, David Winslow wrote:
>>>>             Sorry I didn't catch this the first time around: the
>>>>             DJANGO_SETTINGS_MODULE should be a Python module name,
>>>>             not a file path.  Change that line to:
>>>>
>>>>             os.environ['DJANGO_SETTINGS_MODULE'] =
>>>>             'geonode.settings'
>>>>
>>>>             Hope this helps.
>>>>
>>>>             --
>>>>             David Winslow
>>>>             OpenGeo - http://opengeo.org/
>>>>
>>>>             On Fri, Jan 28, 2011 at 2:21 PM, Garey Mills
>>>>             <gmills@library.berkeley.edu
>>>>             <mailto:gmills@library.berkeley.edu>> wrote:
>>>>
>>>>                 David -
>>>>
>>>>                     When I make the changes you suggest, I get this
>>>>
>>>>                 [Fri Jan 28 11:17:48 2011] [error] [client
>>>>                 128.32.99.171] ImportError: Could not import
>>>>                 settings
>>>>                 '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>>>>                 (Is it on sys.path? Does it have syntax errors?):
>>>>                 Import by filename is not supported.
>>>>
>>>>                      No permissions problems that I can see. Import
>>>>                 by filename?
>>>>
>>>>                 Garey
>>>>
>>>>                 -------- Original Message --------
>>>>                 Subject: 	Re: [geonode] problem with Django
>>>>                 installation
>>>>                 Date: 	Thu, 27 Jan 2011 15:54:07 -0500
>>>>                 From: 	David Winslow <dwinslow@opengeo.org>
>>>>                 <mailto:dwinslow@opengeo.org>
>>>>                 Reply-To: 	geonode@librelist.com
>>>>                 <mailto:geonode@librelist.com>
>>>>                 To: 	geonode@librelist.com
>>>>                 <mailto:geonode@librelist.com>
>>>>
>>>>
>>>>
>>>>                 Use:
>>>>                   import site
>>>>                   site.addsitedir("/opt/geonode/lib/python2.6/site-packages")
>>>>
>>>>                 Rather than:
>>>>                   import sys
>>>>                   sys.path.append("/opt/geonode")
>>>>
>>>>                 The directory that you get from unpacking geonode
>>>>                 does not directly contain python modules, and uses
>>>>                 some tricks (pth files etc) which afaik are not
>>>>                 caught when using sys.path.append.
>>>>
>>>>                 Hope this helps.
>>>>
>>>>                 --
>>>>                 David Winslow
>>>>                 OpenGeo - http://opengeo.org/
>>>>
>>>>
>>>>                 On Thu, Jan 27, 2011 at 2:01 PM, Garey Mills
>>>>                 <gmills@library.berkeley.edu
>>>>                 <mailto:gmills@library.berkeley.edu>> wrote:
>>>>
>>>>                     Hi -
>>>>
>>>>                         I followed the instructions found in
>>>>                     docs.geonode.org/1.0/deployment.html
>>>>                     <http://docs.geonode.org/1.0/deployment.html>
>>>>                     and found myself construction a
>>>>                     django.wsgi file that looks like this:
>>>>
>>>>                     import os
>>>>                     import sys
>>>>
>>>>                     path = '/opt/geonode'
>>>>                     if path not in sys.path:
>>>>                         sys.path.append(path)
>>>>
>>>>                     os.environ['DJANGO_SETTINGS_MODULE'] =
>>>>                     '/opt/geonode/src/GeoNodePy/geonode/settings.py'
>>>>
>>>>                     import django.core.handlers.wsgi
>>>>                     application =
>>>>                     django.core.handlers.wsgi.WSGIHandler()
>>>>
>>>>
>>>>                     I am getting the error:
>>>>
>>>>                     [Thu Jan 27 10:57:40 2011] [error] [client
>>>>                     *************]   File
>>>>                     "/opt/geonode/django.wsgi", line 10, in ?
>>>>                     [Thu Jan 27 10:57:40 2011] [error] [client
>>>>                     *************]     import
>>>>                     django.core.handlers.wsgi
>>>>                     [Thu Jan 27 10:57:40 2011] [error] [client
>>>>                     *************] ImportError:
>>>>                     No module named django.core.handlers.wsgi
>>>>
>>>>
>>>>                     Anybody have an idea why
>>>>                     django.core.handlers.wsgi is not being found?
>>>>
>>>>                     Garey Mills
>>>>                     Library Systems Office
>>>>                     UC Berkeley
>>>>
>>>>
>>>>
>>>
>>
>