Commit 42d219ba30b474343911868ea9bcaaa3490b84b0

Authored by pedro
1 parent 4a8d5005
Exists in master

Commit de estruturação do modulo

git-svn-id: http://svn.brlight.net/svn/lightbase-neo/trunk/LBBulk@745 29b92fdf-8c97-4584-b987-84e8d3c556fa
CHANGES.txt 0 → 100644
... ... @@ -0,0 +1,4 @@
  1 +0.0
  2 +---
  3 +
  4 +- Initial version
... ...
MANIFEST.in 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +include *.txt *.ini *.cfg *.rst
  2 +recursive-include lbbulk *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml
... ...
README.txt 0 → 100644
... ... @@ -0,0 +1,14 @@
  1 +LBBulk README
  2 +==================
  3 +
  4 +Getting Started
  5 +---------------
  6 +
  7 +- cd <directory containing this file>
  8 +
  9 +- $VENV/bin/python setup.py develop
  10 +
  11 +- $VENV/bin/initialize_LBBulk_db development.ini
  12 +
  13 +- $VENV/bin/pserve development.ini
  14 +
... ...
TODO.txt 0 → 100644
... ... @@ -0,0 +1 @@
  1 +- coisas
0 2 \ No newline at end of file
... ...
development.ini 0 → 100644
... ... @@ -0,0 +1,71 @@
  1 +###
  2 +# app configuration
  3 +# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html
  4 +###
  5 +
  6 +[app:main]
  7 +use = egg:LBBulk
  8 +
  9 +pyramid.reload_templates = true
  10 +pyramid.debug_authorization = false
  11 +pyramid.debug_notfound = false
  12 +pyramid.debug_routematch = false
  13 +pyramid.default_locale_name = en
  14 +pyramid.includes =
  15 + pyramid_debugtoolbar
  16 + pyramid_tm
  17 +
  18 +sqlalchemy.url = postgresql://postgres:postgres@10.1.0.152/projeto1
  19 +
  20 +# By default, the toolbar only appears for clients from IP addresses
  21 +# '127.0.0.1' and '::1'.
  22 +# debugtoolbar.hosts = 0.0.0.0/0
  23 +
  24 +###
  25 +# wsgi server configuration
  26 +###
  27 +
  28 +[server:main]
  29 +use = egg:waitress#main
  30 +host = 0.0.0.0
  31 +port = 6543
  32 +
  33 +###
  34 +# logging configuration
  35 +# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
  36 +###
  37 +
  38 +[loggers]
  39 +keys = root, lbbulk, sqlalchemy
  40 +
  41 +[handlers]
  42 +keys = console
  43 +
  44 +[formatters]
  45 +keys = generic
  46 +
  47 +[logger_root]
  48 +level = INFO
  49 +handlers = console
  50 +
  51 +[logger_lbbulk]
  52 +level = DEBUG
  53 +handlers =
  54 +qualname = lbbulk
  55 +
  56 +[logger_sqlalchemy]
  57 +level = INFO
  58 +handlers =
  59 +qualname = sqlalchemy.engine
  60 +# "level = INFO" logs SQL queries.
  61 +# "level = DEBUG" logs SQL queries and results.
  62 +# "level = WARN" logs neither. (Recommended for production systems.)
  63 +
  64 +[handler_console]
  65 +class = StreamHandler
  66 +args = (sys.stderr,)
  67 +level = NOTSET
  68 +formatter = generic
  69 +
  70 +[formatter_generic]
  71 +format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
