Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1027 (closed enhancement: fixed)

Opened 13 years ago

Last modified 12 years ago

TurboDjango template

Reported by: fredlin Owned by: anonymous
Priority: normal Milestone:
Component: CherryPy Version: 0.9a6
Severity: normal Keywords: django template
Cc:

Description

Lots of people use Django template for Pyhton webframework(As Django project shares).

And if we want to make people feel comfortable to try TurboGears (and then migrate to tg hopefully), first thing we can do is make django template system available on TurboGears.

controller.py

    @expose(template = "django:dem.templates.djpage")
    def page(self):
        return dict(name="TurboGears")

djpage.tmpl

<h1>Hello, {{name}}</h1>

surf  http://localhost:8080/page you'll see

Hello, TurboGears

djpage is django template name, the template has "tmpl" file suffix

Attachments

turbodjango-0.9.5-py2.4.egg Download (4.8 KB) - added by fredlin 13 years ago.
turbodjango.zip Download (4.9 KB) - added by fredlin 13 years ago.

Change History

Changed 13 years ago by fredlin

Changed 13 years ago by fredlin

comment:1 Changed 13 years ago by fredlin

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.