1. Martín Mulone
  2. bottle

Commits

Martín Mulone  committed 406c155

Tutorial 01. Remove old deprecated tests.

  • Participants
  • Parent commits ac511c0
  • Branches default

Comments (0)

Files changed (133)

File test/__init__.py

  • Ignore whitespace
-

File test/app.py

  • Ignore whitespace
-# -*- coding: utf-8 -*- 
-# Copyright (c) 2010- Mulone, Pablo Martin (http://martin.tecnodoc.com.ar/)
-# License: LGPLv3 the same as web2py
-
-#bottle imports
-from bottle import run, debug
-
-#web2py imports
-from gluon.storage import Storage
-
-#current app
-from core.globals import current
-current.app = Storage()
-
-#############################
-## My models
-#############################
-from models.config import *
-from models.data import Data
-from models.widgets import Widgets
-
-current.app.mydata = Data() #connect to my data and define tables
-current.app.mydata.connect()
-current.app.widgets = Widgets() #load widgets
-
-############################
-## My controllers
-############################
-from controllers.default import *
-from controllers.static import *
-
-debug(True)
-run(host='localhost', port=8080)

File test/controllers/__init__.py

  • Ignore whitespace
-

File test/controllers/default.py

  • Ignore whitespace
-# -*- coding: utf-8 -*- 
-# Copyright (c) 2010- Mulone, Pablo Martin (http://martin.tecnodoc.com.ar/)
-# License: LGPLv3 the same as web2py
-
-#bottle
-from bottle import route, view
-
-#My models
-from core.globals import *
-
-@route('/')
-@route('/default/index')
-@view('index')
-def index():
-    
-    page = current.app.widgets.page_by_id(1)        
-            
-    return dict(page=page)
-

File test/controllers/static.py

  • Ignore whitespace
-# -*- coding: utf-8 -*- 
-# Copyright (c) 2010- Mulone, Pablo Martin (http://martin.tecnodoc.com.ar/)
-# License: LGPLv3 the same as web2py
-
-from bottle import route
-from bottle import static_file
-
-@route('/static/:path#.+#')
-def server_static(path):
-    return static_file(path, root='static/')
-

File test/core/__init__.py

  • Ignore whitespace
-

File test/core/globals.py

  • Ignore whitespace
-# -*- coding: utf-8 -*- 
-# Copyright (c) 2010- Mulone, Pablo Martin (http://martin.tecnodoc.com.ar/)
-# License: LGPLv3 the same as web2py
-
-import threading
-current = threading.local()  # thread-local storage for request-scope globals

File test/data/c8b669d15150d7109e5f7ab36744a5b7_auth_event.table

  • Ignore whitespace