... ...
lbbulk/__init__.py 0 → 100644
... ... @@ -0,0 +1,21 @@
  1 +from pyramid.config import Configurator
  2 +from sqlalchemy import engine_from_config
  3 +from lbbulk.config.routing import make_routes
  4 +
  5 +from lbbulk.models import (
  6 + DBSession,
  7 + Base,
  8 + )
  9 +
  10 +
  11 +def main(global_config, **settings):
  12 + """ This function returns a Pyramid WSGI application.
  13 + """
  14 + config = Configurator(settings=settings)
  15 + config.scan('lbbulk')
  16 + engine = engine_from_config(settings, 'sqlalchemy.')
  17 + DBSession.configure(bind=engine)
  18 + Base.metadata.bind = engine
  19 + config.include('pyramid_chameleon')
  20 + make_routes(config)
  21 + return config.make_wsgi_app()
0 22 \ No newline at end of file
... ...
lbbulk/config/__init__.py 0 → 100644
... ... @@ -0,0 +1 @@
  1 +# package
0 2 \ No newline at end of file
... ...
lbbulk/config/routing.py 0 → 100644
... ... @@ -0,0 +1,6 @@
  1 +def make_routes(config):
  2 + """
  3 + Create routes
  4 + """
  5 + config.add_static_view('static', 'static', cache_max_age=3600)
  6 + config.add_route('home', '/')
0 7 \ No newline at end of file
... ...
lbbulk/models/Registro.py 0 → 100644
... ... @@ -0,0 +1,32 @@
  1 +from sqlalchemy import Table, Column, Integer, \
  2 + String, MetaData, join, ForeignKey
  3 +from sqlalchemy.ext.declarative import declarative_base
  4 +from sqlalchemy.orm import column_property
  5 +
  6 +metadata = MetaData()
  7 +
  8 +# define two Table objects
  9 +bulk_sources = Table('lb_bulk_sources', metadata,
  10 + Column('id_source', Integer, primary_key=True),
  11 + Column('nome_source', String),
  12 + )
  13 +
  14 +bulk_upload = Table('lb_bulk_upload', metadata,
  15 + Column('id_reg', Integer, primary_key=True),
  16 + Column('chave_externa', String)
  17 + Column('id_source', Integer, ForeignKey('lb_bulk_sources.id_source')),
  18 + )
  19 +
  20 +# define a join between them. This
  21 +# takes place across the user.id and address.user_id
  22 +# columns.
  23 +user_address_join = join(user_table, address_table)
  24 +
  25 +Base = declarative_base()
  26 +
  27 +# map to it
  28 +class AddressUser(Base):
  29 + __table__ = user_address_join
  30 +
  31 + id = column_property(user_table.c.id, address_table.c.user_id)
  32 + address_id = address_table.c.id
0 33 \ No newline at end of file
... ...
lbbulk/models/__init__.py 0 → 100644
... ... @@ -0,0 +1 @@
  1 +# package
... ...
lbbulk/scripts/__init__.py 0 → 100644
... ... @@ -0,0 +1 @@
  1 +# package
... ...
lbbulk/scripts/initializedb.py 0 → 100644
... ... @@ -0,0 +1,40 @@
  1 +import os
  2 +import sys
  3 +import transaction
  4 +
  5 +from sqlalchemy import engine_from_config
  6 +
  7 +from pyramid.paster import (
  8 + get_appsettings,
  9 + setup_logging,
  10 + )
  11 +
  12 +from pyramid.scripts.common import parse_vars
  13 +
  14 +from ..models import (
  15 + DBSession,
  16 + MyModel,
  17 + Base,
  18 + )
  19 +
  20 +
  21 +def usage(argv):
  22 + cmd = os.path.basename(argv[0])
  23 + print('usage: %s <config_uri> [var=value]\n'
  24 + '(example: "%s development.ini")' % (cmd, cmd))
  25 + sys.exit(1)
  26 +
  27 +
  28 +def main(argv=sys.argv):
  29 + if len(argv) < 2:
  30 + usage(argv)
  31 + config_uri = argv[1]
  32 + options = parse_vars(argv[2:])
  33 + setup_logging(config_uri)
  34 + settings = get_appsettings(config_uri, options=options)
  35 + engine = engine_from_config(settings, 'sqlalchemy.')
  36 + DBSession.configure(bind=engine)
  37 + Base.metadata.create_all(engine)
  38 + with transaction.manager:
  39 + model = MyModel(name='one', value=1)
  40 + DBSession.add(model)
