drafter-edu / drafter

A simple Python library for making websites
MIT License
0 stars 1 forks source link

store.py example doesn't work with version 1.5.0 #18

Open clause opened 1 week ago

clause commented 1 week ago

The store.py example from the Drafter workbook (https://drafter-edu.github.io/drafter/_downloads/b810a7b8039f6ee3810e2d12adff25aa/store.py) doesn't work with version 1.5.0. Running the application is fine but clicking on a purchse button results in the following:

` 500 Internal Server Error Sorry, the requested URL http://localhost:8080/purchase?--submit-button=Sword caused an error.

You might want to return to the index page.

Original error message:

Error creating page. Error in purchase: purchase() missing 1 required positional argument: 'name'

Traceback (most recent call last): File "/Users/clause/Library/Python/3.10/lib/python/site-packages/drafter/server.py", line 264, in bottle_page page = original_function(*args, **kwargs) TypeError: purchase() missing 1 required positional argument: 'name'

None Available routes:

'index': 'index': 'purchase': `

acbart commented 1 week ago

We just released 1.5.2 that corrects this issue!