Wiki

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