gasman / wagtail-form-example

An example of implementing a Django form on a Wagtail site, without using the 'wagtailforms' module
43 stars 12 forks source link

Example broken? #4

Closed gabrielwolf closed 6 years ago

gabrielwolf commented 6 years ago

I installed the example via:

git clone https://github.com/gasman/wagtail-form-example
cd wagtail-form-example
python -m venv venv # python is 3.6.5
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
python manage.py makemigrations

Now I get:

/Users/jibazee/Coding/Python/Wagtail-Django/Tutorials/wagtail-form-example/venv/lib/python3.6/site-packages/django/utils/six.py:808: RemovedInDjango110Warning: SubfieldBase has been deprecated. Use Field.from_db_value instead.
  return meta(name, bases, d)

No changes detected

after

python manage.py migrate
python ./manage.py runserver

The server is up and the first page is displayed. A click on the suggest a flavour link gives a 404:

Request Method: | GET
-- | --
http://127.0.0.1:8000/suggest-a-flavour/
wagtail.wagtailcore.views.serve

Any hints, what is wrong with my installation? I try to understand the code and get it working on an Wagtail 2.1.1 project.

Best, Gabriel

gasman commented 6 years ago

Hi @gabrielwolf, You need to create a FlavourSuggestionPage in the Wagtail admin (as a child of the homepage) with the slug suggest-a-flavour.

gabrielwolf commented 6 years ago

It works. Thank you @gasman!