This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Add a simple index view, using Cheetah.Django.render

  • Loading branch information...
rtyler committed Dec 26, 2009
1 parent 6452197 commit 410371eb3e40585d60fcb92e16ab418160c3482c
Showing with 19 additions and 0 deletions.
  1. +13 −0 Cheetar/templates/index.tmpl
  2. +4 −0 Cheetar/views.py
  3. +2 −0 urls.py
@@ -0,0 +1,13 @@
+<html>
+ <head><title>Django/Cheetah Example</title></head>
+ <body>
+ <center>
+ #if $greet
+ <strong>Hello World!</strong>
+ #else
+ <strong>I'm not saying hello to you</strong>
+ #end if
+ </center>
+ </body>
+</html>
+
View
@@ -1 +1,5 @@
# Create your views here.
+import Cheetah.Django
+
+def index(req):
+ return Cheetah.Django.render('index.tmpl', greet=False)
View
@@ -1,10 +1,12 @@
from django.conf.urls.defaults import *
+import Cheetar.views
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
+ (r'.*', Cheetar.views.index),
# Example:
# (r'^django_cheetah_example/', include('django_cheetah_example.foo.urls')),

0 comments on commit 410371e

Please sign in to comment.