... ...
lbbulk/static/favicon.ico 0 → 100644
No preview for this file type
lbbulk/static/footerbg.png 0 → 100644

333 Bytes

lbbulk/static/headerbg.png 0 → 100644

203 Bytes

lbbulk/static/ie6.css 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +* html img,
  2 +* html .png{position:relative;behavior:expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
  3 +this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')",
  4 +this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
  5 +this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')",
  6 +this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
  7 +);}
  8 +#wrap{display:table;height:100%}
... ...
lbbulk/static/middlebg.png 0 → 100644

2.73 KB

lbbulk/static/pylons.css 0 → 100644
... ... @@ -0,0 +1,372 @@
  1 +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td
  2 +{
  3 + margin: 0;
  4 + padding: 0;
  5 + border: 0;
  6 + outline: 0;
  7 + font-size: 100%; /* 16px */
  8 + vertical-align: baseline;
  9 + background: transparent;
  10 +}
  11 +
  12 +body
  13 +{
  14 + line-height: 1;
  15 +}
  16 +
  17 +ol, ul
  18 +{
  19 + list-style: none;
  20 +}
  21 +
  22 +blockquote, q
  23 +{
  24 + quotes: none;
  25 +}
  26 +
  27 +blockquote:before, blockquote:after, q:before, q:after
  28 +{
  29 + content: '';
  30 + content: none;
  31 +}
  32 +
  33 +:focus
  34 +{
  35 + outline: 0;
  36 +}
  37 +
  38 +ins
  39 +{
  40 + text-decoration: none;
  41 +}
  42 +
  43 +del
  44 +{
  45 + text-decoration: line-through;
  46 +}
  47 +
  48 +table
  49 +{
  50 + border-collapse: collapse;
  51 + border-spacing: 0;
  52 +}
  53 +
  54 +sub
  55 +{
  56 + vertical-align: sub;
  57 + font-size: smaller;
  58 + line-height: normal;
  59 +}
  60 +
  61 +sup
  62 +{
  63 + vertical-align: super;
  64 + font-size: smaller;
  65 + line-height: normal;
  66 +}
  67 +
  68 +ul, menu, dir
  69 +{
  70 + display: block;
  71 + list-style-type: disc;
  72 + margin: 1em 0;
  73 + padding-left: 40px;
  74 +}
  75 +
  76 +ol
  77 +{
  78 + display: block;
  79 + list-style-type: decimal-leading-zero;
  80 + margin: 1em 0;
  81 + padding-left: 40px;
  82 +}
  83 +
  84 +li
  85 +{
  86 + display: list-item;
  87 +}
  88 +
  89 +ul ul, ul ol, ul dir, ul menu, ul dl, ol ul, ol ol, ol dir, ol menu, ol dl, dir ul, dir ol, dir dir, dir menu, dir dl, menu ul, menu ol, menu dir, menu menu, menu dl, dl ul, dl ol, dl dir, dl menu, dl dl
  90 +{
  91 + margin-top: 0;
  92 + margin-bottom: 0;
  93 +}
  94 +
  95 +ol ul, ul ul, menu ul, dir ul, ol menu, ul menu, menu menu, dir menu, ol dir, ul dir, menu dir, dir dir
  96 +{
  97 + list-style-type: circle;
  98 +}
  99 +
  100 +ol ol ul, ol ul ul, ol menu ul, ol dir ul, ol ol menu, ol ul menu, ol menu menu, ol dir menu, ol ol dir, ol ul dir, ol menu dir, ol dir dir, ul ol ul, ul ul ul, ul menu ul, ul dir ul, ul ol menu, ul ul menu, ul menu menu, ul dir menu, ul ol dir, ul ul dir, ul menu dir, ul dir dir, menu ol ul, menu ul ul, menu menu ul, menu dir ul, menu ol menu, menu ul menu, menu menu menu, menu dir menu, menu ol dir, menu ul dir, menu menu dir, menu dir dir, dir ol ul, dir ul ul, dir menu ul, dir dir ul, dir ol menu, dir ul menu, dir menu menu, dir dir menu, dir ol dir, dir ul dir, dir menu dir, dir dir dir
  101 +{
  102 + list-style-type: square;
  103 +}
  104 +
  105 +.hidden
  106 +{
  107 + display: none;
  108 +}
  109 +
  110 +p
  111 +{
  112 + line-height: 1.5em;
  113 +}
  114 +
  115 +h1
  116 +{
  117 + font-size: 1.75em;
  118 + line-height: 1.7em;
  119 + font-family: helvetica, verdana;
  120 +}
  121 +
  122 +h2
  123 +{
  124 + font-size: 1.5em;
  125 + line-height: 1.7em;
  126 + font-family: helvetica, verdana;
  127 +}
  128 +
  129 +h3
  130 +{
  131 + font-size: 1.25em;
  132 + line-height: 1.7em;
  133 + font-family: helvetica, verdana;
  134 +}
  135 +
  136 +h4
  137 +{
  138 + font-size: 1em;
  139 + line-height: 1.7em;
  140 + font-family: helvetica, verdana;
  141 +}
  142 +
  143 +html, body
  144 +{
  145 + width: 100%;
  146 + height: 100%;
  147 +}
  148 +
  149 +body
  150 +{
  151 + margin: 0;
  152 + padding: 0;
  153 + background-color: #fff;
  154 + position: relative;
  155 + font: 16px/24px NobileRegular, "Lucida Grande", Lucida, Verdana, sans-serif;
  156 +}
  157 +
  158 +a
  159 +{
  160 + color: #1b61d6;
  161 + text-decoration: none;
  162 +}
  163 +
  164 +a:hover
  165 +{
  166 + color: #e88f00;
  167 + text-decoration: underline;
  168 +}
  169 +
  170 +body h1, body h2, body h3, body h4, body h5, body h6
  171 +{
  172 + font-family: NeutonRegular, "Lucida Grande", Lucida, Verdana, sans-serif;
  173 + font-weight: 400;
  174 + color: #373839;
  175 + font-style: normal;
  176 +}
  177 +
  178 +#wrap
  179 +{
  180 + min-height: 100%;
  181 +}
  182 +
  183 +#header, #footer
  184 +{
  185 + width: 100%;
  186 + color: #fff;
  187 + height: 40px;
  188 + position: absolute;
  189 + text-align: center;
  190 + line-height: 40px;
  191 + overflow: hidden;
  192 + font-size: 12px;
  193 + vertical-align: middle;
  194 +}
  195 +
  196 +#header
  197 +{
  198 + background: #000;
  199 + top: 0;
  200 + font-size: 14px;
  201 +}
  202 +
  203 +#footer
  204 +{
  205 + bottom: 0;
  206 + background: #000 url(footerbg.png) repeat-x 0 top;
  207 + position: relative;
  208 + margin-top: -40px;
  209 + clear: both;
  210 +}
  211 +
  212 +.header, .footer
  213 +{
  214 + width: 750px;
  215 + margin-right: auto;
  216 + margin-left: auto;
  217 +}
  218 +
  219 +.wrapper
  220 +{
  221 + width: 100%;
  222 +}
  223 +
  224 +#top, #top-small, #bottom
  225 +{
  226 + width: 100%;
  227 +}
  228 +
  229 +#top
  230 +{
  231 + color: #000;
  232 + height: 230px;
  233 + background: #fff url(headerbg.png) repeat-x 0 top;
  234 + position: relative;
  235 +}
  236 +
  237 +#top-small
  238 +{
  239 + color: #000;
  240 + height: 60px;
  241 + background: #fff url(headerbg.png) repeat-x 0 top;
  242 + position: relative;
  243 +}
  244 +
  245 +#bottom
  246 +{
  247 + color: #222;
  248 + background-color: #fff;
  249 +}
  250 +
  251 +.top, .top-small, .middle, .bottom
  252 +{
  253 + width: 750px;
  254 + margin-right: auto;
  255 + margin-left: auto;
  256 +}
  257 +
  258 +.top
  259 +{
  260 + padding-top: 40px;
  261 +}
  262 +
  263 +.top-small
  264 +{
  265 + padding-top: 10px;
  266 +}
  267 +
  268 +#middle
  269 +{
  270 + width: 100%;
  271 + height: 100px;
  272 + background: url(middlebg.png) repeat-x;
  273 + border-top: 2px solid #fff;
  274 + border-bottom: 2px solid #b2b2b2;
  275 +}
  276 +
  277 +.app-welcome
  278 +{
  279 + margin-top: 25px;
  280 +}
  281 +
  282 +.app-name
  283 +{
  284 + color: #000;
  285 + font-weight: 700;
  286 +}
  287 +
  288 +.bottom
  289 +{
  290 + padding-top: 50px;
  291 +}
  292 +
  293 +#left
  294 +{
  295 + width: 350px;
  296 + float: left;
  297 + padding-right: 25px;
  298 +}
  299 +
  300 +#right
  301 +{
  302 + width: 350px;
  303 + float: right;
  304 + padding-left: 25px;
  305 +}
  306 +
  307 +.align-left
  308 +{
  309 + text-align: left;
  310 +}
  311 +
  312 +.align-right
  313 +{
  314 + text-align: right;
  315 +}
  316 +
  317 +.align-center
  318 +{
  319 + text-align: center;
  320 +}
  321 +
  322 +ul.links
  323 +{
  324 + margin: 0;
  325 + padding: 0;
  326 +}
  327 +
  328 +ul.links li
  329 +{
  330 + list-style-type: none;
  331 + font-size: 14px;
  332 +}
  333 +
  334 +form
  335 +{
  336 + border-style: none;
  337 +}
  338 +
  339 +fieldset
  340 +{
  341 + border-style: none;
  342 +}
  343 +
  344 +input
  345 +{
  346 + color: #222;
  347 + border: 1px solid #ccc;
  348 + font-family: sans-serif;
  349 + font-size: 12px;
  350 + line-height: 16px;
  351 +}
  352 +
  353 +input[type=text], input[type=password]
  354 +{
  355 + width: 205px;
  356 +}
  357 +
  358 +input[type=submit]
  359 +{
  360 + background-color: #ddd;
  361 + font-weight: 700;
  362 +}
  363 +
  364 +/*Opera Fix*/
  365 +body:before
  366 +{
  367 + content: "";
  368 + height: 100%;
  369 + float: left;
  370 + width: 0;
  371 + margin-top: -32767px;
  372 +}
... ...
lbbulk/static/pyramid-small.png 0 → 100644

6.88 KB

lbbulk/static/pyramid.png 0 → 100644

32.3 KB

lbbulk/static/transparent.gif 0 → 100644

49 Bytes

lbbulk/templates/mytemplate.pt 0 → 100644
... ... @@ -0,0 +1,73 @@
  1 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:tal="http://xml.zope.org/namespaces/tal">
  3 +<head>
  4 + <title>The Pyramid Web Framework</title>
  5 + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
  6 + <meta name="keywords" content="python web application" />
  7 + <meta name="description" content="pyramid web application" />
  8 + <link rel="shortcut icon" href="${request.static_url('lbbulk:static/favicon.ico')}" />
  9 + <link rel="stylesheet" href="${request.static_url('lbbulk:static/pylons.css')}" type="text/css" media="screen" charset="utf-8" />
  10 + <link rel="stylesheet" href="http://static.pylonsproject.org/fonts/nobile/stylesheet.css" media="screen" />
  11 + <link rel="stylesheet" href="http://static.pylonsproject.org/fonts/neuton/stylesheet.css" media="screen" />
  12 + <!--[if lte IE 6]>
  13 + <link rel="stylesheet" href="${request.static_url('lbbulk:static/ie6.css')}" type="text/css" media="screen" charset="utf-8" />
  14 + <![endif]-->
  15 +</head>
  16 +<body>
  17 + <div id="wrap">
  18 + <div id="top">
  19 + <div class="top align-center">
  20 + <div><img src="${request.static_url('lbbulk:static/pyramid.png')}" width="750" height="169" alt="pyramid"/></div>
  21 + </div>
  22 + </div>
  23 + <div id="middle">
  24 + <div class="middle align-center">
  25 + <p class="app-welcome">
  26 + Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
  27 + the Pyramid Web Framework.
  28 + </p>
  29 + </div>
  30 + </div>
  31 + <div id="bottom">
  32 + <div class="bottom">
  33 + <div id="left" class="align-right">
  34 + <h2>Search documentation</h2>
  35 + <form method="get" action="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/search.html">
  36 + <input type="text" id="q" name="q" value="" />
  37 + <input type="submit" id="x" value="Go" />
  38 + </form>
  39 + </div>
  40 + <div id="right" class="align-left">
  41 + <h2>Pyramid links</h2>
  42 + <ul class="links">
  43 + <li>
  44 + <a href="http://pylonsproject.org">Pylons Website</a>
  45 + </li>
  46 + <li>
  47 + <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#narrative-documentation">Narrative Documentation</a>
  48 + </li>
  49 + <li>
  50 + <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#reference-material">API Documentation</a>
  51 + </li>
  52 + <li>
  53 + <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#tutorials">Tutorials</a>
  54 + </li>
  55 + <li>
  56 + <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#detailed-change-history">Change History</a>
  57 + </li>
  58 + <li>
  59 + <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#sample-applications">Sample Applications</a>
  60 + </li>
  61 + <li>
  62 + <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#support-and-development">Support and Development</a>
  63 + </li>
  64 + <li>
  65 + <a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
  66 + </li>
  67 + </ul>
  68 + </div>
  69 + </div>
  70 + </div>
  71 + </div>
  72 +</body>
  73 +</html>
