Wiki

Version 52 (Etienne Pallier, 03/18/2016 12:04 pm)

1 1 Etienne Pallier
h1. Technical Documentation for the PYROS project (FGFT-CC)
2 1 Etienne Pallier
3 1 Etienne Pallier
4 1 Etienne Pallier
HOWTO Format Redmine Wiki : http://www.redmine.org/projects/redmine/wiki/FrRedmineWikiFormatting
5 1 Etienne Pallier
6 1 Etienne Pallier
{{>toc}}
7 1 Etienne Pallier
8 1 Etienne Pallier
9 1 Etienne Pallier
10 3 Etienne Pallier
---
11 1 Etienne Pallier
12 17 Etienne Pallier
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}I - INSTALLATION%
13 2 Etienne Pallier
14 51 Etienne Pallier
h3. If necessary, install MySql
15 2 Etienne Pallier
16 49 Etienne Pallier
 * Linux Ubuntu
17 49 Etienne Pallier
<pre>
18 49 Etienne Pallier
TODO:
19 49 Etienne Pallier
$ sudo apt-get install mysql
20 49 Etienne Pallier
...
21 49 Etienne Pallier
</pre>
22 49 Etienne Pallier
23 49 Etienne Pallier
 * Linux CentOS
24 49 Etienne Pallier
<pre>
25 49 Etienne Pallier
TODO:
26 49 Etienne Pallier
$ sudo yum install mysql
27 49 Etienne Pallier
...
28 49 Etienne Pallier
</pre>
29 49 Etienne Pallier
30 49 Etienne Pallier
 * Mac OS X
31 49 Etienne Pallier
<pre>
32 49 Etienne Pallier
TODO:
33 49 Etienne Pallier
Install XAMPP
34 49 Etienne Pallier
(but you could also use the pre-installed Mac OS MySql)
35 49 Etienne Pallier
</pre>
36 49 Etienne Pallier
37 49 Etienne Pallier
 * Windows
38 49 Etienne Pallier
<pre>
39 49 Etienne Pallier
TODO:
40 49 Etienne Pallier
</pre>
41 49 Etienne Pallier
42 49 Etienne Pallier
43 49 Etienne Pallier
---
44 1 Etienne Pallier
45 6 Etienne Pallier
h3. Create database
46 1 Etienne Pallier
47 52 Etienne Pallier
48 52 Etienne Pallier
 * Linux and Mac OS X:
49 52 Etienne Pallier
50 52 Etienne Pallier
<pre>
51 3 Etienne Pallier
One liner:
52 3 Etienne Pallier
$ mysql -u root < pyros.sql
53 1 Etienne Pallier
54 3 Etienne Pallier
Or :
55 3 Etienne Pallier
$ mysql -u root
56 3 Etienne Pallier
mysql> create database pyros;
57 3 Etienne Pallier
mysql> use pyros;
58 3 Etienne Pallier
mysql> source pyros.sql;
59 1 Etienne Pallier
60 3 Etienne Pallier
(
61 3 Etienne Pallier
TODO:
62 3 Etienne Pallier
mysql> grant all on pyros.* to pyros@localhost identified by ‘pyros’;)
63 3 Etienne Pallier
mysql> flush privileges;
64 3 Etienne Pallier
)
65 52 Etienne Pallier
</pre>
66 1 Etienne Pallier
67 52 Etienne Pallier
 * Windows :
68 52 Etienne Pallier
69 52 Etienne Pallier
<pre>
70 52 Etienne Pallier
TODO: Use phpmyadmin ?
71 52 Etienne Pallier
</pre>
72 1 Etienne Pallier
73 1 Etienne Pallier
74 4 Etienne Pallier
---
75 5 Etienne Pallier
76 6 Etienne Pallier
h3. Install python3.5
77 1 Etienne Pallier
78 11 Etienne Pallier
79 11 Etienne Pallier
 * Mac OS X :
80 23 Etienne Pallier
<pre>
81 24 Etienne Pallier
1) Installer MacPort
82 24 Etienne Pallier
(TODO: doc)
83 24 Etienne Pallier
84 24 Etienne Pallier
2) Installer le "port" python35
85 1 Etienne Pallier
$ sudo port install python35
86 23 Etienne Pallier
</pre>
87 1 Etienne Pallier
88 11 Etienne Pallier
 * Linux (Ubuntu) :
89 23 Etienne Pallier
<pre>
90 1 Etienne Pallier
$ sudo apt-get ...
91 23 Etienne Pallier
</pre>
92 1 Etienne Pallier
93 5 Etienne Pallier
94 3 Etienne Pallier
95 4 Etienne Pallier
---
96 5 Etienne Pallier
97 13 Etienne Pallier
h3. Create project dir
98 13 Etienne Pallier
99 13 Etienne Pallier
$ mkdir pyros
100 13 Etienne Pallier
101 13 Etienne Pallier
102 13 Etienne Pallier
---
103 13 Etienne Pallier
104 14 Etienne Pallier
h3. Create virtualenv with python3.5 dedicated to pyros project
105 3 Etienne Pallier
106 3 Etienne Pallier
$ cd pyros/
107 3 Etienne Pallier
108 3 Etienne Pallier
$ which python3.5
109 3 Etienne Pallier
/opt/local/bin/python3.5
110 3 Etienne Pallier
111 15 Etienne Pallier
$ virtualenv-3.5 venv_py35_pyros -p /opt/local/bin/python3.5
112 3 Etienne Pallier
=> creates a venv_py35_pyros/ folder inside pyros/
113 3 Etienne Pallier
114 1 Etienne Pallier
115 1 Etienne Pallier
116 7 Etienne Pallier
---
117 3 Etienne Pallier
118 16 Etienne Pallier
h3. Activate venv
119 7 Etienne Pallier
120 3 Etienne Pallier
$ source venv_py35_pyros/bin/activate
121 3 Etienne Pallier
122 3 Etienne Pallier
$ python -V
123 3 Etienne Pallier
Python 3.5.1
124 3 Etienne Pallier
125 3 Etienne Pallier
$ which pip
126 1 Etienne Pallier
…/pyros/venv_py35_pyros/bin/pip
127 16 Etienne Pallier
128 18 Etienne Pallier
Upgrade pip to last version available :
129 3 Etienne Pallier
130 3 Etienne Pallier
$ pip install --upgrade pip
131 3 Etienne Pallier
Collecting pip
132 3 Etienne Pallier
  Downloading pip-8.1.1-py2.py3-none-any.whl (1.2MB)
133 3 Etienne Pallier
Installing collected packages: pip
134 3 Etienne Pallier
  Found existing installation: pip 7.1.2
135 3 Etienne Pallier
    Uninstalling pip-7.1.2:
136 3 Etienne Pallier
      Successfully uninstalled pip-7.1.2
137 1 Etienne Pallier
Successfully installed pip-8.1.1
138 18 Etienne Pallier
139 27 Etienne Pallier
h3. Install needed python packages (from within the virtual environment)
140 18 Etienne Pallier
141 3 Etienne Pallier
142 33 Etienne Pallier
*Install Django* :
143 32 Etienne Pallier
144 32 Etienne Pallier
<pre>
145 3 Etienne Pallier
$ pip install django
146 3 Etienne Pallier
Collecting django
147 3 Etienne Pallier
  Downloading Django-1.9.4-py2.py3-none-any.whl (6.6MB)
148 3 Etienne Pallier
Installing collected packages: django
149 3 Etienne Pallier
Successfully installed django-1.9.4
150 3 Etienne Pallier
151 3 Etienne Pallier
$ pip install django-admin-tools
152 3 Etienne Pallier
Collecting django-admin-tools
153 3 Etienne Pallier
  Downloading django_admin_tools-0.7.2-py2.py3-none-any.whl (289kB)
154 3 Etienne Pallier
Installing collected packages: django-admin-tools
155 3 Etienne Pallier
Successfully installed django-admin-tools-0.7.2
156 3 Etienne Pallier
157 21 Etienne Pallier
$ pip install django-debug-toolbar
158 21 Etienne Pallier
Collecting django-debug-toolbar
159 21 Etienne Pallier
  Downloading django_debug_toolbar-1.4-py2.py3-none-any.whl (212kB)
160 21 Etienne Pallier
Requirement already satisfied (use --upgrade to upgrade): Django>=1.7 in ./venv_py35_pyros/lib/python3.5/site-packages (from django-debug-toolbar)
161 21 Etienne Pallier
Collecting sqlparse (from django-debug-toolbar)
162 21 Etienne Pallier
  Downloading sqlparse-0.1.19.tar.gz (58kB)
163 21 Etienne Pallier
Building wheels for collected packages: sqlparse
164 21 Etienne Pallier
  Running setup.py bdist_wheel for sqlparse ... done
165 21 Etienne Pallier
  Stored in directory: /Users/epallier/Library/Caches/pip/wheels/7b/d4/72/6011bb100dd5fc213164e4bbee13d4e03261dd54ce6a5de6b8
166 21 Etienne Pallier
Successfully built sqlparse
167 21 Etienne Pallier
Installing collected packages: sqlparse, django-debug-toolbar
168 21 Etienne Pallier
Successfully installed django-debug-toolbar-1.4 sqlparse-0.1.19
169 21 Etienne Pallier
170 21 Etienne Pallier
$ pip install django-extensions
171 21 Etienne Pallier
Collecting django-extensions
172 21 Etienne Pallier
  Downloading django_extensions-1.6.1-py2.py3-none-any.whl (202kB)
173 21 Etienne Pallier
Collecting six>=1.2 (from django-extensions)
174 21 Etienne Pallier
  Downloading six-1.10.0-py2.py3-none-any.whl
175 21 Etienne Pallier
Installing collected packages: six, django-extensions
176 21 Etienne Pallier
Successfully installed django-extensions-1.6.1 six-1.10.0
177 21 Etienne Pallier
178 21 Etienne Pallier
$ pip install django-suit
179 21 Etienne Pallier
Collecting django-suit
180 21 Etienne Pallier
  Downloading django-suit-0.2.18.tar.gz (587kB)
181 21 Etienne Pallier
Building wheels for collected packages: django-suit
182 1 Etienne Pallier
  Running setup.py bdist_wheel for django-suit ... done
183 1 Etienne Pallier
  Stored in directory: /Users/epallier/Library/Caches/pip/wheels/12/8b/9a/e02ab0ad9229881638aa040d47d77c8f562999533811927d41
184 1 Etienne Pallier
Successfully built django-suit
185 1 Etienne Pallier
Installing collected packages: django-suit
186 1 Etienne Pallier
Successfully installed django-suit-0.2.18
187 21 Etienne Pallier
188 32 Etienne Pallier
</pre>
189 32 Etienne Pallier
190 33 Etienne Pallier
*Install the web application server gunicorn (will be used in production instead of the dev django web server)* :
191 32 Etienne Pallier
<pre>
192 25 Etienne Pallier
$ pip install gunicorn
193 25 Etienne Pallier
Collecting gunicorn
194 25 Etienne Pallier
  Downloading gunicorn-19.4.5-py2.py3-none-any.whl (112kB)
195 21 Etienne Pallier
Installing collected packages: gunicorn
196 26 Etienne Pallier
Successfully installed gunicorn-19.4.5
197 32 Etienne Pallier
</pre>
198 1 Etienne Pallier
199 33 Etienne Pallier
*Install the python mysql client*:
200 32 Etienne Pallier
<pre>
201 32 Etienne Pallier
$ pip install mysqlclient
202 32 Etienne Pallier
...
203 32 Etienne Pallier
</pre>
204 20 Etienne Pallier
205 33 Etienne Pallier
=> Issue under Mac OS X:
206 21 Etienne Pallier
<pre>
207 20 Etienne Pallier
208 3 Etienne Pallier
Collecting mysqlclient
209 3 Etienne Pallier
  Downloading mysqlclient-1.3.7.tar.gz (79kB)
210 1 Etienne Pallier
Building wheels for collected packages: mysqlclient
211 22 Etienne Pallier
  Running setup.py bdist_wheel for mysqlclient ... error
212 3 Etienne Pallier
213 3 Etienne Pallier
  ----------------------------------------
214 1 Etienne Pallier
  Failed building wheel for mysqlclient
215 1 Etienne Pallier
  Running setup.py clean for mysqlclient
216 1 Etienne Pallier
Failed to build mysqlclient
217 1 Etienne Pallier
Installing collected packages: mysqlclient
218 1 Etienne Pallier
  Running setup.py install for mysqlclient ... done
219 1 Etienne Pallier
Successfully installed mysqlclient-1.3.7
220 1 Etienne Pallier
221 1 Etienne Pallier
BOUH !!!
222 1 Etienne Pallier
223 1 Etienne Pallier
$ pip install --upgrade wheel
224 1 Etienne Pallier
Collecting wheel
225 1 Etienne Pallier
  Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
226 1 Etienne Pallier
Installing collected packages: wheel
227 1 Etienne Pallier
  Found existing installation: wheel 0.24.0
228 1 Etienne Pallier
    Uninstalling wheel-0.24.0:
229 1 Etienne Pallier
      Successfully uninstalled wheel-0.24.0
230 1 Etienne Pallier
Successfully installed wheel-0.29.0
231 1 Etienne Pallier
232 1 Etienne Pallier
$ pip uninstall mysqlclient
233 1 Etienne Pallier
234 1 Etienne Pallier
$ pip install mysqlclient
235 1 Etienne Pallier
Collecting mysqlclient
236 1 Etienne Pallier
  Using cached mysqlclient-1.3.7.tar.gz
237 1 Etienne Pallier
Building wheels for collected packages: mysqlclient
238 1 Etienne Pallier
  Running setup.py bdist_wheel for mysqlclient ... done
239 1 Etienne Pallier
  Stored in directory: /Users/epallier/Library/Caches/pip/wheels/9b/06/50/d11418c26cf8f2156b13d4363b5afde8e7e75ebb8540d0228d
240 1 Etienne Pallier
Successfully built mysqlclient
241 1 Etienne Pallier
Installing collected packages: mysqlclient
242 1 Etienne Pallier
Successfully installed mysqlclient-1.3.7
243 1 Etienne Pallier
244 1 Etienne Pallier
YES !!!
245 21 Etienne Pallier
</pre>
246 1 Etienne Pallier
247 1 Etienne Pallier
248 12 Etienne Pallier
249 12 Etienne Pallier
250 12 Etienne Pallier
---
251 12 Etienne Pallier
252 28 Etienne Pallier
h3. Project organization
253 12 Etienne Pallier
 
254 29 Etienne Pallier
Example of a good organization :
255 1 Etienne Pallier
256 29 Etienne Pallier
1 project = N applis
257 29 Etienne Pallier
(but 1 appli can be part of many projects)
258 30 Etienne Pallier
(then 1 appli = N models)
259 12 Etienne Pallier
260 31 Etienne Pallier
<pre>
261 34 Etienne Pallier
262 29 Etienne Pallier
MYPROJECT/
263 34 Etienne Pallier
264 50 Etienne Pallier
265 1 Etienne Pallier
	src/
266 1 Etienne Pallier
		myproject/
267 34 Etienne Pallier
		appli1/
268 34 Etienne Pallier
		appli2/
269 12 Etienne Pallier
270 34 Etienne Pallier
		appliN/
271 34 Etienne Pallier
272 12 Etienne Pallier
	public/
273 34 Etienne Pallier
		static/
274 34 Etienne Pallier
275 12 Etienne Pallier
	private/
276 1 Etienne Pallier
		requirements.txt
277 50 Etienne Pallier
278 50 Etienne Pallier
	venv_py35_pyros/
279 50 Etienne Pallier
280 1 Etienne Pallier
</pre>
281 1 Etienne Pallier
282 1 Etienne Pallier
283 37 Etienne Pallier
Set needed folders:
284 37 Etienne Pallier
<pre>
285 37 Etienne Pallier
$ cd pyros/
286 12 Etienne Pallier
$ mkdir private public
287 12 Etienne Pallier
$ mkdir public/static
288 37 Etienne Pallier
</pre>
289 3 Etienne Pallier
290 7 Etienne Pallier
---
291 3 Etienne Pallier
292 39 Etienne Pallier
h3. Create Django project pyros
293 7 Etienne Pallier
294 38 Etienne Pallier
<pre>
295 38 Etienne Pallier
$ cd pyros/
296 38 Etienne Pallier
297 3 Etienne Pallier
$ django-admin startproject pyros
298 3 Etienne Pallier
299 3 Etienne Pallier
$ tree pyros/
300 3 Etienne Pallier
pyros/
301 3 Etienne Pallier
├── manage.py
302 3 Etienne Pallier
└── pyros
303 3 Etienne Pallier
    ├── __init__.py
304 3 Etienne Pallier
    ├── settings.py
305 3 Etienne Pallier
    ├── urls.py
306 3 Etienne Pallier
    └── wsgi.py
307 3 Etienne Pallier
308 3 Etienne Pallier
$ mv pyros src
309 3 Etienne Pallier
310 3 Etienne Pallier
$ cd src/
311 3 Etienne Pallier
312 3 Etienne Pallier
$ ./manage.py runserver
313 40 Etienne Pallier
(or gunicorn pyros.wsgi)
314 1 Etienne Pallier
==> http://localhost:8000
315 38 Etienne Pallier
</pre>
316 3 Etienne Pallier
317 3 Etienne Pallier
318 7 Etienne Pallier
---
319 3 Etienne Pallier
320 42 Etienne Pallier
h3. Set Database engine as MySql
321 7 Etienne Pallier
322 3 Etienne Pallier
Edit src/pyros/settings.py
323 3 Etienne Pallier
324 41 Etienne Pallier
<pre>
325 3 Etienne Pallier
DATABASES = {
326 3 Etienne Pallier
    'default': {
327 3 Etienne Pallier
        'ENGINE': 'django.db.backends.mysql',
328 1 Etienne Pallier
        'NAME': 'pyros',
329 3 Etienne Pallier
        'USER': 'root',
330 1 Etienne Pallier
        'PASSWORD': ''
331 1 Etienne Pallier
    }
332 1 Etienne Pallier
}
333 41 Etienne Pallier
</pre>
334 3 Etienne Pallier
335 7 Etienne Pallier
---
336 3 Etienne Pallier
337 43 Etienne Pallier
h3. Import database into Django (with inspectdb)
338 7 Etienne Pallier
339 43 Etienne Pallier
$ cd src/
340 3 Etienne Pallier
341 3 Etienne Pallier
$ ./manage.py inspectdb > models.py
342 3 Etienne Pallier
343 44 Etienne Pallier
*Issue on Mac OS X*:
344 44 Etienne Pallier
<pre>
345 3 Etienne Pallier
Traceback (most recent call last):
346 3 Etienne Pallier
  File "/Users/epallier/Documents/_W_more/PROJECTS/GFT/SOFT/PYROS/pyros/venv_py35_pyros/lib/python3.5/site-packages/django/db/backends/mysql/base.py", line 25, in <module>
347 3 Etienne Pallier
    import MySQLdb as Database
348 3 Etienne Pallier
  File "/Users/epallier/Documents/_W_more/PROJECTS/GFT/SOFT/PYROS/pyros/venv_py35_pyros/lib/python3.5/site-packages/MySQLdb/__init__.py", line 19, in <module>
349 3 Etienne Pallier
    import _mysql
350 3 Etienne Pallier
ImportError: dlopen(/Users/epallier/Documents/_W_more/PROJECTS/GFT/SOFT/PYROS/pyros/venv_py35_pyros/lib/python3.5/site-packages/_mysql.cpython-35m-darwin.so, 2): Library not loaded: libmysqlclient.18.dylib
351 3 Etienne Pallier
  Referenced from: /Users/epallier/Documents/_W_more/PROJECTS/GFT/SOFT/PYROS/pyros/venv_py35_pyros/lib/python3.5/site-packages/_mysql.cpython-35m-darwin.so
352 3 Etienne Pallier
  Reason: image not found
353 3 Etienne Pallier
354 3 Etienne Pallier
=> BOUH !!!
355 3 Etienne Pallier
356 3 Etienne Pallier
LA SOLUTION EST ICI : http://stackoverflow.com/questions/6383310/python-mysqldb-library-not-loaded-libmysqlclient-18-dylib
357 3 Etienne Pallier
358 3 Etienne Pallier
(
359 3 Etienne Pallier
Apparemment, ceci aurait dû suffire:
360 3 Etienne Pallier
mkdir -p /usr/local/lib   
361 3 Etienne Pallier
ln -s /usr/local/mysql/lib/libmysql* /usr/local/lib
362 3 Etienne Pallier
)
363 3 Etienne Pallier
364 3 Etienne Pallier
Mais j’ai fait ceci:
365 3 Etienne Pallier
366 3 Etienne Pallier
$ otool -L /Users/epallier/Documents/_W_more/PROJECTS/GFT/SOFT/PYROS/pyros/venv_py35_pyros/lib/python3.5/site-packages/_mysql.cpython-35m-darwin.so
367 3 Etienne Pallier
/Users/epallier/Documents/_W_more/PROJECTS/GFT/SOFT/PYROS/pyros/venv_py35_pyros/lib/python3.5/site-packages/_mysql.cpython-35m-darwin.so:
368 1 Etienne Pallier
	libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)
