david / django-modelviews
Backup of an old repository with useful ideas. Initial goal: integrating REST to django admin (class-based views).
Clone this repository (size: 85.8 KB): HTTPS / SSH
$ hg clone http://code.welldev.org/django-modelviews
| commit 45: | 89bfa8b44768 |
| parent 44: | add8532b04a8 |
| branch: | default |
Documentation in progress
2 years ago
Changed (Δ668 bytes):
raw changeset »
docs/modelviews.txt (84 lines added, 2 lines removed)
Up to file-list docs/modelviews.txt:
2 |
2 |
Using modelviews with models |
3 |
3 |
============================ |
4 |
4 |
|
5 |
``ModelView`` |
|
6 |
============= |
|
5 |
Introduction |
|
6 |
============ |
|
7 |
7 |
|
8 |
8 |
If you're building a resource-driven app, chances are you'll have views that |
9 |
9 |
map closely to Django models. For instance, you might have a ``Post`` model, |
| … | … | @@ -26,3 +26,85 @@ For example:: |
26 |
26 |
>>> urlpatterns = pattern('', |
27 |
27 |
... url(^blog/(?P<slug>[-\w]+)/(?P<format>(html|json))?/?$), blog, name='blog'), |
28 |
28 |
... ) |
29 |
||
30 |
||
31 |
Resources |
|
32 |
========= |
|
33 |
||
34 |
Goal |
|
35 |
---- |
|
36 |
||
37 |
||
38 |
API |
|
39 |
--- |
|
40 |
||
41 |
get_subset |
|
42 |
~~~~~~~~~~ |
|
43 |
||
44 |
get_responder |
|
45 |
~~~~~~~~~~~~~ |
|
46 |
||
47 |
get_form |
|
48 |
~~~~~~~~ |
|
49 |
||
50 |
save_form |
|
51 |
~~~~~~~~~ |
|
52 |
||
53 |
read |
|
54 |
~~~~ |
|
55 |
||
56 |
create |
|
57 |
~~~~~~ |
|
58 |
||
59 |
update |
|
60 |
~~~~~~ |
|
61 |
||
62 |
delete |
|
63 |
~~~~~~ |
|
64 |
||
65 |
||
66 |
Nested resources |
|
67 |
---------------- |
|
68 |
||
69 |
||
70 |
Responders |
|
71 |
========== |
|
72 |
||
73 |
BaseResponder |
|
74 |
------------- |
|
75 |
||
76 |
HtmlResponder |
|
77 |
------------- |
|
78 |
||
79 |
JsonResponder |
|
80 |
------------- |
|
81 |
||
82 |
XmlResponder |
|
83 |
------------ |
|
84 |
||
85 |
YamlResponder |
|
86 |
------------- |
|
87 |
||
88 |
AtomResponder |
|
89 |
------------- |
|
90 |
||
91 |
RssResponder |
|
92 |
------------ |
|
93 |
||
94 |
||
95 |
Authentication |
|
96 |
============== |
|
97 |
||
98 |
django_authentication |
|
99 |
--------------------- |
|
100 |
||
101 |
django_superuser_authentication |
|
102 |
------------------------------- |
|
103 |
||
104 |
django_staff_authentication |
|
105 |
--------------------------- |
|
106 |
||
107 |
||
108 |
Examples |
|
109 |
======== |
|
110 |