... ...
lbbulk/views.py 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +from pyramid.response import Response
  2 +from pyramid.view import view_config
  3 +
  4 +from sqlalchemy.exc import DBAPIError
  5 +
  6 +
  7 +@view_config(route_name='home', renderer='templates/mytemplate.pt')
  8 +def my_view(request):
  9 + return {'project': 'LBBulk'}
0 10 \ No newline at end of file
... ...
production.ini 0 → 100644
... ... @@ -0,0 +1,62 @@
  1 +###
  2 +# app configuration
  3 +# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html
  4 +###
  5 +
  6 +[app:main]
  7 +use = egg:LBBulk
  8 +
  9 +pyramid.reload_templates = false
  10 +pyramid.debug_authorization = false
  11 +pyramid.debug_notfound = false
  12 +pyramid.debug_routematch = false
  13 +pyramid.default_locale_name = en
  14 +pyramid.includes =
  15 + pyramid_tm
  16 +
  17 +sqlalchemy.url = postgresql://postgres:postgres@10.1.0.152/projeto1
  18 +
  19 +[server:main]
  20 +use = egg:waitress#main
  21 +host = 0.0.0.0
  22 +port = 6543
  23 +
  24 +###
  25 +# logging configuration
  26 +# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
  27 +###
  28 +
  29 +[loggers]
  30 +keys = root, lbbulk, sqlalchemy
  31 +
  32 +[handlers]
  33 +keys = console
  34 +
  35 +[formatters]
  36 +keys = generic
  37 +
  38 +[logger_root]
  39 +level = WARN
  40 +handlers = console
  41 +
  42 +[logger_lbbulk]
  43 +level = WARN
  44 +handlers =
  45 +qualname = lbbulk
  46 +
  47 +[logger_sqlalchemy]
  48 +level = WARN
  49 +handlers =
  50 +qualname = sqlalchemy.engine
  51 +# "level = INFO" logs SQL queries.
  52 +# "level = DEBUG" logs SQL queries and results.
  53 +# "level = WARN" logs neither. (Recommended for production systems.)
  54 +
  55 +[handler_console]
  56 +class = StreamHandler
  57 +args = (sys.stderr,)
  58 +level = NOTSET
  59 +formatter = generic
  60 +
  61 +[formatter_generic]
  62 +format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
