-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
148 lines (103 loc) · 4.29 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
dojango-sample
==============
A sample application how to use dojango in combination with other reusable apps.
The following apps are used:
- dojango: https://dojango.googlecode.com/svn/trunk/dojango:
Used for integrating the Dojo Toolkit
- sandoval: http://github.com/streetcleaner/sandoval:
We use this app for having a model and data, we want to show
- django-uni-form: http://github.com/pydanny/django-uni-form
For better and easier form displaying.
- django-treebeard: http://code.tabo.pe/django-treebeard/
Used for showing the capabilities of the TreeStore.
- django-piston: http://bitbucket.org/jespern/django-piston
For creating our own JSON-Rest-API that is used in conjunction with
the models from sandoval.
Installation:
-------------
It is required, that you have installed Python >= 2.5, Django >= 1.1 and
PIL (Python Imaging Library) before!
1. Installing used reusable apps
2. Creating the database
3. Loading data into the database
4. Copying image data to an accessible place
5. Starting the server and see it in action
1. Installation of reusable apps
--------------------------------
For this installation you need to install SVN, GIT and MERCURIAL before.
Alternatively you can download the various packages directly from the above
mentioned websites and place them within the "external_apps" directory.
cd [dojango-sample-dir]
cd external_apps
svn export https://dojango.googlecode.com/svn/trunk/dojango
svn export http://django-tagging.googlecode.com/svn/trunk/tagging
git clone git://github.com/pydanny/django-uni-form.git
ln -s django-uni-form/uni_form .
git clone git://github.com/streetcleaner/sandoval.git
ln -s sandoval/movie .
hg clone http://code.tabo.pe/django-treebeard/
ln -s django-treebeard/treebeard .
hg clone http://bitbucket.org/jespern/django-piston
ln -s django-piston/piston .
2. Creating the database
------------------------
cd [dojango-sample-dir]
python manage.py syncdb
Just enter the requested information for creating an initial django user.
3. Loading data
---------------
cd [dojango-sample-dir]
python manage.py loaddata post # loading sample-data for the tree
python manage.py loaddata movies # loading some sample movies
python manage.py loaddata feeds # loading some information, where to get new movies from
4. Copy image data
-------------------
cd [dojango-sample-dir]
tar xzvf external_apps/movie/fixtures/images.tar.gz
5. Start the server
-------------------
cd [dojango-sample-dir]
python manage.py runserver
This starts the internal django development server and the application will then
be available from here:
http://localhost:8000
Enjoy!
Play with dojango
=================
For further details visit: http://code.google.com/p/dojango/wiki/DojoBuild
Doing a Dojo build
------------------
1. Get a dojo source release
2. Do a dojo build
3. Enable that build for your dojango project
1. Get a dojo source release
-----------------------------
This is fairly simple, because downloading a specific version of Dojo is integrated
into manage.py:
cd [dojango-sample-dir]
python manage.py dojoload
Starts a dojo download of the version, that was defined within DOJANGO_DOJO_VERSION
(should default to the latest) and places it into:
[dojango-sample-dir]/dojo-media/src/[DOJANGO_DOJO_VERSION]
Of course you now can develop your project using the Dojo source release by enabling it
in your settings.py:
DOJANGO_DOJO_PROFILE = "local"
# defaults to the latest version, but can be any version
# that is available within src-folder
# DOJANGO_DOJO_VERSION = "1.4.0"
2. Doing a dojo build
----------------------
Also the starting of a dojo build is integrated into manage.py and this project
has an already setupped build profile defined, so you just have to call:
cd [dojango-sample-dir]
python manage.py dojobuild
Afterwards there will be built version here:
[dojango-sample-dir]/dojo-media/release/[DOJANGO_DOJO_BUILD_VERSION]-dojango-with-dojo
3. Enabling that build
-----------------------
After the build you are able to switch the Dojo environment of your whole project
to it. For that you just have to manipulate your [dojango-sample-dir]/settings.py:
DOJANGO_DOJO_PROFILE = "local_release"
DOJANGO_DOJO_VERSION = "[DOJANGO_DOJO_BUILD_VERSION]-dojango-with-dojo"
If you now reload the initial page on http://localhost:8000 it will require less
JavaScript files.