Questions tagged [cheetah]

Cheetah is an Open Source Python based Templating Framework.

Cheetah is an open source template engine and code generation tool, written in Python. It can be used standalone or combined with other tools and frameworks. Web development is its principle use, but Cheetah is very flexible and is also being used to generate C++ game code, Java, sql, form emails and even Python code.

from CheetahTemplate.org

It works with Python 2.7 and 3.4+. Wheels are available at PyPI. Issues and pull requests are accepted at GitHub.

69 questions
2
votes
4 answers

Installing GNU Radio on ubuntu

Im trying to install GNU Radio, I need this to be able to install gqrx to use my software defined radio dongle. I have followed the guide at https://www.jeroennijhof.nl/wiki/index.php/Software-Defined_Radio_on_Ubuntu but the installation aborts…
Karl
  • 59
  • 1
  • 2
  • 5
2
votes
2 answers

CherryPy can't seem to find CSS script (static or absolute paths)

i'm using the cherryPy framework to serve my site, but it cannot seem to find my css script with either the static path or the absolute path. The css script works fine if i just go to the index.tmpl file via the browser, but when i request it via…
Lex
  • 376
  • 4
  • 17
2
votes
0 answers

create a cheetah tool for cherrypy

I just started to play around with cherrypy and wanted to use cheetah as a templating engine. Therefore I wanted to create a tool so I just can use the annotation feature to point to my template something like import cherrypy class Root(object): …
daniel
  • 932
  • 13
  • 19
2
votes
0 answers

What would a Cheetah template binding for Pyramid look like?

I've found this topic, which talks about Pystache, and I've seen a few bindings on Github for other engines but I'm confused on how to get Cheetah to work with Pyramid. Any pointers or what the code might look like?
2
votes
1 answer

Easiest and fastest way to template, possibly in a PDF

I have been looking extensively for a simple solution to a not-very-complicated problem. I have a great deal of data in a sql database which needs to be printed (for example, each entry would have name, address, phone number, etc). The vast majority…
floppyraid
  • 145
  • 1
  • 1
  • 9
1
vote
1 answer

Best method to replace iframes from an application

So I am rewriting the UI for an application that currently loads all the actual page content via iframes and just has a wrapper around it that contains a menu and some other information. My question is what is the best method to replace these…
BillPull
  • 8,335
  • 15
  • 54
  • 93
1
vote
1 answer

Jinja variable not being set properly in for loop

I am having a variable scope issue in Jinja that is misaligning a table. I am trying to convert the current template that is written in Cheetah to Jinja but for some reason this block of logic does not translate and getting the output the python is…
BillPull
  • 8,335
  • 15
  • 54
  • 93
1
vote
0 answers

How do we setup Cheetah so it runs with all templates in the templates directory and all code in the .. directory

How do we setup Cheetah so it runs with all templates in the templates directory and all code in the .. directory in code.py production=True if not production: try:web.render('mafbase.tmpl', None, True, 'mafbase') except:pass else: from…
pylabs
  • 31
  • 1
  • 1
  • 6
1
vote
1 answer

calling a function with cherry.py

So im doing a bit of web development, and due to some restriction set by my employer i need to use cheetah and cherrypy. I have this form that upon submit runs a function, and from said function i call another via HTTPRedirect, and what i want is to…
Lex
  • 376
  • 4
  • 17
1
vote
1 answer

Cheetah template filters

Sorry if the question sounds naive. I have a cheetah template, e.g: #filter None $none should be '' $number should be '1' #end filter with namespace = {'none': None, 'number': 1} So basically I want to convert all…
BPm
  • 2,586
  • 8
  • 31
  • 46
1
vote
0 answers

Python3/Cheetah3: object of type 'filter' has no len()

Python: 3.6.8 Cheetah: 3.2.4-1.el7 I get the following error after converting my code(outside Cheetah) from Python2 to Python3 using 2to3 program and replacing Cheetah2 with Cheetah3. I referred to some articles on StackOverflow itself and found…
1
vote
1 answer

Problem in installing update cheetah==2.4.4

I'm trying to install updates from my requirements.txt: pip install -r requirements.txt but when the installing has arrived to cheetah it printed this error: I'm trying to run some updates require by pycharm, so for the update of cheetah I got this…
1
vote
1 answer

Check if Cheetah Template Dict has key

I am trying to come up with a base template for an application and one of the goals would be to remove any unnecessary js/css from pages so I want to do something in the cheetah template like #if $dict.has_key('datepicker'):
BillPull
  • 8,335
  • 15
  • 54
  • 93
1
vote
0 answers

JQuery plugin function not found on a Cheetah Template

I am trying to make a comment form for a website that allows users to leave their name, email, and a comment on an html file that is a cheetah template. I want to use this JQuery plugin to validate input: http://docs.jquery.com/Plugins/validation I…
mjb81
  • 11
  • 1
1
vote
1 answer

How to catch Cheetah NameMapper.NotFound exception?

I've a piece of code: #try: $inv.customer.org.name #except NameMapper.NotFound #try: …
Juha Tuomala
  • 103
  • 10