-(dp1
-S'origin'
-p2
-S'CHAR(512)'
-p3
-sS'client_ip'
-p4
-S'CHAR(512)'
-p5
-sS'user_id'
-p6
-S'INTEGER REFERENCES auth_user(id) ON DELETE CASCADE'
-p7
-sS'description'
-p8
-S'TEXT'
-p9
-sS'time_stamp'
-p10
-S'TIMESTAMP'
-p11
-sS'id'
-p12
-S'INTEGER PRIMARY KEY AUTOINCREMENT'
-p13
-s.

File test/data/c8b669d15150d7109e5f7ab36744a5b7_auth_group.table

  • Ignore whitespace
-(dp1
-S'role'
-p2
-S'CHAR(512)'
-p3
-sS'id'
-p4
-S'INTEGER PRIMARY KEY AUTOINCREMENT'
-p5
-sS'description'
-p6
-S'TEXT'
-p7
-s.

File test/data/c8b669d15150d7109e5f7ab36744a5b7_auth_membership.table

  • Ignore whitespace
-(dp1
-S'group_id'
-p2
-S'INTEGER REFERENCES auth_group(id) ON DELETE CASCADE'
-p3
-sS'user_id'
-p4
-S'INTEGER REFERENCES auth_user(id) ON DELETE CASCADE'
-p5
-sS'id'
-p6
-S'INTEGER PRIMARY KEY AUTOINCREMENT'
-p7
-s.

File test/data/c8b669d15150d7109e5f7ab36744a5b7_auth_permission.table

  • Ignore whitespace
-(dp1
-S'record_id'
-p2
-S'INTEGER'
-p3
-sS'group_id'
-p4
-S'INTEGER REFERENCES auth_group(id) ON DELETE CASCADE'
-p5
-sS'table_name'
-p6
-S'CHAR(512)'
-p7
-sS'id'
-p8
-S'INTEGER PRIMARY KEY AUTOINCREMENT'
-p9
-sS'name'
-p10
-S'CHAR(512)'
-p11
-s.

File test/data/c8b669d15150d7109e5f7ab36744a5b7_auth_user.table

  • Ignore whitespace
-(dp1
-S'username'
-p2
-S'CHAR(128)'
-p3
-sS'first_name'
-p4
-S'CHAR(128)'
-p5
-sS'last_name'
-p6
-S'CHAR(128)'
-p7
-sS'registration_id'
-p8
-S'CHAR(512)'
-p9
-sS'email'
-p10
-S'CHAR(512)'
-p11
-sS'reset_password_key'
-p12
-S'CHAR(512)'
-p13
-sS'password'
-p14
-S'CHAR(512)'
-p15
-sS'registration_key'
-p16
-S'CHAR(512)'
-p17
-sS'id'
-p18
-S'INTEGER PRIMARY KEY AUTOINCREMENT'
-p19
-s.

File test/data/c8b669d15150d7109e5f7ab36744a5b7_i2p_categories.table

  • Ignore whitespace
-(dp1
-S'description'
-p2
-S'TEXT'
-p3
-sS'title'
-p4
-S'CHAR(255)'
-p5
-sS'id'
-p6
-S'INTEGER PRIMARY KEY AUTOINCREMENT'
-p7
-sS'created_on'
-p8
-S'TIMESTAMP'
-p9
-sS'name'
-p10
-S'CHAR(255)'
-p11
-s.

File test/data/c8b669d15150d7109e5f7ab36744a5b7_i2p_categorieslist.table

  • Ignore whitespace
-(dp1
-S'post_id'
-p2
-S'INTEGER'
-p3
-sS'cat_id'
-p4
-S'INTEGER'
-p5
-sS'id'
-p6
-S'INTEGER PRIMARY KEY AUTOINCREMENT'
-p7
-s.

File test/data/c8b669d15150d7109e5f7ab36744a5b7_i2p_images.table

  • Ignore whitespace
-(dp1
-S'comment'
-p2
-S'TEXT'
-p3
-sS'thumb'
-p4
-S'CHAR(512)'
-p5
-sS'upload_by'
-p6
-S'INTEGER'
-p7
-sS'blob_key'
-p8
-S'CHAR(512)'
-p9
-sS'image'
-p10
-S'CHAR(512)'
-p11
-sS'post_id'
-p12
-S'INTEGER'
-p13
-sS'upload_on'
-p14
-S'TIMESTAMP'
-p15
-sS'id'
-p16
-S'INTEGER PRIMARY KEY AUTOINCREMENT'
-p17
-s.

File test/data/c8b669d15150d7109e5f7ab36744a5b7_i2p_language.table

  • Ignore whitespace
-(dp1
-S'post_id'
-p2
-S'INTEGER'
-p3
-sS'id'
-p4
-S'INTEGER PRIMARY KEY AUTOINCREMENT'
-p5
-sS'language'
-p6
-S'CHAR(255)'
-p7
-sS'parent_id'
-p8
-S'INTEGER'
-p9
-s.

File test/data/c8b669d15150d7109e5f7ab36744a5b7_i2p_links.table

  • Ignore whitespace
-(dp1
-S'description'
-p2
-S'TEXT'
-p3
-sS'title'
-p4
-S'CHAR(255)'
-p5
-sS'url'
-p6
-S'TEXT'
-p7
-sS'created_on'
-p8
-S'TIMESTAMP'
-p9
-sS'id'
-p10
-S'INTEGER PRIMARY KEY AUTOINCREMENT'
-p11
-sS'name'
-p12
-S'CHAR(255)'
-p13
-s.

File test/data/c8b669d15150d7109e5f7ab36744a5b7_i2p_posts.table

  • Ignore whitespace
-(dp1
-S'keywords_txt'
-p2
-S'CHAR(255)'
-p3
-sS'published_on'
-p4
-S'TIMESTAMP'
-p5
-sS'text_slice'
-p6
-S'TEXT'
-p7
-sS'description'
-p8
-S'TEXT'
-p9
-sS'parent'
-p10
-S'INTEGER'
-p11
-sS'title'
-p12
-S'CHAR(255)'
-p13
-sS'markup'
-p14
-S'CHAR(255)'
-p15
-sS'published'
-p16
-S'CHAR(1)'
-p17
-sS'is_page'
-p18
-S'CHAR(1)'
-p19
-sS'post_url'
-p20
-S'TEXT'
-p21
-sS'created_on'
-p22
-S'TIMESTAMP'
-p23
-sS'updated_by_id'
-p24
-S'INTEGER'
-p25
-sS'created_by_id'
-p26
-S'INTEGER'
-p27
-sS'keywords'
-p28
-S'TEXT'
-p29
-sS'updated_on'
-p30
-S'TIMESTAMP'
-p31
-sS'menu_order'
-p32
-S'INTEGER'
-p33
-sS'menu_show'
-p34
-S'CHAR(1)'
-p35
-sS'id'
-p36
-S'INTEGER PRIMARY KEY AUTOINCREMENT'
-p37
-sS'categories'
-p38
-S'TEXT'
-p39
-sS'name'
-p40
-S'CHAR(255)'
-p41
-s.

File test/data/c8b669d15150d7109e5f7ab36744a5b7_i2p_tags.table

  • Ignore whitespace
-(dp1
-S'created_on'
-p2
-S'TIMESTAMP'
-p3
-sS'title'
-p4
-S'CHAR(255)'
-p5
-sS'id'
-p6
-S'INTEGER PRIMARY KEY AUTOINCREMENT'
-p7
-sS'name'
-p8
-S'CHAR(255)'
-p9
-s.

File test/data/c8b669d15150d7109e5f7ab36744a5b7_i2p_tagslist.table

  • Ignore whitespace
-(dp1
-S'post_id'
-p2
-S'INTEGER'
-p3
-sS'id'
-p4
-S'INTEGER PRIMARY KEY AUTOINCREMENT'
-p5
-sS'tag_id'
-p6
-S'INTEGER'
-p7
-s.

File test/data/sql.log

  • Ignore whitespace
-timestamp: 2011-05-23T19:01:41.331614
-CREATE TABLE auth_user(
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
-    first_name CHAR(128),
-    last_name CHAR(128),
-    username CHAR(128),
-    email CHAR(512),
-    password CHAR(512),
-    registration_key CHAR(512),
-    reset_password_key CHAR(512),
-    registration_id CHAR(512)
-);
-success!
-timestamp: 2011-05-23T19:01:41.451938
-CREATE TABLE auth_group(
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
-    role CHAR(512),
-    description TEXT
-);
-success!
-timestamp: 2011-05-23T19:01:41.547419
-CREATE TABLE auth_membership(
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
-    user_id INTEGER REFERENCES auth_user(id) ON DELETE CASCADE,
-    group_id INTEGER REFERENCES auth_group(id) ON DELETE CASCADE
-);
-success!
-timestamp: 2011-05-23T19:01:41.669821
-CREATE TABLE auth_permission(
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
-    group_id INTEGER REFERENCES auth_group(id) ON DELETE CASCADE,
-    name CHAR(512),
-    table_name CHAR(512),
-    record_id INTEGER
-);
-success!
-timestamp: 2011-05-23T19:01:41.770881
-CREATE TABLE auth_event(
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
-    time_stamp TIMESTAMP,
-    client_ip CHAR(512),
-    user_id INTEGER REFERENCES auth_user(id) ON DELETE CASCADE,
-    origin CHAR(512),
-    description TEXT
-);
-success!
-timestamp: 2011-05-23T19:01:41.893218
-CREATE TABLE i2p_posts(
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
-    name CHAR(255),
-    title CHAR(255),
-    description TEXT,
-    text_slice TEXT,
-    keywords_txt CHAR(255),
-    keywords TEXT,
-    categories TEXT,
-    created_on TIMESTAMP,
-    published_on TIMESTAMP,
-    updated_on TIMESTAMP,
-    created_by_id INTEGER,
-    updated_by_id INTEGER,
-    published CHAR(1),
-    is_page CHAR(1),
-    parent INTEGER,
-    menu_show CHAR(1),
-    menu_order INTEGER,
-    post_url TEXT,
-    markup CHAR(255)
-);
-success!
-timestamp: 2011-05-23T19:01:41.992534
-CREATE TABLE i2p_categories(
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
-    name CHAR(255),
-    title CHAR(255),
-    description TEXT,
-    created_on TIMESTAMP
-);
-success!
-timestamp: 2011-05-23T19:01:42.089645
-CREATE TABLE i2p_categorieslist(
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
-    cat_id INTEGER,
-    post_id INTEGER
-);
-success!
-timestamp: 2011-05-23T19:01:42.204871
-CREATE TABLE i2p_images(
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
-    post_id INTEGER,
-    blob_key CHAR(512),
-    comment TEXT,
-    image CHAR(512),
-    thumb CHAR(512),
-    upload_on TIMESTAMP,
-    upload_by INTEGER
-);
-success!
-timestamp: 2011-05-23T19:01:42.292134
-CREATE TABLE i2p_links(
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
-    name CHAR(255),
-    title CHAR(255),
-    url TEXT,
-    description TEXT,
-    created_on TIMESTAMP
-);
-success!
-timestamp: 2011-05-23T19:01:42.367578
-CREATE TABLE i2p_tags(
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
-    name CHAR(255),
-    title CHAR(255),
-    created_on TIMESTAMP
-);
-success!
-timestamp: 2011-05-23T19:01:42.478330
-CREATE TABLE i2p_tagslist(
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
-    tag_id INTEGER,
-    post_id INTEGER
-);
-success!
-timestamp: 2011-05-23T19:01:42.711011
-CREATE TABLE i2p_language(
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
-    post_id INTEGER,
-    parent_id INTEGER,
-    language CHAR(255)
-);
-success!

File test/data/storage.sqlite

  • Ignore whitespace
Binary file removed.

File test/models/__init__.py

  • Ignore whitespace
-

File test/models/config.py

  • Ignore whitespace
-# -*- coding: utf-8 -*- 
-# Copyright (c) 2010- Mulone, Pablo Martin (http://martin.tecnodoc.com.ar/)
-# License: LGPLv3 the same as web2py
-
-#gluon
-from gluon.storage import Storage
-#core
-from core.globals import * 
-
-current.app.settings = Storage()
-current.app.settings.migrate = True
-current.app.settings.title = 'My application'
-current.app.settings.subtitle = 'powered by bottle'
-current.app.settings.author = 'Martin Mulone'
-current.app.settings.author_email = 'martin@tecnodoc.com.ar'
-current.app.settings.database_uri = 'sqlite://storage.sqlite'
-current.app.settings.security_key = '241ab231-213a-4391-9191-19711e5a5a67'

File test/models/data.py

  • Ignore whitespace
-# -*- coding: utf-8 -*- 
-# Copyright (c) 2010- Mulone, Pablo Martin (http://martin.tecnodoc.com.ar/)
-# License: LGPLv3 the same as web2py
-from datetime import datetime
-
-#gluon
-from gluon.storage import Storage
-from gluon.dal import DAL, Field
-from gluon.validators import *
-
-#core
-from core.globals import *
-
-class Data(object):
-
-    def __init__(self):             
-               
-        self.setup()
-        
-        
-    def setup(self):        
-        
-        settings = Storage()
-        self.settings = settings
-                  
-        
-        settings.version = '1.0'
-        settings.migrate = current.app.settings.migrate
-        settings.prefix = 'i2p_'
-        settings.table_name_post = '%sposts'%settings.prefix
-        settings.table_name_categories = '%scategories'%settings.prefix
-        settings.table_name_categorieslist = '%scategorieslist'%settings.prefix
-        settings.table_name_images = '%simages'%settings.prefix
-        settings.table_name_links = '%slinks'%settings.prefix  
-        settings.table_name_tags = '%stags'%settings.prefix  
-        settings.table_name_tagslist = '%stagslist'%settings.prefix        
-        settings.table_name_language = '%slanguage'%settings.prefix        
-        settings.upload_max_size = 1600
-        settings.auto_resize_image = True
-        settings.resize_image_size = (800, 600) 
-        settings.languages = [('Default',''),('Spanish','es-es'),('France','fr-fr'),('Brazil','pt-br')]
-
-
-    def connect(self):
-                
-        current.app.db=DAL((current.app.settings.database_uri),folder='data')
-        self.db = current.app.db #shortcut
-        self.define_tables()
-
-    
-    def define_tables(self):
-        
-        db = self.db
-        settings = self.settings
-                
-        #TABLE NAME: POST
-        db.define_table(settings.table_name_post,                                  
-            Field('id', 'id'),
-            Field('name', 'string', length=255, default="", \
-                label=("Name (Slug)"), \
-                comment="Ex: my-page or leave it blank"),
-            Field('title', 'string', length=255, required=True, \
-                  label=("Title"), \
-                  comment="Ex: My Title"),                                      
-            Field('description', 'text', default="", \
-                  label=("Body"), \
-                  comment="Write your article"),
-            Field('text_slice', 'text', default="", \
-                  label=("Extract"), \
-                  comment="This is a part of body that display on search."),  
-            Field('keywords_txt', 'string', length=255, \
-                  label=("Keywords"), \
-                  comment="Fill keywords separated with ',' comma. Ex: key1, key2."),
-            Field('keywords', 'list:string'), #tags                  
-            Field('categories', 'list:reference %s'%settings.table_name_categories, \
-                  requires = IS_IN_DB(db,'%s.id'%settings.table_name_categories,'%(title)s',multiple=True),                                    
-                  label="Categories", \
-                  comment="Select categories."),                  
-            Field('created_on', 'datetime', default=datetime.now()),
-            Field('published_on', 'datetime', default=datetime.now()),
-            Field('updated_on', 'datetime', default=datetime.now()),
-            Field('created_by_id', 'integer', default=0, required=True),
-            Field('updated_by_id', 'integer', default=0, required=True),            
-            Field('published', 'boolean', default=False, label="Published", \
-                  comment="Make it public?"),
-            Field('is_page', 'boolean', default=True),
-            Field('parent', 'integer', default=0, readable=False, writable=False, label="Parent", \
-                  comment="Page parent?"),         
-            Field('menu_show', 'boolean', default=True,label="Display in menu", \
-                  comment="Put to false if you dont want to show in menu."),
-            Field('menu_order', 'integer', default=0, label=("Menu Order"), \
-                  comment="Menu Order?"),            
-            Field('post_url', 'text', default="", requires=(IS_URL())),                                                                                         
-            Field('markup', 'string', default="", length=255), #to set the language editor
-            migrate=settings.migrate)
-        
-        #db[settings.table_name_post].name.requires = (IS_EMPTY_OR(IS_SLUG())) #IS_NOT_IN_DB(db, db[settings.table_name_post].name)        
-        db[settings.table_name_post].name.requires = [IS_EMPTY_OR(IS_SLUG()), IS_NOT_IN_DB(db, db[settings.table_name_post].name)] #IS_NOT_IN_DB(db, db[settings.table_name_post].name)
-        
-        #TABLE NAME: CATEGORIES
-        db.define_table(settings.table_name_categories,                                  
-            Field('id', 'id'),
-            Field('name', 'string', length=255, requires=(IS_SLUG())),     
-            Field('title', 'string', length=255, required=True),         
-            Field('description', 'text', default=""),                      
-            Field('created_on', 'datetime', default=datetime.now()),                                                                                                          
-            migrate=settings.migrate)
-        
-        #TABLE NAME: CATEGORIESLIST
-        db.define_table(settings.table_name_categorieslist,                                  
-            Field('id', 'id'),
-            Field('cat_id', 'integer', required=True),     
-            Field('post_id', 'integer', required=True),                                                                                                                         
-            migrate=settings.migrate)
-        
-        db[settings.table_name_categorieslist].cat_id.requires = IS_IN_DB(db, '%s.id'%settings.table_name_categories, '%s.title'%settings.table_name_categories)
-        db[settings.table_name_categorieslist].post_id.requires = IS_IN_DB(db, '%s.id'%settings.table_name_post, '%s.title'%settings.table_name_post)
-                
-        #TABLE NAME: IMAGES
-        db.define_table(settings.table_name_images, 
-            Field('id', 'id'), 
-            Field('post_id', 'integer', default=0),                                                                                                                         
-            Field('blob_key', readable=False, writable=False), #gae blobstore?                                                             
-            Field('comment', 'text', default="", \
-                  label='Title',comment='Title or comment'),                
-            Field('image','upload', default="", autodelete=True, uploadseparate=True, label='Image',\
-                  comment='Choose an image ".jpg",".png",".gif" Maximum size: %s px' % \
-                            settings.upload_max_size),                                                                                                                              
-            Field('thumb','upload', default="", autodelete=True, writable=False,readable=False,uploadseparate=True),
-            Field('upload_on', 'datetime', default=datetime.now(), writable=False,readable=False),
-            Field('upload_by', 'integer', default=0,required=True),            
-            migrate=settings.migrate)
-        
-        db[settings.table_name_images].image.requires=IS_IMAGE()        
-        
-        #TABLE NAME: LINKS
-        db.define_table(settings.table_name_links,                                  
-            Field('id', 'id'),
-            Field('name', 'string', length=255, requires=(IS_SLUG())),     
-            Field('title', 'string', length=255, required=True),
-            Field('url', 'text', default="", requires=(IS_URL())),
-            Field('description', 'text', default=""), 
-            Field('created_on', 'datetime', default=datetime.now()),                                                                                                                        
-            migrate=settings.migrate)
-                
-        #TABLE NAME: TAGS
-        db.define_table(settings.table_name_tags,                                  
-            Field('id', 'id'),
-            Field('name', 'string', length=255, requires=(IS_SLUG())),     
-            Field('title', 'string', length=255, required=True),                                 
-            Field('created_on', 'datetime', default=datetime.now()),                                                                                                                            
-            migrate=settings.migrate)
-        
-        #TABLE NAME: TAGSLIST
-        db.define_table(settings.table_name_tagslist,                                  
-            Field('id', 'id'),
-            Field('tag_id', 'integer', required=True),     
-            Field('post_id', 'integer', required=True),                                                                                                                         
-            migrate=settings.migrate)
-        
-        db[settings.table_name_tagslist].tag_id.requires = IS_IN_DB(db, '%s.id'%settings.table_name_tags, '%s.title'%settings.table_name_tags)
-        db[settings.table_name_tagslist].post_id.requires = IS_IN_DB(db, '%s.id'%settings.table_name_post, '%s.title'%settings.table_name_post)
-                       
-        #LANGUAGE NEW ADDITION, very simple
-        #a new language is a new page with parent id and set language as 'es-es', etc.
-        db.define_table(settings.table_name_language,                                  
-            Field('id', 'id'),            
-            Field('post_id', 'integer', default=0, readable=False, writable=False),
-            Field('parent_id', 'integer', default=0, readable=False, writable=False),
-            Field('language', 'string', length=255, default=''),             
-            migrate=settings.migrate)

File test/models/widgets.py

  • Ignore whitespace
-# -*- coding: utf-8 -*- 
-# Copyright (c) 2010- Mulone, Pablo Martin (http://martin.tecnodoc.com.ar/)
-# License: LGPLv3 the same as web2py
-
-#bottle
-from bottle import abort
-#gluon
-from gluon.html import *
-#core
-from core.globals import *
-
-class Widgets(object):
-
-    def __init__(self): 
-        
-        pass
-    
-    def render_page(self, page):
-                        
-        description = MARKMIN(page.description)
-                            
-        xml_page = '''    
-        <div class="i2p_page">          
-          <div class="post_description">%(description)s</div>  
-          <div style="clear: both;"></div>
-        </div>
-        '''%{'description': description}
-        
-        return XML(xml_page)
-
-
-    def page_by_id(self, id, allow_unpublished=False):
-        
-        db = current.app.db        
-        t_posts = current.app.mydata.settings.table_name_post
-        query = ((db[t_posts].is_page==True) & (db[t_posts].id==id))         
-        
-        if not allow_unpublished:            
-            addquery = (db[t_posts].published==True)  
-            query = query & addquery
-            
-            
-        pages = db(query).select(db[t_posts].id,
-                                db[t_posts].name,
-                                db[t_posts].title,
-                                db[t_posts].description,                                
-                                db[t_posts].published,
-                                db[t_posts].parent,
-                                db[t_posts].menu_order,
-                                db[t_posts].markup,
-                                ) 
-        
-        if pages:            
-            page = pages[0]
-            render_page = self.render_page(page)
-            
-        else:            
-            abort(404,'Page not found')
-        
-        return render_page

File test/static/css/boilerplate/handheld.css

  • Ignore whitespace
-* {
-  float: none;      
-  background: #fff;  
-  color: #000;
-}
-
-body { font-size: 80%; }

File test/static/css/boilerplate/style.css

  • Ignore whitespace
-/*  HTML5 ✰ Boilerplate  */
-
-html, body, div, span, object, iframe,
-h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
-small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend,
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, figcaption, figure,
-footer, header, hgroup, menu, nav, section, summary,
-time, mark, audio, video {
-  margin: 0;
-  padding: 0;
-  border: 0;
-  font-size: 100%;
-  font: inherit;
-  vertical-align: baseline;
-}
-
-article, aside, details, figcaption, figure,
-footer, header, hgroup, menu, nav, section {
-  display: block;
-}
-
-blockquote, q { quotes: none; }
-blockquote:before, blockquote:after,
-q:before, q:after { content: ''; content: none; }
-ins { background-color: #ff9; color: #000; text-decoration: none; }
-mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
-del { text-decoration: line-through; }
-abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
-table { border-collapse: collapse; border-spacing: 0; }
-hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
-input, select { vertical-align: middle; }
-
-body { font:13px/1.231 sans-serif; *font-size:small; } 
-select, input, textarea, button { font:99% sans-serif; }
-pre, code, kbd, samp { font-family: monospace, sans-serif; }
-
-html { overflow-y: scroll; }
-a:hover, a:active { outline: none; }
-ul, ol { margin-left: 2em; }
-ol { list-style-type: decimal; }
-nav ul, nav li { margin: 0; list-style:none; list-style-image: none; }
-small { font-size: 85%; }
-strong, th { font-weight: bold; }
-td { vertical-align: top; }
-
-sub, sup { font-size: 75%; line-height: 0; position: relative; }
-sup { top: -0.5em; }
-sub { bottom: -0.25em; }
-
-pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 15px; }
-textarea { overflow: auto; }
-.ie6 legend, .ie7 legend { margin-left: -7px; } 
-input[type="radio"] { vertical-align: text-bottom; }
-input[type="checkbox"] { vertical-align: bottom; }
-.ie7 input[type="checkbox"] { vertical-align: baseline; }
-.ie6 input { vertical-align: text-bottom; }
-label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; }
-button, input, select, textarea { margin: 0; }
-input:valid, textarea:valid   {  }
-input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
-.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
-
-::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; }
-::selection { background:#FF5E99; color:#fff; text-shadow: none; }
-a:link { -webkit-tap-highlight-color: #FF5E99; }
-
-button {  width: auto; overflow: visible; }
-.ie7 img { -ms-interpolation-mode: bicubic; }
-
-body, select, input, textarea {  color: #444; }
-h1, h2, h3, h4, h5, h6 { font-weight: bold; }
-a, a:active, a:visited { color: #607890; }
-a:hover { color: #036; }
-
-
-/**
- * Primary styles
- *
- * Author: 
- */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
-.hidden { display: none; visibility: hidden; }
-.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
-.visuallyhidden.focusable:active,
-.visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
-.invisible { visibility: hidden; }
-.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; }
-.clearfix:after { clear: both; }
-.clearfix { zoom: 1; }
-
-
-@media all and (orientation:portrait) {
-
-}
-
-@media all and (orientation:landscape) {
-
-}
-
-@media screen and (max-device-width: 480px) {
-
-  /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
-}
-
-
-@media print {
-  * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important;
-  -ms-filter: none !important; } 
-  a, a:visited { color: #444 !important; text-decoration: underline; }
-  a[href]:after { content: " (" attr(href) ")"; }
-  abbr[title]:after { content: " (" attr(title) ")"; }
-  .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }  
-  pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
-  thead { display: table-header-group; }
-  tr, img { page-break-inside: avoid; }
-  @page { margin: 0.5cm; }
-  p, h2, h3 { orphans: 3; widows: 3; }
-  h2, h3{ page-break-after: avoid; }
-}
-

File test/static/css/layout.css

  • Ignore whitespace
-@charset "UTF-8";
-
-/*********** add bottom line to table rows ***********/
-th, td { padding: 0.1em 0.5em 0.1em 0.5em;}
-
-/*********** labels bold and occasionally centered ***********/
-label {
-    white-space: nowrap;
-}
-label, b, th {
-    font-weight: bold;
-}
-thead th {
-    text-align: center;
-    border-bottom: 1px solid #444;
-}
-/*********** forms and table padding ***********/
-form, table {
-   padding: 5px 10px 5px 10px;
-}
-
-/*********** code blocks ***********/
-code {
-  
-}
-
-/*********** left and right padding to quoted text ***********/
-blockquote {
-   background: #edf5f2;   
-   /*margin-left: 20px;
-   margin-right: 20px;*/
-   padding: 10px 20px 10px 20px;
-   border: 1px solid #67928b;
-}
-
-input[type=text], input[type=password], textarea, select {
-	margin: 5px 15px 5px 5px;
-	width: 280px;	  
-	background: #fff;
-	color: #555;
-	border: 1px solid #dedede; 	
-}
-
-input[type=text], input[type=password], select {
-	height: 22px;  
-}
-
-select[multiple=multiple] {
-	height: 90px;  
-}
-
-input[type=submit], input[type=button], input[type=reset], button {
-
-}
-
-fieldset { border: 1px solid #dedede; padding: 6px; }
-legend { font-weight: bold; }
-
-input[type="checkbox"] {
-    vertical-align: middle;
-}
-
-input:focus, textarea:focus { background: #fafafa; }
-
-p {}
-
-p, blockquote, ul, ol, code, table {    
-    margin-top: 15px;
-    margin-bottom: 15px;
-}
-ul, ol {    
-    margin-left: 40px;
-}
-h1,h2,h3,h4,h5,h6 { line-height: 170%; }
-h1 {font-size: 2.0em;}
-h2 {font-size: 1.8em;}
-h3 {font-size: 1.4em;}
-h4 {font-size: 1.2em;}
-h5 {font-size: 1.0em;}
-h6 {font-size: 0.8em;}
-
-/*********** page layout alignment, width and padding ***********/
-body {
-    font-family: Helvetica, Arial, sans-serif; line-height: 1.5em; font-size: 14px; color: #444;
-    background: #496762;
-}
-#container, #header, #page, #content, #statusbar,
-#footer, #wrapper { display:block; line-height: 170%; }
-#wrapper {width: 900px;}
-#container {    
-    margin: 0px 0px 0px 0px;
-    padding: 0;    
-}
-#wrapper {margin: 0 auto;}
-#header {/*padding: 10px;*/}
-#wrapper {} 
-#statusbar {    
-    font-family: Arial, sans-serif; line-height: 1.5em; font-size: 13px;
-    color: #edf5f2;
-    /*background: whiteSmoke; *//*#eaeaea; */
-    /*border-bottom: 1px #DEDEDE solid;*/
-  
-    }
-    
-#statusbar a { 
-    color: #edf5f2;
-    /*color: #444;*/
-    /*background-color: whiteSmoke;*/
-    }
-#statusbar a:hover { 
-    color: #eee;
-    background-color: #333;
-    }
-#footer {    
-    color: #fff;
-    margin-top: 30px;    
-    padding: 5px;        
-}
-
-#content { 
-    padding: 20px; 
-    background: #fff; 
-    -webkit-border-radius: 7px;
-    -khtml-border-radius: 7px;	
-    -moz-border-radius: 7px;
-    border-radius: 7px;
-    } 
-
-#logo {
-    float: left;
-    width: 250px;
-    height: 65px;
-    background: url(../images/thebook.png);
-}
-#appname {
-    color: #cccccc;
-}
-#right_sidebar { width: 160px; float:right; display: none; }
-#left_sidebar { width: 160px; float:left; display: none; }
-#content { /*float: left;*/ /*width: 740px;*//*width: 63%;*/ /*width: 640px; float:left;*/ } /* uncomment this if you are going to use sidebars */
- 
-/* Auth Nav Bar */
-.auth_navbar {
-   /*color: #fff;*/
-   font-size: 10px;
-   top: 0px;
-   float: right;
-   padding: 3px 10px 3px 10px; 
-}
-.auth_navbar a {
-   color: #edf5f2;
-   /*color: #ddd;*/
-   text-transform:uppercase;
-   
-   /*text-decoration: none;*/
-}
-.auth_navbar a:hover {
-    font-weight: bold;
-   /*color: #fff;   */
-}
-
-/*********** web2py specific ***********/
-div.flash {
-    font-weight: bold;
-    display: none;
-    position: fixed;    
-    padding: 10px;
-    top: 40px;
-    right: 10px;
-    min-width: 280px;
-    opacity: 0.85;
-    margin: 0px 0px 10px 10px;    
-    color: #fff;    
-    vertical-align: middle;
-    cursor: pointer;
-    background: #000;
-    border: 2px solid #fff;
-    -moz-border-radius: 5px;
-    -webkit-border-radius: 5px;
-    z-index: 2;
-}
-div.error {
-    background-color: red;
-    color: white;
-    padding: 3px;
-}
-
-
-/*****************************************************
- *  HERE YOU CAN START TO WRITE YOUR OWN DIVS
- */
-
-#main-column { float: left; width: 640px;} 
-#left-column { float: right; width: 180px; } 
-
-
-
-/*****************************
-* Widgets Powerpack
-*
-*/
-
-.i2p_page {    
-   
-}
-
-
-.i2p_page .post_nav,
-.i2p_post .post_nav { 
-    margin: 5px 0px 5px 0px; 
-    font-size: 0.9em;	
-}
-
-.i2p_page .post_description { 
-
-    margin: 5px 0px 10px 0px;
-   
-}
-
-.i2p_page h1, h2 {    
-   color: #496762;
-   border-bottom: 1px solid #67928b;
-   margin-top: 40px;
-}
-
-
-/* Index, tag, category */
-.i2p_post_index {    
-   
-}
-
-/* Extract */
-.i2p_post_index .post_extract { 
-	margin-bottom: 15px;   
-}
-.i2p_post_index .post_extract .i2p_readmore { 	 
-	float: left;
-	margin-right: 10px;
-}
-.i2p_post_index .post_extract .i2p_responses { 	 
-	float: none;
-	
-}
-
-
-
-/* Pages */
-.i2p_post_index .pages {
-	float: right;	
-}
-.i2p_post_index .pages h2 {
-	margin: 30px 0px 30px 0px;
-	color: #555;
-	font-size: 14px;
-	padding-bottom: 5px;
-	border-bottom: 1px solid #dedede;	
-}
-.i2p_post_index .pages ul {
-	list-style-type: none;
-	margin: 0px;
-	padding: 0px;	
-}
-.i2p_post_index .pages ul li {
-	display: inline;	
-}
-.i2p_post_index .pages ul li a {	
-	margin: 0px 10px 0px 0px;	
-	color: #555;	
-	padding: 5px;	
-	text-decoration: none;
-}
-.i2p_post_index .pages ul li a:hover {	
-	background: #eaeaea;
-}
-.i2p_post_index .pages .current {		
-	font-weight: bold;
-}
-
-
-

File test/static/images/bottle.png

  • Ignore whitespace
Removed
Old image

File test/static/images/favicon.ico

  • Ignore whitespace
Removed
Old image

File test/static/images/favicon.png

  • Ignore whitespace
Removed
Old image

File test/static/js/scripts.js

  • Ignore whitespace
Empty file removed.

File test/views/index.tpl

  • Ignore whitespace
-{{!page}}
-%rebase layout title='Content Title'

File test/views/layout.tpl

  • Ignore whitespace
-<!DOCTYPE html>
-<html class="no-js" lang="en">
-<head>
-    
-    <meta charset="utf-8" />	  	    
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    
-    <title>{{title or 'No title'}}</title>         
-    
-    <link rel="shortcut icon" href="/static/images/favicon.ico" type="image/x-icon">
-    <link rel="apple-touch-icon" href="/static/images/favicon.png">
-    
-    <link href="/static/css/boilerplate/style.css" rel="stylesheet" type="text/css" /> 
-    <link href="/static/css/layout.css" rel="stylesheet" type="text/css" /> 
-        
-</head>
-
-<body>
-            
-    <div id="container">	      		      	
-      
-      <div id="wrapper">		
-	
-	<div id="header"> <!-- header and login nav -->	 	  
-	  <a href="http://www.bottlepy.org/" style="float: left; padding-right: 6px;">
-	    <img src="/static/images/bottle.png"/>
-	  </a>
-	  <div style="clear: both;"></div><!-- Clear the divs -->
-	</div><!-- header  -->
-		
-		
-	<div id="page"> <!-- Here my central body -->	
-	    
-	    <div id="content"><!-- content -->
-
-	    %include
-	    
-	    <div style="clear: both;"></div><!-- Clear the divs -->
-	      
-	    </div><!-- content -->	 
-	   
-	  
-	</div><!-- page -->							
-	
-	
-	<div id="footer">
-	  
-	  
-	 
-	  Application made it using: Bottle Framework + Web2py + Powerpack. Copyright &#169; 2011 by <a href="http://martin.tecnodoc.com.ar/">Martin Mulone</a>
-	  <div style="clear: both;"></div><!-- Clear the divs -->
-	  
-	</div><!-- footer -->			
-	
-	
-      </div><!-- wrapper -->
-    </div><!-- container -->	
-    
-            
-</body>
-</html>
-

File test2/__init__.py

  • Ignore whitespace
-

File test2/app.py

  • Ignore whitespace
-# -*- coding: utf-8 -*- 
-# Copyright (c) 2010- Mulone, Pablo Martin (http://martin.tecnodoc.com.ar/)
-
-#bottle imports
-from bottle import run, debug
-
-#web2py imports
-from gluon.storage import Storage
-
-#current app
-from core.globals import current
-current.app = Storage()
-
-#############################
-## My models
-#############################
-from models.config import *
-from models.data import Data
-
-current.app.mydata = Data() #connect to my data and define tables
-current.app.mydata.connect()
-
-
-############################
-## My controllers
-############################
-from controllers.default import *
-from controllers.static import *
-
-debug(True)
-run(host='localhost', port=8080)

File test2/controllers/__init__.py

  • Ignore whitespace
-

File test2/controllers/default.py

  • Ignore whitespace
-# -*- coding: utf-8 -*- 
-# Copyright (c) 2010- Mulone, Pablo Martin (http://martin.tecnodoc.com.ar/)
-
-#bottle
-from bottle import route, view, post, get, request
-
-#gluon
-from gluon.sqlhtml import SQLFORM, SQLTABLE
-
-#My models
-from core.globals import *
-
-
-@get('/add')
-@view('index')
-def add_form():
-    
-    form = SQLFORM(current.app.db.person)    
-    return dict(form=form)
-
-@post('/add')
-@view('index')
-def add_submit():
-    
-    name = request.forms.get('name')
-    age = request.forms.get('age')
-    form = ""
-    if name!="":
-        db = current.app.db
-        id = db.person.insert(name=name,age=age)
-        db.commit()
-        if id>0:
-            form = "Person inserted"
-        
-    return dict(form=form)
-
-@route('/')
-@view('index')
-def index():
-    
-    db = current.app.db
-    rows = db(db.person.id > 0).select()
-    form = SQLTABLE(rows)
-    
-    return dict(form=form)
-    
-
- 

File test2/controllers/static.py

  • Ignore whitespace
-# -*- coding: utf-8 -*- 
-# Copyright (c) 2010- Mulone, Pablo Martin (http://martin.tecnodoc.com.ar/)
-
-from bottle import route
-from bottle import static_file
-
-@route('/static/:path#.+#')
-def server_static(path):
-    return static_file(path, root='static/')
-

File test2/core/__init__.py

  • Ignore whitespace
-

File test2/core/globals.py

  • Ignore whitespace
-# -*- coding: utf-8 -*- 
-# Copyright (c) 2010- Mulone, Pablo Martin (http://martin.tecnodoc.com.ar/)
-
-import threading
-current = threading.local()  # thread-local storage for request-scope globals

File test2/models/__init__.py

  • Ignore whitespace
-

File test2/models/config.py

  • Ignore whitespace
-# -*- coding: utf-8 -*- 
-# Copyright (c) 2010- Mulone, Pablo Martin (http://martin.tecnodoc.com.ar/)
-
-#gluon
-from gluon.storage import Storage
-#core
-from core.globals import * 
-
-current.app.settings = Storage()
-current.app.settings.migrate = True
-current.app.settings.title = 'Test 2'
-current.app.settings.subtitle = 'powered by bottle'
-current.app.settings.author = 'Martin Mulone'
-current.app.settings.author_email = 'martin@tecnodoc.com.ar'
-current.app.settings.database_uri = 'sqlite://storage.sqlite'
-current.app.settings.security_key = '241ab231-243a-4391-9191-22711e5a5a67'

File test2/models/data.py

  • Ignore whitespace
-# -*- coding: utf-8 -*- 
-# Copyright (c) 2010- Mulone, Pablo Martin (http://martin.tecnodoc.com.ar/)
-
-from datetime import datetime
-
-#gluon
-from gluon.storage import Storage
-from gluon.dal import DAL, Field
-from gluon.validators import *
-
-#core
-from core.globals import *
-
-class Data(object):
-
-    def __init__(self):             
-               
-        self.setup()
-        
-        
-    def setup(self):        
-        
-        settings = Storage()
-        self.settings = settings                          
-        settings.version = '1.0'
-        settings.migrate = current.app.settings.migrate
-        
-
-    def connect(self):
-                
-        current.app.db=DAL((current.app.settings.database_uri),folder='data')
-        self.db = current.app.db #shortcut
-        self.define_tables()
-
-    
-    def define_tables(self):
-        
-        db = self.db
-        settings = self.settings
-                
-        db.define_table('person',
-                        Field('name','string'),
-                        Field('age','integer',default=0),
-                        migrate=settings.migrate)
-                       
-        

File test2/static/css/boilerplate/handheld.css

  • Ignore whitespace
-* {
-  float: none;      
-  background: #fff;  
-  color: #000;
-}
-
-body { font-size: 80%; }

File test2/static/css/boilerplate/style.css

  • Ignore whitespace
-/*  HTML5 ✰ Boilerplate  */
-
-html, body, div, span, object, iframe,
-h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
-small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend,
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, figcaption, figure,
-footer, header, hgroup, menu, nav, section, summary,
-time, mark, audio, video {
-  margin: 0;
-  padding: 0;
-  border: 0;
-  font-size: 100%;
-  font: inherit;
-  vertical-align: baseline;
-}
-
-article, aside, details, figcaption, figure,
-footer, header, hgroup, menu, nav, section {
-  display: block;
-}
-
-blockquote, q { quotes: none; }
-blockquote:before, blockquote:after,
-q:before, q:after { content: ''; content: none; }
-ins { background-color: #ff9; color: #000; text-decoration: none; }
-mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
-del { text-decoration: line-through; }
-abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
-table { border-collapse: collapse; border-spacing: 0; }
-hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
-input, select { vertical-align: middle; }
-
-body { font:13px/1.231 sans-serif; *font-size:small; } 
-select, input, textarea, button { font:99% sans-serif; }
-pre, code, kbd, samp { font-family: monospace, sans-serif; }
-
-html { overflow-y: scroll; }
-a:hover, a:active { outline: none; }
-ul, ol { margin-left: 2em; }
-ol { list-style-type: decimal; }
-nav ul, nav li { margin: 0; list-style:none; list-style-image: none; }
-small { font-size: 85%; }
-strong, th { font-weight: bold; }
-td { vertical-align: top; }
-
-sub, sup { font-size: 75%; line-height: 0; position: relative; }
-sup { top: -0.5em; }
-sub { bottom: -0.25em; }
-
-pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 15px; }
-textarea { overflow: auto; }
-.ie6 legend, .ie7 legend { margin-left: -7px; } 
-input[type="radio"] { vertical-align: text-bottom; }
-input[type="checkbox"] { vertical-align: bottom; }
-.ie7 input[type="checkbox"] { vertical-align: baseline; }
-.ie6 input { vertical-align: text-bottom; }
-label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; }
-button, input, select, textarea { margin: 0; }
-input:valid, textarea:valid   {  }
-input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
-.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
-
-::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; }
-::selection { background:#FF5E99; color:#fff; text-shadow: none; }
-a:link { -webkit-tap-highlight-color: #FF5E99; }
-
-button {  width: auto; overflow: visible; }
-.ie7 img { -ms-interpolation-mode: bicubic; }
-
-body, select, input, textarea {  color: #444; }
-h1, h2, h3, h4, h5, h6 { font-weight: bold; }
-a, a:active, a:visited { color: #607890; }
-a:hover { color: #036; }
-
-
-/**
- * Primary styles
- *
- * Author: 
- */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
-.hidden { display: none; visibility: hidden; }
-.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
-.visuallyhidden.focusable:active,
-.visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
-.invisible { visibility: hidden; }
-.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; }
-.clearfix:after { clear: both; }
-.clearfix { zoom: 1; }
-
-
-@media all and (orientation:portrait) {
-
-}
-
-@media all and (orientation:landscape) {
-
-}
-
-@media screen and (max-device-width: 480px) {
-
-  /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
-}
-
-
-@media print {
-  * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important;
-  -ms-filter: none !important; } 
-  a, a:visited { color: #444 !important; text-decoration: underline; }
-  a[href]:after { content: " (" attr(href) ")"; }
-  abbr[title]:after { content: " (" attr(title) ")"; }
-  .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }  
-  pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
-  thead { display: table-header-group; }
-  tr, img { page-break-inside: avoid; }
-  @page { margin: 0.5cm; }
-  p, h2, h3 { orphans: 3; widows: 3; }
-  h2, h3{ page-break-after: avoid; }
-}
-

File test2/static/css/layout.css

  • Ignore whitespace
-@charset "UTF-8";
-
-/*********** add bottom line to table rows ***********/
-th, td { padding: 0.1em 0.5em 0.1em 0.5em;}
-
-/*********** labels bold and occasionally centered ***********/
-label {
-    white-space: nowrap;
-}
-label, b, th {
-    font-weight: bold;
-}
-thead th {
-    text-align: center;
-    border-bottom: 1px solid #444;
-}
-/*********** forms and table padding ***********/
-form, table {
-   padding: 5px 10px 5px 10px;
-}
-
-/*********** code blocks ***********/
-code {
-  
-}
-
-/*********** left and right padding to quoted text ***********/
-blockquote {
-   background: #edf5f2;   
-   /*margin-left: 20px;
-   margin-right: 20px;*/
-   padding: 10px 20px 10px 20px;
-   border: 1px solid #67928b;
-}
-
-input[type=text], input[type=password], textarea, select {
-	margin: 5px 15px 5px 5px;
-	width: 280px;	  
-	background: #fff;
-	color: #555;
-	border: 1px solid #dedede; 	
-}
-
-input[type=text], input[type=password], select {
-	height: 22px;  
-}
-
-select[multiple=multiple] {
-	height: 90px;  
-}
-
-input[type=submit], input[type=button], input[type=reset], button {
-
-}
-
-fieldset { border: 1px solid #dedede; padding: 6px; }