Closed wazari972 closed 8 years ago
Ah shit, thanks! Should be fixed on master
now -- I'll publish a new version on PyPi tomorrow. Cheers!
if I did everything right ... I got this error now :
chef --debug publish test
[piecrust.main] Using cache key: default [piecrust.app] Creating site configuration... [piecrust.appconfig] Loading configuration from cache... [piecrust.cache] Reading cache: /home/kevin/travail/Documents/mcgdb_website/_cache/c21f969b5f03d33d43e04f8f136e7682/app/config.json [piecrust.commands.builtin.scaffolding] Skipping source 'theme_pages' because it's a theme source. [piecrust.main] init() takes 3 positional arguments but 4 were given Traceback (most recent call last): File "/home/kevin/travail/tools/PieCrust2/piecrust/main.py", line 70, in main exit_code = _run_chef(pre_args, argv) File "/home/kevin/travail/tools/PieCrust2/piecrust/main.py", line 269, in _run_chef c.setupParser(p, app) File "/home/kevin/travail/tools/PieCrust2/piecrust/commands/builtin/publishing.py", line 30, in setupParser for pub in app.publishers: File "/usr/lib/python3.5/site-packages/werkzeug/utils.py", line 71, in get value = self.func(obj) File "/home/kevin/travail/tools/PieCrust2/piecrust/app.py", line 195, in publishers tgt = cls(self, n, t) TypeError: init() takes 3 positional arguments but 4 were given
(with last git commit)
another nit while I'm at it :)
diff --git a/foodtruck/scm/git.py b/foodtruck/scm/git.py
index 84350cb..871cc2e 100644
--- a/foodtruck/scm/git.py
+++ b/foodtruck/scm/git.py
@@ -31,7 +31,7 @@ class GitSourceControl(SourceControl):
else:
res.new_files.append(path)
elif line.startswith(' M '):
- res.edited_files.append(path[3:])
+ res.edited_files.append(line[3:])
print(res.__dict__)
return res
and by the way, I can't get the foodtruck to work (well), in particular the static pages are not accessible, in particular http://localhost:8090/static/css/foodtruck.min.css is 404, http://localhost:8090/static/img/foodtruck.png as well ... and I can't find where you hook to treat static content differently from dynamic pages ... !
still playing around, I share my 'fixes' for just information, the first part of the diff tell you where are the problems :
diff --git a/foodtruck/web.py b/foodtruck/web.py
index 22f7113..376e300 100644
--- a/foodtruck/web.py
+++ b/foodtruck/web.py
@@ -34,7 +34,8 @@ if (app.config.get('FOODTRUCK_CMDLINE_MODE', False) and
# Add a special route for the `.well-known` directory.
app.wsgi_app = SharedDataMiddleware(
app.wsgi_app,
- {'/.well-known': os.path.join(admin_root, '.well-known')})
+ {'/.well-known': os.path.join(admin_root, '.well-known'),
+ '/static': "/path/to/PieCrust2/foodtruck/assets"})
if os.path.isfile(config_path):
app.config.from_pyfile(config_path)
get https://github.com/twbs/bootstrap-sass and useruby scss to build foodtruck.css
diff --git a/foodtruck/views/create.py b/foodtruck/views/create.py
index 841d192..4adf46b 100644
--- a/foodtruck/views/create.py
+++ b/foodtruck/views/create.py
@@ -45,8 +45,7 @@ def write_page(source_name):
fp.write('')
flash("%s was created." % os.path.relpath(fac.path, site.root_dir))
- route = site.getRoute(source.name, fac.metadata,
- skip_taxonomies=True)
+ route = site.getSourceRoute(source.name, fac.metadata)
if route is None:
logger.error("Can't find route for page: %s" % fac.path)
abort(500)
and
diff --git a/foodtruck/views/dashboard.py b/foodtruck/views/dashboard.py
index e4f1b1c..1409323 100644
--- a/foodtruck/views/dashboard.py
+++ b/foodtruck/views/dashboard.py
@@ -79,8 +79,9 @@ def _getWipData(path, site, fs_endpoints):
return None
fac = source.buildPageFactory(os.path.join(site.root_dir, path))
- route = site.piecrust_app.getRoute(
- source.name, fac.metadata, skip_taxonomies=True)
+
+ route = site.piecrust_app.getSourceRoute(
+ source.name, fac.metadata)
if not route:
return None
--> naming problem?
Hey, sorry for the trouble... I didn't do a very good job with the test coverage on these parts of PieCrust :(
Anyway, first, I failed to document properly how to use FoodTruck with a source version of PieCrust. The problems you have with missing FoodTruck assets is that you have to run bower install
and gulp
(notice the Bower and Gulp files at the root of the PieCrust repo). This should make sure the FoodTruck assets are compiled into the static
directory (and therefore you shouldn't have to edit the SharedDataMiddleware
code).
Second, the Git support for FoodTruck is fairly experimental (I don't personally use Git), and I actually thought it wasn't included in the source! (i.e. I thought I kept it local). Oh well.
The other bugs should be fixed -- some I had fixes for already but it wasn't pushed yet (it is now). I'm refactoring things to make it possible to run automated tests on FoodTruck so it should get better. Sorry again!
Hello, I see several problems with the last version of PieCrust (chef 2.0.0rc1) (on Archlinux, piecrust up to date with pip)
Let me know if you need further details about this problem, and thank you for the tool you're building, it's great :-)