Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running server after custom docker install #80

Open
maximzavadskiy opened this issue Nov 26, 2016 · 2 comments
Open

Error running server after custom docker install #80

maximzavadskiy opened this issue Nov 26, 2016 · 2 comments

Comments

@maximzavadskiy
Copy link

After following instructions on setting up a custom docker set-up, running
sh-3.2# docker exec -it decisions python manage.py migrate
results with errors:

Operations to perform:
  Apply all migrations: sessions, admin, ahjo, subscriptions, sites, comments, contenttypes, auth, news, geo, tagging, sitemetrics
Running migrations:
  Rendering model states... DONE
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying ahjo.0001_initial... OK
  Applying ahjo.0002_auto_20160302_1438... OK
  Applying ahjo.0003_auto_20160304_1124... OK
  Applying ahjo.0004_comment_user... OK
  Applying ahjo.0005_agendaitem_fetched... OK
  Applying ahjo.0006_auto_20160316_1434... OK
  Applying ahjo.0007_auto_20160420_1523... OK
  Applying ahjo.0008_auto_20160420_1524... OK
  Applying ahjo.0009_auto_20160420_1528... OK
  Applying ahjo.0010_auto_20160420_1558... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying comments.0001_initial... OK
  Applying comments.0002_auto_20160420_1619... OK
  Applying comments.0003_auto_20160502_1204... OK
  Applying comments.0004_auto_20160504_1108... OK
  Applying geo.0001_initial...Traceback (most recent call last):
  File "manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 200, in handle
    executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 92, in migrate
    self._migrate_all_forwards(plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 121, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 198, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/migration.py", line 123, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/operations/models.py", line 59, in database_forwards
    schema_editor.create_model(model)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 235, in create_model
    definition, extra_params = self.column_sql(model, field)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 134, in column_sql
    db_params = field.db_parameters(connection=self.connection)
  File "/usr/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 636, in db_parameters
    type_string = self.db_type(connection)
  File "/usr/local/lib/python2.7/site-packages/django/contrib/gis/db/models/fields.py", line 120, in db_type
    return connection.ops.geo_db_type(self)
AttributeError: 'DatabaseOperations' object has no attribute 'geo_db_type'
sh-3.2# docker exec -it dec-postgres bash

Are there any instructions on creating & populating the database?

@jaakkokorhonen
Copy link
Contributor

@hylje do you have comments?

@hylje
Copy link
Collaborator

hylje commented Nov 26, 2016

The database backend engine must be the GeoDjango PostGIS backend 'django.contrib.gis.db.backends.postgis'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants