Changeset 1445

Show
Ignore:
Timestamp:
02/25/08 16:39:19 (9 months ago)
Author:
JensDiemer
Message:

-insert update v0.8.0 to v0.8.1
-update TinyMCE using, see: http://pylucid.org/phpBB2/viewtopic.php?t=195

Location:
trunk/pylucid/PyLucid
Files:
2 modified

Legend:

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

    r1420 r1445  
    1111from django.db import connection 
    1212 
     13from PyLucid.install.install import Sync_DB 
    1314from PyLucid.install.BaseInstall import BaseInstall 
    1415from PyLucid.settings import OLD_TABLE_PREFIX 
     
    1819 
    1920#______________________________________________________________________________ 
    20  
    21 from PyLucid.install.install import Sync_DB 
     21class Update2(BaseInstall): 
     22    def view(self): 
     23        self._redirect_execute(self._update) 
     24 
     25        return self._simple_render( 
     26            headline="Update PyLucid from v0.8.0 to v0.8.1" 
     27        ) 
     28 
     29    def _update(self): 
     30        print "update markup...", 
     31        # insert a new markup for html without TinyMCE 
     32        m = Markup(id=0, name="html") 
     33        m.save() 
     34 
     35        # rename the old "html" 
     36        m = Markup.objects.get(id=1) 
     37        m.name = "html + TinyMCE" 
     38        m.save() 
     39        print "done." 
     40 
     41        print "existing Markups:" 
     42        for m in Markup.objects.all(): 
     43            print "%5s - %s" % (m.id, m) 
     44 
     45 
     46def update2(request): 
     47    """ 
     48    1. update from v0.8.0 to v0.8.1 
     49    """ 
     50    return Update2(request).start_view() 
     51 
     52#______________________________________________________________________________ 
     53 
     54 
    2255class Update(Sync_DB): 
    2356    """ 
     
    400433 
    401434 
    402  
    403435def update(request): 
    404436    """ 
    405     1. update DB tables from v0.7.2 to django PyLucid v0.8 
     437    2. update DB tables from v0.7.2 to django PyLucid v0.8 
    406438    """ 
    407439    return Update(request).start_view() 
     
    575607                print "\t - WARNING: unsupportet tag '%s' in Template!" % tag 
    576608 
    577     #___________________________________________________________________________ 
    578  
    579  
    580  
    581 #    def update_internalpage(self): 
    582 #        from PyLucid.tools.Diff import display_plaintext_diff 
    583 #        from PyLucid.models import PagesInternal 
    584 # 
    585 #        for internal_page in PagesInternal.objects.all(): 
    586 #            name = internal_page.name 
    587 #            old_content = internal_page.content_html 
    588 # 
    589 #            print "\n==================[ %s ]==================\n" % name 
    590 #            _display_warnings(old_content) 
    591 #            content = _convert_internalpage(old_content) 
    592 #            if not content: 
    593 #                print "\t - Nothing to change." 
    594 #                continue 
    595 # 
    596 #            print "\t - changed!\n\nthe diff:" 
    597 #            display_plaintext_diff(old_content, content) 
    598 # 
    599 #            internal_page.content_html = content 
    600 #            internal_page.save() 
    601 #            print "\t - updated and saved." 
    602 #            print 
    603 #            print 
    604  
    605609 
    606610def update_templates(request): 
    607611    """ 
    608     2. update to the new django template engine 
     612    3. update to the new django template engine 
    609613    """ 
    610614    return UpdateTemplates(request).start_view() 
  • trunk/pylucid/PyLucid/plugins_internal/page_admin/page_admin.py

    r1443 r1445  
    269269 
    270270 
    271         if page_instance.markup.name == "None": 
    272             # If there is no markup engine used -> insert TinyMCE JS Editor 
     271        if page_instance.markup.id == 1: 
     272            # markup with id=1 is html + TinyMCE JS Editor 
    273273            js_data = ( 
    274274                '<script language="javascript" type="text/javascript"'