Coder Social home page Coder Social logo

Comments (9)

zerolab avatar zerolab commented on August 27, 2024

@RobSisson try to do this on https://github.com/wagtail/docker-wagtail-develop/blob/main/docker-compose.yml

from docker-wagtail-develop.

RobSisson avatar RobSisson commented on August 27, 2024

@RobSisson try to do this on https://github.com/wagtail/docker-wagtail-develop/blob/main/docker-compose.yml

Tried it with still no luck, though I may have done it incorrectly - first time using vim!

Any other ideas?

from docker-wagtail-develop.

saevarom avatar saevarom commented on August 27, 2024

@RobSisson Could you try editing the docker-compose.yml and change ./manage.py in line 12 to python manage.py ?

from docker-wagtail-develop.

RobSisson avatar RobSisson commented on August 27, 2024

@RobSisson Could you try editing the docker-compose.yml and change ./manage.py in line 12 to python manage.py ?

Ah sorted! The web container now runs, however no data gets sent when going to localhost:8000 - is this to be expected?

from docker-wagtail-develop.

RobSisson avatar RobSisson commented on August 27, 2024

Tried restarting it and now this comes up:

`Environment:

Request Method: GET
Request URL: http://localhost:8000/

Django Version: 4.0.8
Python Version: 3.8.15
Installed Applications:
['bakerydemo.base',
'bakerydemo.blog',
'bakerydemo.breads',
'bakerydemo.locations',
'bakerydemo.search',
'wagtail.contrib.search_promotions',
'wagtail.contrib.forms',
'wagtail.contrib.redirects',
'wagtail.embeds',
'wagtail.sites',
'wagtail.users',
'wagtail.snippets',
'wagtail.documents',
'wagtail.images',
'wagtail.search',
'wagtail.admin',
'wagtail.api.v2',
'wagtail.locales',
'wagtail.contrib.modeladmin',
'wagtail.contrib.routable_page',
'wagtail.contrib.simple_translation',
'wagtail.contrib.styleguide',
'wagtail',
'rest_framework',
'modelcluster',
'taggit',
'wagtailfontawesome',
'debug_toolbar',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sitemaps']
Installed Middleware:
['debug_toolbar.middleware.DebugToolbarMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'wagtail.contrib.redirects.middleware.RedirectMiddleware']

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)

The above exception (relation "wagtailcore_site" does not exist
LINE 1: ...reated_at", "wagtailcore_page"."alias_of_id" FROM "wagtailco...
^
) was the direct cause of the following exception:
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/code/wagtail/wagtail/views.py", line 14, in serve
site = Site.find_for_request(request)
File "/code/wagtail/wagtail/models/sites.py", line 150, in find_for_request
site = Site._find_for_request(request)
File "/code/wagtail/wagtail/models/sites.py", line 160, in _find_for_request
site = get_site_for_hostname(hostname, port)
File "/code/wagtail/wagtail/models/sites.py", line 23, in get_site_for_hostname
sites = list(
File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 302, in len
self._fetch_all()
File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 1507, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 57, in iter
results = compiler.execute_sql(
File "/usr/local/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1361, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 103, in execute
return super().execute(sql, params)
File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.8/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)

Exception Type: ProgrammingError at /
Exception Value: relation "wagtailcore_site" does not exist
LINE 1: ...reated_at", "wagtailcore_page"."alias_of_id" FROM "wagtailco...
^

`

from docker-wagtail-develop.

saevarom avatar saevarom commented on August 27, 2024

I think you missed step 7 in the README, you will need to run migrations in the container to populate the database.

from docker-wagtail-develop.

saevarom avatar saevarom commented on August 27, 2024

I think you missed step 7 in the README, you will need to run migrations in the container to populate the database.

@RobSisson That would be this step:

# 7. Now in a new shell, run the databse setup script. The database will be persisted across container executions by Docker's Volumes system so you will only need to run this commmand the first time you start the database.
./setup-db.sh
# Success!

from docker-wagtail-develop.

RobSisson avatar RobSisson commented on August 27, 2024

All sorted! thanks!

I found I needed to use
docker-compose run web python3 manage.py migrate
as
./setup-db.sh or running the file in pycharm didnt work

Thanks for your help!

from docker-wagtail-develop.

saevarom avatar saevarom commented on August 27, 2024

Good to hear! Good luck contributing to Wagtail :)

from docker-wagtail-develop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.