-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
42 lines (30 loc) · 955 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Sphinx documentation.
=====================
If was lucky enough to succesfully build gh-pages branch, you could try to view the documentation here: http://toudi.github.com/django-grid
Quick and dirty tutorial
========================
This is a very quick info on how to use django-grid. I'll try to supply more documentation later.
First, you need to add 'grid' to your INSTALLED_APPS:
INSTALLED_APPS = (
...,
'grid',
)
create a Model:
from django.db import models
class MyModel(models.Model):
column = models.CharField("Column description", max_length = 255)
then, you need to create a grid based on a model:
from grid import Grid
class MyModelGrid(Grid):
class Meta:
model = MyModel
and last but not least - create a view which would display the grid:
def view(request):
grid = MyModelGrid(request)
return render_to_response(
"grid/object_list.html",
{
"grid": grid,
},
context_instance = RequestContext(request)
)