<div dir="ltr"><div><div>Add this to the start of that file:<br><br>PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))<br><br></div>I have committed a fix for this in github.<br><br></div>-a<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 13, 2015 at 12:28 PM, Natalia Queiroz <span dir="ltr"><<a href="mailto:queiroz.nati@gmail.com" target="_blank">queiroz.nati@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hello Group,<br><br></div>I'm working on a complete installation of Geonode and I'm stuck on the part of <strong>Synchronise db, </strong>it says that there is no<strong> </strong>name 'PROJECT_ROOT' defined<br><br></div>Any Idea?<br><div><br># python manage.py syncdb --noinput --all<br>Traceback (most recent call last):<br>  File "manage.py", line 28, in <module><br>    execute_from_command_line(sys.argv)<br>  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line<br>    utility.execute()<br>  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute<br>    self.fetch_command(subcommand).run_from_argv(self.argv)<br>  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 261, in fetch_command<br>    commands = get_commands()<br>  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 107, in get_commands<br>    apps = settings.INSTALLED_APPS<br>  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 54, in __getattr__<br>    self._setup(name)<br>  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 49, in _setup<br>    self._wrapped = Settings(settings_module)<br>  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 128, in __init__<br>    mod = importlib.import_module(self.SETTINGS_MODULE)<br>  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module<br>    __import__(name)<br>  File "/home/ubuntu/geonode/geonode/settings.py", line 885, in <module><br>    from local_settings import *  # noqa<br>  File "/home/ubuntu/geonode/geonode/local_settings.py", line 39, in <module><br>    'LOG_FILE': '%s/geoserver/data/logs/geoserver.log' % os.path.abspath(os.path.join(PROJECT_ROOT, os.pardir)),<br><b>NameError: name 'PROJECT_ROOT' is not defined</b><br><br><br></div><div>local_settings.py file<br><br>import os<br><br>SITEURL = "<a href="http://localhost:8000/" target="_blank">http://localhost:8000/</a>"<br><br>DATABASES = {<br>    'default': {<br>         'ENGINE': 'django.db.backends.postgresql_psycopg2',<br>         'NAME': 'geonode',<br>         'USER': 'geonode',<br>         'PASSWORD': 'geonode',<br>     },<br>    # vector datastore for uploads<br>    'datastore' : {<br>        'ENGINE': 'django.contrib.gis.db.backends.postgis',<br>        'ENGINE': '', # Empty ENGINE name disables <br>        'NAME': 'geonode-imports',<br>        'USER' : 'geonode',<br>        'PASSWORD' : 'geonode',<br>        'HOST' : 'localhost',<br>        'PORT' : '5432',<br>    }<br>}<br><br><br># OGC (WMS/WFS/WCS) Server Settings<br>OGC_SERVER = {<br>    'default' : {<br>        'BACKEND' : 'geonode.geoserver',<br>        'LOCATION' : '<a href="http://localhost:8080/geoserver/" target="_blank">http://localhost:8080/geoserver/</a>',<br>        'PUBLIC_LOCATION' : '<a href="http://localhost:8080/geoserver/" target="_blank">http://localhost:8080/geoserver/</a>',<br>        'USER' : 'admin',<br>        'PASSWORD' : 'geoserver',<br>        'MAPFISH_PRINT_ENABLED' : True,<br>        'PRINT_NG_ENABLED' : True,<br>        'GEONODE_SECURITY_ENABLED' : True,<br>        'GEOGIG_ENABLED' : False,<br>        'WMST_ENABLED' : False,<br>        'BACKEND_WRITE_ENABLED': True,<br>        'WPS_ENABLED' : False,<br>        'LOG_FILE': '%s/geoserver/data/logs/geoserver.log' % os.path.abspath(os.path.join(PROJECT_ROOT, os.pardir)),<br>        # Set to name of database in DATABASES dictionary to enable<br>        'DATASTORE': '', #'datastore',<br>    }<br>}<br><br>CATALOGUE = {<br>    'default': {<br>        # The underlying CSW implementation<br>        # default is pycsw in local mode (tied directly to GeoNode Django DB)<br>        'ENGINE': 'geonode.catalogue.backends.pycsw_local',<br>        # pycsw in non-local mode<br>        # 'ENGINE': 'geonode.catalogue.backends.pycsw_http',<br>        # GeoNetwork opensource<br>        # 'ENGINE': 'geonode.catalogue.backends.geonetwork',<br>        # deegree and others<br>        # 'ENGINE': 'geonode.catalogue.backends.generic',<br><br>        # The FULLY QUALIFIED base url to the CSW instance for this GeoNode<br>        'URL': '%scatalogue/csw' % SITEURL,<br>        # 'URL': '<a href="http://localhost:8080/geonetwork/srv/en/csw" target="_blank">http://localhost:8080/geonetwork/srv/en/csw</a>',<br>        # 'URL': '<a href="http://localhost:8080/deegree-csw-demo-3.0.4/services" target="_blank">http://localhost:8080/deegree-csw-demo-3.0.4/services</a>',<br><br>        # login credentials (for GeoNetwork)<br>        'USER': 'admin',<br>        'PASSWORD': 'admin',<br>    }<br>}<br><br># Default preview library<br>#LAYER_PREVIEW_LIBRARY = 'geoext'<br><br><br>ALLOWED_HOST = ['localhost']<span class="HOEnZb"><font color="#888888"><br clear="all"></font></span></div><span class="HOEnZb"><font color="#888888"><div><div><div><br><br><br>-- <br><div><div dir="ltr"><br><br>Natália Oliveira</div></div>
</div></div></div></font></span></div>
<br>_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org">geonode-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users</a><br>
<br></blockquote></div><br></div>