RunestoneInteractive / fopp

Foundations of Python Programming
https://runestone.academy/runestone/static/fopp/index.html
37 stars 120 forks source link

Error -- dynamic_pages is True, but this server does not support templates #269

Closed alexmojaki closed 4 years ago

alexmojaki commented 4 years ago

I get the above error when I build and serve this project, unless of course I set dynamic_pages = False in pavement.py.

  1. Modifying pavement.py makes it harder to have a clean git workflow because I have to make sure I don't accidentally commit this.
  2. Why doesn't the runestone server support templates?
  3. Which server does support templates? What is the correct way to build and view this book locally? The README suggests using the runestone server, should that be changed?
bnmnetp commented 4 years ago

2-3. Both the runestone components and the runestone server use templates. runestone build uses sphinx which uses Jinja2 templates. The runestone server itself is built on web2py which has its own template system.

What are you getting at?

alexmojaki commented 4 years ago

I thought that runestone serve was the runestone server, and now I'm getting the impression that's not true.

I followed the instructions in the README which says to use runestone serve which led to the error in the title. At the very least I think the README needs updating, but I'm not sure what to. Right now I have dynamic_pages = False in pavement.py and I can see raw template code like {{ if request.application == 'runestone':}} {{ pass }} in my browser. Surely that's not right?

bnmnetp commented 4 years ago

The runestone serve command is for doing development work when you are writing new materials, or if you just want to run a small server for a class of 20 or so students and you don’t care about the instructor interface or allowing the students to save code or keep track of their progress.

The RunestoneInteractive/RunestoneServer repository contains the server for people who want to run an installation like runestone.academy or even for a single class, but you want students to be able to login, save their work, do grading and make assignments as part of the textbook environment.

bnmnetp commented 4 years ago

In either case, raw template code should not show up. So that is definitely a bug.

dbrucknr commented 4 years ago

Just checking in on this issue - is it safe to close the ticket? It appears this issue thread was merged.

Thanks!