Changeset 1276

Show
Ignore:
Timestamp:
08/17/08 03:04:45 (4 years ago)
Author:
todd
Message:

added /AssetTypes back into configprocs, all is well

Location:
Trunk/TurtolCMS
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • Trunk/TurtolCMS/ApacheEntryPoint.py

    r1272 r1276  
    166166          ctx.Log(p.get('error_msg')) 
    167167      except Exception, e: 
    168         pass 
     168        ctx.Log ('TCMS Create error "%s"' % str(e)) 
    169169      #return 0 to prevent tcms rendering after ShowCreateTables rendered 
    170170      return 0 
  • Trunk/TurtolCMS/Application/__init__.py

    r1269 r1276  
    110110          if password: 
    111111            if len(password) < 6: 
    112               self['error_msg'] = "Password must be atleast 6 characters long" 
     112              self['error_msg'] = "Password must be at least 6 characters long" 
    113113            else: 
    114114              #  if all the requirements (email, password, username) are met, create the user 
  • Trunk/TurtolCMS/Assets/AssetTypes.py

    r1156 r1276  
    77AssetTypes.py contains xml that is retrieved from the database 
    88this xml file will is parsed and turned into a dictionary of 
    9 dictionaries containing purdinent information about each asset 
     9dictionaries containing pertinent information about each asset 
    1010such as what prefix the asset uses to store xml data 
    1111and what database fields specific to the assest are  
  • Trunk/TurtolCMS/ConfigProcs.py

    r1275 r1276  
    229229(2, NULL, 'BasePageTemplate', 'TurtolCMS.Pages.Template', 1, 'TurtolCMS', 0, ''), 
    230230(3, NULL, '/', 'TurtolCMS.Pages.Html', 2, NULL, 0, NULL), 
    231 (4, NULL, '404', 'TurtolCMS.Pages.Html', 2, 'Page Not Found - %s', 0, NULL);''') 
     231(4, NULL, '404', 'TurtolCMS.Pages.Html', 2, 'Page Not Found - %s', 0, NULL), 
     232(5, NULL, '/AssetTypes', 'TurtolCMS.Pages.Xml', NULL, 'Asset_Types', 0, NULL);''') 
    232233  , ('Assets','''CREATE TABLE tcms_assets ( 
    233234  id int(11) NOT NULL auto_increment, 
     
    251252  description text, 
    252253  xml text, 
     254  cache longblob null default null, 
    253255  want_html tinyint(1) default '1', 
    254256  confirmkey varchar(218) default NULL, 
     
    294296  INDEX (data_class),  
    295297  FULLTEXT KEY textdata (textdata)) ENGINE=MyISAM DEFAULT CHARSET=utf8;''' 
    296            , None) 
     298  ,  
     299  '''INSERT INTO tcms_page_data(page_data_id, page_id, data_class, textdata) 
     300    VALUES(1, 8, 'asset_types', 
     301    '<!-- Asset Types Configuration --> 
     302    <asset_types> 
     303      <asset type="Person"> 
     304        <asset_fields>firstname,lastname,email,gender,birthdate</asset_fields> 
     305        <formfields> 
     306          <field name="firstname" type="txt" validation_rules="required validate-alpha" label="FirstName: " pos="1"/> 
     307          <field name="lastname" type="txt" validation_rules="required validate-alpha" label="LastName: " pos="2"/> 
     308          <field name="email" type="txt" validation_rules="required validate-email" label="Email: " pos="3"/> 
     309          <field name="gender" type="select" label="Sex: " values-KV="M:Male,F:Female" pos="5"/> 
     310          <field name="birthdate" type="txt" validation_rules="validate-date" label="Birthdate" pos="4"/> 
     311          <field name="address" prefix="person" pos="6"/> 
     312        </formfields> 
     313        <prefix>person</prefix> 
     314        <optional_tags>EventRegistration,Reminder</optional_tags> 
     315      </asset> 
     316      <asset type="User"> 
     317        <asset_fields>password,status,xml</asset_fields> 
     318        <formfields> 
     319          <field name="user.username" type="txt" validation_rules="required validate-alphanum" label="Username:" pos="1"/> 
     320          <field name="password" type="password" AUTOCOMPLETE="off" validation_rules="required validate-password" confirm="password2" label="Password: " pos="2"/> 
     321          <field name="password2" type="password" AUTOCOMPLETE="off" validation_rules="required validate-confirm" label="Confirm Password: " pos="3"/> 
     322        </formfields> 
     323        <prefix>usr,user</prefix> 
     324        <of_type>Person</of_type> 
     325      </asset> 
     326      <asset type="Subscriber"> 
     327        <asset_fields>bounces,want_html</asset_fields> 
     328        <formfields> 
     329          <field name="want_html" type="radio" validation_rules="validate-select-one-required" values-KV="1:Yes,0:No" label="Would you prefer Html messages?" pos="1"/> 
     330        </formfields> 
     331        <prefix>subscriber</prefix> 
     332        <of_type>Person</of_type> 
     333        <optional_tags>Newsletter</optional_tags> 
     334      </asset> 
     335    </asset_types>');''') 
    297336  , ('Widgets' 
    298337           , '''CREATE TABLE tcms_widgets ( 
     
    329368  FULLTEXT KEY `data` (`data`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;''' 
    330369           , '''INSERT INTO tcms_widget_data (widget_id, lang, data)  
    331   VALUES (1, 'en', '<h1>Welcome to the TurtolCMS</h1>\n<p>If you are the administrator of this site, you can edit it after logging in with your Username and Password by clicking the TurtolCMS logo at the bottom left of this page or by <a href="/tcms/About">clicking here</a>.</p><p>This page is using the default "FiveSectionLayout" with a header, a footer, and three columns of content (but the presence of the sections may have changed if you set a Theme). You can change the Layout or Theme from the toolbar by clicking Map -> Roottemplate -> BasePageTemplate).</p><p>All of this is detailed in the on-line tutorials and documentation at the <a href="http://turtolcms.org">TurtolCMS project site.</a><br></p>'), 
    332 (2, 'en', '<h3>Navigation</h3>\n<ul><li><a href="/">Home Page</a></li><li><a href="http://turtolcms.org">TurtolCMS Project</a></li></li></ul>\n'), 
    333 (3, 'en', '<h3>Help</h3>\n<p>Instructions and tutorials in the use of the TurtolCMS can be found at the <a href="http://turtolcms.org">TurtolCMS project site</a>.</p><p>Hosting for the TurtolCMS can be provided by (who else?) <a href="http://www.turtol.com/">Turtol.</a><br></p>'), 
     370  VALUES (1, 'en', '<h1>Welcome to the TurtolCMS</h1>\n<p>If you are the administrator of this site, you can edit it after logging in with your Username and Password by clicking the TurtolCMS logo at the bottom left of this page or by <a href="/tcms/About">clicking here</a>.</p><p>This page is using the default "FiveSectionLayout" with a header, a footer, and three columns of content. You can change the Layout from the toolbar by clicking Map -> Templates -> BasePageTemplate).</p><p>All of this is detailed in the on-line tutorials and documentation at the <a href="http://www.turtolcms.org">TurtolCMS project site.</a><br></p>'), 
     371(2, 'en', '<h3>Navigation</h3>\n<ul><li><a href="/">Home Page</a></li><li><a href="http://www.turtolcms.org">TurtolCMS Project</a></li></li></ul>\n'), 
     372(3, 'en', '<h3>Help</h3>\n<p>Instructions and tutorials in the use of the TurtolCMS can be found at the <a href="http://www.turtolcms.org">TurtolCMS project site</a>.</p><p>Hosting for the TurtolCMS can be provided by (who else?) <a href="http://www.turtolhosting.com/">TurtolHosting.</a><br></p>'), 
    334373(4, 'en', '<span class="copyright">TurtolCMS copyright %s by Todd D. Esposito.</span>'), 
    335374(5, 'en', '<h1>TurtolCMS</h1>'), 
    336 (6, 'en', '<h1>Page Not Found</h1>\n<p>We are Sorry, but the requested page could not be found on our server. Please make sure the requeseted URL is correct</p>')) ''' % (currentYear))] 
    337  
    338 #FIXME: USE AN IMAGE THAT DOESN'T HAVE A WHITE BACK GROUND TO WORK BETTER WITH THEMES 
    339 #(5, 'en', '<img src="/tcms/img/about_page/turtolCMS.png" alt="Turtol CMS"/>'), 
     375(6, 'en', '<h1>Page Not Found</h1>\n<p>We are Sorry, but the requested page could not be found on our server. Please make sure the requeseted URL is correct</p>') ''' % (currentYear))] 
    340376 
    341377  req.content_type = 'text/html'