You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>>fromtarbell.siteimportTarbellApp# create a site>>>site=TarbellApp('.')
# get a request context>>>ctx=site.app.test_request_context()
>>>ctx.push()
# run through the pre-request hooks, so g.current_site works>>>site.app.preprocess_request()
# now I can do things with site data>>>context=site.get_context()
>>>print(context['title'])
It would be really nice to package all those steps into a little shell script, so I could run something like:
tarbell shell
And get:
>>>site<tarbell.app.TarbellSiteinstanceat0x...>
The text was updated successfully, but these errors were encountered:
Here's a thing I do a lot:
It would be really nice to package all those steps into a little shell script, so I could run something like:
And get:
The text was updated successfully, but these errors were encountered: