Show
Ignore:
Timestamp:
02/27/08 19:34:49 (2 years ago)
Author:
JensDiemer
Message:

-remove all "internal page" stuff.
-add in the _install section update: DROP TABLE PyLucid_pagesinternal.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pylucid/PyLucid/install/update.py

    r1445 r1450  
    2121class Update2(BaseInstall): 
    2222    def view(self): 
    23         self._redirect_execute(self._update) 
     23        self._redirect_execute(self._update_markup) 
     24        self._redirect_execute(self._update_tables) 
    2425 
    2526        return self._simple_render( 
     
    2728        ) 
    2829 
    29     def _update(self): 
     30    def _update_markup(self): 
    3031        print "update markup...", 
    3132        # insert a new markup for html without TinyMCE 
     
    4243        for m in Markup.objects.all(): 
    4344            print "%5s - %s" % (m.id, m) 
     45 
     46    def _update_tables(self): 
     47        print "update database tables...", 
     48        try: 
     49            # FIXME: Can we use the ORM here? 
     50            cursor = connection.cursor() 
     51            cursor.execute("DROP TABLE PyLucid_pagesinternal;") 
     52        except Exception, e: 
     53            print "Error:", e 
     54        else: 
     55            print "OK" 
    4456 
    4557