[GeoNode-devel] developer setup

Paolo Corti pcorti at gmail.com
Fri Jun 17 07:40:47 PDT 2016


It seems that from Django 1.8 it is needed to run migrate with the
--fake-initial settings
(http://stackoverflow.com/questions/29760817/how-can-i-resolve-django-content-type-already-exists)

Though, I am now getting a different error:

Applying layers.0001_initial...Traceback (most recent call last):
...
django.db.utils.ProgrammingError: relation "layers_attribute" already exists

p

On Fri, Jun 17, 2016 at 10:34 AM, Paolo Corti <pcorti at gmail.com> wrote:
> Hi developers
>
> I am trying to install geonode from master (I haven't done this since
> 2.4 was released). I am wondering which is the way to setup a
> developer geonode instance.
>
> Once it was possible, following this instructions [1], to generate an
> environment using paver setup, which was taking care of the database
> initial sync.
> Now setup just set geoserver.
>
> If I try to create the database, I get this error:
>
>   Applying contenttypes.0001_initial...Traceback (most recent call last):
>
>   File "./manage.py", line 29, in <module>
>
>     execute_from_command_line(sys.argv)
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 354, in execute_from_command_line
>
>     utility.execute()
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 346, in execute
>
>     self.fetch_command(subcommand).run_from_argv(self.argv)
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/core/management/base.py",
> line 394, in run_from_argv
>
>     self.execute(*args, **cmd_options)
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/core/management/base.py",
> line 445, in execute
>
>     output = self.handle(*args, **options)
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
> line 222, in handle
>
>     executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
> line 110, in migrate
>
>     self.apply_migration(states[migration], migration, fake=fake,
> fake_initial=fake_initial)
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
> line 148, in apply_migration
>
>     state = migration.apply(state, schema_editor)
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/db/migrations/migration.py",
> line 115, in apply
>
>     operation.database_forwards(self.app_label, schema_editor,
> old_state, project_state)
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/db/migrations/operations/models.py",
> line 59, in database_forwards
>
>     schema_editor.create_model(model)
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/db/backends/base/schema.py",
> line 286, in create_model
>
>     self.execute(sql, params or None)
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/db/backends/base/schema.py",
> line 111, in execute
>
>     cursor.execute(sql, params)
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/db/backends/utils.py",
> line 79, in execute
>
>     return super(CursorDebugWrapper, self).execute(sql, params)
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/db/backends/utils.py",
> line 64, in execute
>
>     return self.cursor.execute(sql, params)
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/db/utils.py",
> line 98, in __exit__
>
>     six.reraise(dj_exc_type, dj_exc_value, traceback)
>
>   File "/home/vagrant/geonode/geonode/env/local/lib/python2.7/site-packages/django/db/backends/utils.py",
> line 62, in execute
>
>     return self.cursor.execute(sql)
>
> django.db.utils.ProgrammingError: relation "django_content_type" already exists
>
>
>
> I believe it is also important to always keep documentation updated.
> thanks
> p
>
> [1] https://github.com/GeoNode/geonode
>
> --
> Paolo Corti
> Geospatial software developer
> web: http://www.paolocorti.net
> twitter: @capooti
> skype: capooti



-- 
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti


More information about the geonode-devel mailing list