Closed agmartin closed 8 years ago
Actually, this does not completely solve the problem. The page loads the root resource with the above bootstrap, but the program does nothing when you try to add folders or documents. I'm not sure what the problem is there.
EDIT: I do not believe that this is related to the database issue above. I will submit a PR for this issue later, but I'm opening a new issue for this item.
@agmartin please provide an URL of the tutorial in question.
The problem here is that the root node of the traversal hierarchy cannot have a title. That is what messes up the generated links. I will update the database bootstrap script and submit a pull request.
@agmartin I fixed this issue in PR #122. There were a whole bunch of errors.
In step 7, we bootstrap the sqlite database and populate it with a root object.
In step 8, when you add the sqltraversal file, that database is no longer what's expected.
initialize_db.py has to be altered and re-run.
Lines 12-17 should be: from .sqltraversal import ( DBSession, Base, )
from .models import Folder
And then Lines 37-39 can be changed to this: with transaction.manager: rootnode = Folder(id=1, name='root') DBSession.add(rootnode)