369 10 Etienne Pallier
...
370 3 Etienne Pallier
371 3 Etienne Pallier
$ locate libmysqlclient.18.dylib
372 3 Etienne Pallier
/Applications/XAMPP/xamppfiles/lib/libmysqlclient.18.dylib
373 1 Etienne Pallier
/Library/SystemMigration/History/Migration-68137DFB-CB6A-4FBB-81E2-11BDB5D01E48/QuarantineRoot/usr/lib/libmysqlclient.18.dylib
374 1 Etienne Pallier
375 1 Etienne Pallier
$ sudo install_name_tool -change libmysqlclient.18.dylib /Applications/XAMPP/xamppfiles/lib/libmysqlclient.18.dylib /Users/epallier/Documents/_W_more/PROJECTS/GFT/SOFT/PYROS/pyros/venv_py35_pyros/lib/python3.5/site-packages/_mysql.cpython-35m-darwin.so
376 1 Etienne Pallier
377 10 Etienne Pallier
$ otool -L /Users/epallier/Documents/_W_more/PROJECTS/GFT/SOFT/PYROS/pyros/venv_py35_pyros/lib/python3.5/site-packages/_mysql.cpython-35m-darwin.so
378 10 Etienne Pallier
/Users/epallier/Documents/_W_more/PROJECTS/GFT/SOFT/PYROS/pyros/venv_py35_pyros/lib/python3.5/site-packages/_mysql.cpython-35m-darwin.so:
379 10 Etienne Pallier
	/Applications/XAMPP/xamppfiles/lib/libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)
380 10 Etienne Pallier
...
381 3 Etienne Pallier
382 1 Etienne Pallier
$ ./manage.py inspectdb > models.py
383 1 Etienne Pallier
384 3 Etienne Pallier
=> YES !!!
385 44 Etienne Pallier
</pre>
386 3 Etienne Pallier
387 3 Etienne Pallier
388 7 Etienne Pallier
---
389 3 Etienne Pallier
390 48 Etienne Pallier
h3. Create a Django application pyrosapp
391 7 Etienne Pallier
392 3 Etienne Pallier
$ ./manage.py startapp pyrosapp
393 3 Etienne Pallier
394 3 Etienne Pallier
$ tree src
395 3 Etienne Pallier
src
396 3 Etienne Pallier
├── manage.py
397 3 Etienne Pallier
├── pyros
398 3 Etienne Pallier
│   ├── __init__.py
399 3 Etienne Pallier
│   ├── __pycache__
400 3 Etienne Pallier
│   │   ├── __init__.cpython-35.pyc
401 3 Etienne Pallier
│   │   ├── settings.cpython-35.pyc
402 3 Etienne Pallier
│   │   ├── urls.cpython-35.pyc
403 3 Etienne Pallier
│   │   └── wsgi.cpython-35.pyc
404 3 Etienne Pallier
│   ├── settings.py
405 3 Etienne Pallier
│   ├── urls.py
406 3 Etienne Pallier
│   └── wsgi.py
407 3 Etienne Pallier
└── pyrosapp
408 3 Etienne Pallier
    ├── __init__.py
409 1 Etienne Pallier
    ├── admin.py
410 3 Etienne Pallier
    ├── apps.py
411 1 Etienne Pallier
    ├── migrations
412 1 Etienne Pallier
    │   └── __init__.py
413 3 Etienne Pallier
    ├── models.py
414 3 Etienne Pallier
    ├── tests.py
415 3 Etienne Pallier
    └── views.py
416 1 Etienne Pallier
417 1 Etienne Pallier
418 7 Etienne Pallier
---
419 1 Etienne Pallier
420 7 Etienne Pallier
h3. Replace the default pyrosapp models.py with the inspectdb generated one
421 7 Etienne Pallier
422 3 Etienne Pallier
$ mv models.py pyrosapp/
423 3 Etienne Pallier
424 3 Etienne Pallier
425 3 Etienne Pallier
426 3 Etienne Pallier
427 7 Etienne Pallier
428 1 Etienne Pallier
---
429 9 Etienne Pallier
430 47 Etienne Pallier
h3. *TODO: Fix and improve the inspectdb generated file models.py*
431 3 Etienne Pallier
432 3 Etienne Pallier
$ cd pyrosapp/
433 3 Etienne Pallier
434 8 Etienne Pallier
$ vi models.py