... ...
setup.cfg 0 → 100644
... ... @@ -0,0 +1,27 @@
  1 +[nosetests]
  2 +match=^test
  3 +nocapture=1
  4 +cover-package=lbbulk
  5 +with-coverage=1
  6 +cover-erase=1
  7 +
  8 +[compile_catalog]
  9 +directory = lbbulk/locale
  10 +domain = LBBulk
  11 +statistics = true
  12 +
  13 +[extract_messages]
  14 +add_comments = TRANSLATORS:
  15 +output_file = lbbulk/locale/LBBulk.pot
  16 +width = 80
  17 +
  18 +[init_catalog]
  19 +domain = LBBulk
  20 +input_file = lbbulk/locale/LBBulk.pot
  21 +output_dir = lbbulk/locale
  22 +
  23 +[update_catalog]
  24 +domain = LBBulk
  25 +input_file = lbbulk/locale/LBBulk.pot
  26 +output_dir = lbbulk/locale
  27 +previous = true
... ...
setup.py 0 → 100644
... ... @@ -0,0 +1,50 @@
  1 +import os
  2 +
  3 +from setuptools import setup, find_packages
  4 +
  5 +here = os.path.abspath(os.path.dirname(__file__))
  6 +with open(os.path.join(here, 'README.txt')) as f:
  7 + README = f.read()
  8 +with open(os.path.join(here, 'CHANGES.txt')) as f:
  9 + CHANGES = f.read()
  10 +
  11 +requires = [
  12 + 'pyramid',
  13 + 'pyramid_chameleon',
  14 + 'pyramid_debugtoolbar',
  15 + 'pyramid_tm',
  16 + 'SQLAlchemy',
  17 + 'transaction',
  18 + 'zope.sqlalchemy',
  19 + 'waitress',
  20 + 'pyramid_restler',
  21 + ]
  22 +
  23 +setup(name='LBBulk',
  24 + version='0.1',
  25 + description='Translator for external keys to fit properly on the lightbase standard',
  26 + long_description=README + '\n\n' + CHANGES,
  27 + classifiers=[
  28 + "Development Status :: 2 - Pre-Alpha"
  29 + "Framework :: Pyramid",
  30 + "License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
  31 + "Natural Language :: English"
  32 + "Programming Language :: Python :: 3",
  33 + "Topic :: Database :: Database Engines/Servers"
  34 + ],
  35 + author='Lightbase',
  36 + author_email='pedro.ricardo@lightbase.com',
  37 + url='',
  38 + keywords='lightbase database translator bulk pyramid',
  39 + packages=find_packages(),
  40 + include_package_data=True,
  41 + zip_safe=False,
  42 + # test_suite='lbbulk',
  43 + install_requires=requires,
  44 + entry_points="""\
  45 + [paste.app_factory]
  46 + main = lbbulk:main
  47 + [console_scripts]
  48 + initialize_LBBulk_db = lbbulk.scripts.initializedb:main
  49 + """,
  50 + )
0 51 \ No newline at end of file
... ...