Merge branch 'master' of ssh://git.onelab.eu/git/myslice
[myslice.git] / README
diff --git a/README b/README
index d56cf54..2b129de 100644 (file)
--- a/README
+++ b/README
@@ -1,12 +1,12 @@
 This file documents the contents of this module
 
-Last update sept. 2013
+Last update sept. 2013
 
 See the devel/ subdir for more devel-oriented doc.
 
 ==================== 1 minute howto
 
-*  REQUIREMENTS  is to have python + django installed django
+*  REQUIREMENTS  is to have python + django (1.5.2) installed django
 ** should be straightforward
 ** see devel/django-install.txt in case of trouble
 
@@ -17,13 +17,19 @@ See the devel/ subdir for more devel-oriented doc.
 * edit myslice/config.py and enter the details of your manifold backend
 
 * init django
-$ manage.py syncdb
+$ ./manage.py syncdb
+$ ./manage.py migrate
 
 * gather static files
 $ ./manage.py collectstatic (formerly, we used make static, which is deprecated)
 -- or --
 $ ./manage.py collectstatic --noinput
 
+* gather templates files 
+  for now we still seem to rely on a make-based templates-collection process
+  that creates all-templates/ 
+$ make templates
+
 * run a local server:
 $ manage.py runserver 0.0.0.0:8000
 -- or -- my advice:
@@ -129,13 +135,10 @@ package is published)
 
 ========== automatically generated 
 
-* all-static: (generated, no need to source-control)
-  this is where 'make static' will gather all your static contents if you run a local server
-  make has convenience targets to refresh this area
-  $ make static 
-  $ make clean-static 
+* static/: (generated by collectstatic, see above, do not source-control)
+  $ manage.py [ --noinput ] collectstatic
 
-* django-static
+* all-templates/
 
 * myslice.sqlite3
   this is where django stores its own stuff, as per settings.py
@@ -150,10 +153,10 @@ package is published)
 
 .. the recommended layout for the various files and pieces (py, html, js and css) with django is
    IMHO really painful; we *SHOULD* use e.g. 
-      plugins/simplelist.py, 
-      plugins/templates/plugins.html,
-      plugins/static/js/simplelist.js 
-      plugins/static/css/simplelist.css
+      plugins/quickfilter/quickfilter.py, 
+      plugins/quickfilter/templates/quickfilter.html,
+      plugins/quickfilter/static/js/quickfilter.js 
+      plugins/quickfilter/static/css/quickfilter.css
    which I have tried doing for a while but I found myself just hopping around in the file tree all
    day long, wasting cycles big time
 
@@ -211,17 +214,40 @@ that would reset all-static/ and all-templates/ for you from the other contents
 
 ======== update django database to reflect changes in existing models without any migration system (e.g., south) =========
 
+# older version
 $python manage.py reset <your_app>
-#Django 1.5.1
+
+#Django 1.5.1 or later
 $python manage.py flush
 
 This will update the database tables for your app, but will completely destroy any data that existed in those tables. 
 If the changes you made to your app model do not break your old schema (for instance, you added a new, optional field) 
 you can simply dump the data before and reload it afterwards, like so:
 
-
+$python manage.py syncdb
 $python manage.py dumpdata <your_app> > temp_data.json
-$python manage.py reset <your_app>
+$python manage.py flush
 $python manage.py loaddata temp_data.json
 
 If your changes break your old schema this won't work - in which case tools like south or django evolution are great.
+
+======== update django database to reflect changes in existing models with migration system (e.g., south) =========
+
+As south is already installed , you just have to do:
+
+$./manage.py migrate
+
+if it fails:
+
+1. go to myslice directory
+2. do sqlite3 myslice.sqlite3 [if sqlite3: command not found, do $apt-get install sqlite3]
+3. check the list of tables with sqlite> .tables
+4. if you find those tables that was mentioned in the failure message while running $./manage.py migrate
+       do sqlite> DROP TABLE mentioned_table 
+       [mentioned_table = the tables that was explicity mentioned in the failure message of $./manage.py migrate]
+5. sqlite> .quit
+6. $./manage.py migrate  
+
+
+
+