Browse Source

Renaming new_model to model, now that the old bsddb model is out of the way.

Dan Helfman 10 years ago
parent
commit
bbebad528e

+ 2
- 2
controller/Notebooks.py View File

@@ -6,8 +6,8 @@ from Database import Valid_id, Valid_revision
6 6
 from Users import grab_user_id
7 7
 from Expire import strongly_expire
8 8
 from Html_nuker import Html_nuker
9
-from new_model.Notebook import Notebook
10
-from new_model.Note import Note
9
+from model.Notebook import Notebook
10
+from model.Note import Note
11 11
 from view.Main_page import Main_page
12 12
 from view.Json import Json
13 13
 from view.Html_file import Html_file

+ 1
- 1
controller/Root.py View File

@@ -5,7 +5,7 @@ from Validate import validate
5 5
 from Notebooks import Notebooks
6 6
 from Users import Users
7 7
 from Database import Valid_id
8
-from new_model.Note import Note
8
+from model.Note import Note
9 9
 from view.Main_page import Main_page
10 10
 from view.Json import Json
11 11
 from view.Error_page import Error_page

+ 4
- 4
controller/Users.py View File

@@ -2,10 +2,10 @@ import re
2 2
 import cherrypy
3 3
 from pytz import utc
4 4
 from datetime import datetime, timedelta
5
-from new_model.User import User
6
-from new_model.Notebook import Notebook
7
-from new_model.Note import Note
8
-from new_model.Password_reset import Password_reset
5
+from model.User import User
6
+from model.Notebook import Notebook
7
+from model.Note import Note
8
+from model.Password_reset import Password_reset
9 9
 from Expose import expose
10 10
 from Validate import validate, Valid_string, Valid_bool, Validation_error
11 11
 from Database import Valid_id

+ 1
- 1
controller/test/Stub_object.py View File

@@ -1,5 +1,5 @@
1 1
 from datetime import datetime
2
-from new_model.Persistent import Persistent, quote
2
+from model.Persistent import Persistent, quote
3 3
 
4 4
 
5 5
 def notz_quote( value ):

+ 3
- 3
controller/test/Test_controller.py View File

@@ -8,9 +8,9 @@ from StringIO import StringIO
8 8
 
9 9
 class Test_controller( object ):
10 10
   def __init__( self ):
11
-    from new_model.User import User
12
-    from new_model.Notebook import Notebook
13
-    from new_model.Note import Note
11
+    from model.User import User
12
+    from model.Notebook import Notebook
13
+    from model.Note import Note
14 14
 
15 15
     # Since Stub_database isn't a real database and doesn't know SQL, replace some of the
16 16
     # SQL-returning methods in User, Note, and Notebook to return functions that manipulate data in

+ 3
- 3
controller/test/Test_notebooks.py View File

@@ -2,9 +2,9 @@ import cherrypy
2 2
 import cgi
3 3
 from urllib import quote
4 4
 from Test_controller import Test_controller
5
-from new_model.Notebook import Notebook
6
-from new_model.Note import Note
7
-from new_model.User import User
5
+from model.Notebook import Notebook
6
+from model.Note import Note
7
+from model.User import User
8 8
 
9 9
 
10 10
 class Test_notebooks( Test_controller ):

+ 1
- 1
controller/test/Test_root.py View File

@@ -1,5 +1,5 @@
1 1
 import cherrypy
2
-from new_model.User import User
2
+from model.User import User
3 3
 from controller.Scheduler import Scheduler
4 4
 from Test_controller import Test_controller
5 5
 

+ 4
- 4
controller/test/Test_users.py View File

@@ -6,10 +6,10 @@ from datetime import datetime, timedelta
6 6
 from nose.tools import raises
7 7
 from Test_controller import Test_controller
8 8
 from Stub_smtp import Stub_smtp
9
-from new_model.User import User
10
-from new_model.Notebook import Notebook
11
-from new_model.Note import Note
12
-from new_model.Password_reset import Password_reset
9
+from model.User import User
10
+from model.Notebook import Notebook
11
+from model.Note import Note
12
+from model.Password_reset import Password_reset
13 13
 
14 14
 
15 15
 class Test_users( Test_controller ):

new_model/Note.py → model/Note.py View File


new_model/Notebook.py → model/Notebook.py View File


new_model/Password_reset.py → model/Password_reset.py View File


new_model/Persistent.py → model/Persistent.py View File


new_model/User.py → model/User.py View File


new_model/__init__.py → model/__init__.py View File


new_model/drop.sql → model/drop.sql View File


new_model/schema.sql → model/schema.sql View File


new_model/test/Test_note.py → model/test/Test_note.py View File

@@ -1,6 +1,6 @@
1 1
 from pytz import utc
2 2
 from datetime import datetime, timedelta
3
-from new_model.Note import Note
3
+from model.Note import Note
4 4
 
5 5
 
6 6
 class Test_note( object ):

new_model/test/Test_notebook.py → model/test/Test_notebook.py View File

@@ -1,7 +1,7 @@
1 1
 from pytz import utc
2 2
 from datetime import datetime, timedelta
3
-from new_model.Notebook import Notebook
4
-from new_model.Note import Note
3
+from model.Notebook import Notebook
4
+from model.Note import Note
5 5
 
6 6
 
7 7
 class Test_notebook( object ):

new_model/test/Test_password_reset.py → model/test/Test_password_reset.py View File

@@ -1,5 +1,5 @@
1
-from new_model.User import User
2
-from new_model.Password_reset import Password_reset
1
+from model.User import User
2
+from model.Password_reset import Password_reset
3 3
 
4 4
 
5 5
 class Test_password_reset( object ):

new_model/test/Test_persistent.py → model/test/Test_persistent.py View File

@@ -1,6 +1,6 @@
1 1
 from pytz import utc
2 2
 from datetime import datetime, timedelta
3
-from new_model.Persistent import Persistent, quote
3
+from model.Persistent import Persistent, quote
4 4
 
5 5
 
6 6
 class Test_persistent( object ):

new_model/test/Test_user.py → model/test/Test_user.py View File

@@ -1,6 +1,6 @@
1 1
 from pytz import utc
2 2
 from datetime import datetime, timedelta
3
-from new_model.User import User
3
+from model.User import User
4 4
 
5 5
 
6 6
 class Test_user( object ):

+ 5
- 5
tools/initdb.py View File

@@ -4,9 +4,9 @@ import os
4 4
 import os.path
5 5
 import sys
6 6
 from controller.Database import Database
7
-from new_model.Notebook import Notebook
8
-from new_model.Note import Note
9
-from new_model.User import User
7
+from model.Notebook import Notebook
8
+from model.Note import Note
9
+from model.User import User
10 10
 
11 11
 
12 12
 class Initializer( object ):
@@ -31,9 +31,9 @@ class Initializer( object ):
31 31
     self.anonymous = None
32 32
 
33 33
     if nuke is True:
34
-      self.database.execute( file( "new_model/drop.sql" ).read(), commit = False )
34
+      self.database.execute( file( "model/drop.sql" ).read(), commit = False )
35 35
 
36
-    self.database.execute( file( "new_model/schema.sql" ).read(), commit = False )
36
+    self.database.execute( file( "model/schema.sql" ).read(), commit = False )
37 37
 
38 38
     self.create_main_notebook()
39 39
     self.create_anonymous_user()

+ 3
- 3
tools/updatedb.py View File

@@ -4,9 +4,9 @@ import os
4 4
 import os.path
5 5
 from config.Common import settings
6 6
 from controller.Database import Database
7
-from new_model.Notebook import Notebook
8
-from new_model.Note import Note
9
-from new_model.User import User
7
+from model.Notebook import Notebook
8
+from model.Note import Note
9
+from model.User import User
10 10
 from tools.initdb import fix_note_contents
11 11
 
12 12