Commits

Shabda Raaj committed 1c75bff

Missing files

Comments (0)

Files changed (5)

books/mylibrary/admin.py

+from mylibrary.models import Book
+from django.contrib import admin
+
+admin.site.register(Book)
+

books/mylibrary/grids.py

+from datagrid.grids import DataGrid, Column, NonDatabaseColumn
+
+
+class SimpleGrid(DataGrid):
+    name = NonDatabaseColumn("Hello")
+    
+class RealGrid(DataGrid):
+    name = Column()
+    publisher = Column()
+    recommended_by = Column()
+    

books/mylibrary/templates/mylibrary/real.html

+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+    "http://www.w3.org/TR/html4/strict.dtd"
+    >
+<html lang="en">
+<head>
+    <title><!-- Insert your title here --></title>
+</head>
+<body>
+    {{ datagrid.render_listview }}
+</body>
+</html>

books/mylibrary/templates/mylibrary/simple.html

+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+    "http://www.w3.org/TR/html4/strict.dtd"
+    >
+<html lang="en">
+<head>
+    <title><!-- Insert your title here --></title>
+</head>
+<body>
+    {{ datagrid.render_listview }}
+</body>
+</html>

books/mylibrary/urls.py

+from django.conf.urls.defaults import *
+
+
+
+urlpatterns = patterns('mylibrary.views',
+    url("simple/$", "simple"),
+    url("real/$", "real"),
+
+)