Commit 40eb5d0215eda9dfec9b8824e751edad20008a6b

Authored by pedro
1 parent 45062a5d
Exists in master

Correção de erros acontecidos no MPOG

git-svn-id: http://svn.brlight.net/svn/lightbase-neo/trunk/LBBulk@885 29b92fdf-8c97-4584-b987-84e8d3c556fa
LBBulk.egg-info/PKG-INFO
@@ -1,35 +0,0 @@ @@ -1,35 +0,0 @@
1 -Metadata-Version: 1.1  
2 -Name: LBBulk  
3 -Version: 0.1  
4 -Summary: Translator for external keys to fit properly on the lightbase standard  
5 -Home-page: UNKNOWN  
6 -Author: Lightbase  
7 -Author-email: pedro.ricardo@lightbase.com  
8 -License: UNKNOWN  
9 -Description: LBBulk README  
10 - ==================  
11 -  
12 - Getting Started  
13 - ---------------  
14 -  
15 - - cd <directory containing this file>  
16 -  
17 - - $VENV/bin/python setup.py develop  
18 -  
19 - - $VENV/bin/initialize_LBBulk_db development.ini  
20 -  
21 - - $VENV/bin/pserve development.ini  
22 -  
23 -  
24 -  
25 - 0.0  
26 - ---  
27 -  
28 - - Initial version  
29 -  
30 -Keywords: lightbase database translator bulk pyramid  
31 -Platform: UNKNOWN  
32 -Classifier: Development Status :: 2 - Pre-AlphaFramework :: Pyramid  
33 -Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)  
34 -Classifier: Natural Language :: EnglishProgramming Language :: Python :: 3  
35 -Classifier: Topic :: Database :: Database Engines/Servers  
LBBulk.egg-info/SOURCES.txt
@@ -1,33 +0,0 @@ @@ -1,33 +0,0 @@
1 -CHANGES.txt  
2 -MANIFEST.in  
3 -README.txt  
4 -TODO.txt  
5 -development.ini  
6 -production.ini  
7 -setup.cfg  
8 -setup.py  
9 -LBBulk.egg-info/PKG-INFO  
10 -LBBulk.egg-info/SOURCES.txt  
11 -LBBulk.egg-info/dependency_links.txt  
12 -LBBulk.egg-info/entry_points.txt  
13 -LBBulk.egg-info/not-zip-safe  
14 -LBBulk.egg-info/requires.txt  
15 -LBBulk.egg-info/top_level.txt  
16 -lbbulk/__init__.py  
17 -lbbulk/config/__init__.py  
18 -lbbulk/config/routing.py  
19 -lbbulk/model/Registro.py  
20 -lbbulk/model/__init__.py  
21 -lbbulk/scripts/__init__.py  
22 -lbbulk/scripts/initializedb.py  
23 -lbbulk/static/favicon.ico  
24 -lbbulk/static/footerbg.png  
25 -lbbulk/static/headerbg.png  
26 -lbbulk/static/ie6.css  
27 -lbbulk/static/middlebg.png  
28 -lbbulk/static/pylons.css  
29 -lbbulk/static/pyramid-small.png  
30 -lbbulk/static/pyramid.png  
31 -lbbulk/static/transparent.gif  
32 -lbbulk/templates/mytemplate.pt  
33 -lbbulk/view/__init__.py  
34 \ No newline at end of file 0 \ No newline at end of file
LBBulk.egg-info/dependency_links.txt
No preview for this file type
LBBulk.egg-info/entry_points.txt
@@ -1,5 +0,0 @@ @@ -1,5 +0,0 @@
1 - [paste.app_factory]  
2 - main = lbbulk:main  
3 - [console_scripts]  
4 - initialize_LBBulk_db = lbbulk.scripts.initializedb:main  
5 -  
6 \ No newline at end of file 0 \ No newline at end of file
LBBulk.egg-info/not-zip-safe
No preview for this file type
LBBulk.egg-info/requires.txt
@@ -1,9 +0,0 @@ @@ -1,9 +0,0 @@
1 -pyramid  
2 -pyramid_chameleon  
3 -pyramid_debugtoolbar  
4 -pyramid_tm  
5 -SQLAlchemy  
6 -transaction  
7 -zope.sqlalchemy  
8 -waitress  
9 -pyramid_restler  
10 \ No newline at end of file 0 \ No newline at end of file
LBBulk.egg-info/top_level.txt
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -lbbulk  
MANIFEST.in
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 -include *.txt *.ini *.cfg *.rst  
2 -recursive-include lbbulk *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml  
build/lib/lbbulk/__init__.py
@@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
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.model import Base, metadata, DBSession  
6 -  
7 -  
8 -def main(global_config, **settings):  
9 - """ This function returns a Pyramid WSGI application.  
10 - """  
11 - config = Configurator(settings=settings)  
12 - config.scan('lbbulk')  
13 - engine = engine_from_config(settings, 'sqlalchemy.')  
14 - DBSession.configure(bind=engine)  
15 - Base.metadata.bind = engine  
16 - config.include('pyramid_chameleon')  
17 - make_routes(config)  
18 - config.enable_POST_tunneling()  
19 - return config.make_wsgi_app()  
20 \ No newline at end of file 0 \ No newline at end of file
build/lib/lbbulk/config/__init__.py
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -# package  
2 \ No newline at end of file 0 \ No newline at end of file
build/lib/lbbulk/config/routing.py
@@ -1,9 +0,0 @@ @@ -1,9 +0,0 @@
1 -from lbbulk.model.Registo import RegistroContextFactory  
2 -  
3 -def make_routes(config):  
4 - """  
5 - Create routes  
6 - """  
7 - config.add_static_view('static', 'static', cache_max_age=3600)  
8 - config.add_route('home', '/')  
9 - config.add_restful_routes('registo', Registo.RegistroContextFactory)  
10 \ No newline at end of file 0 \ No newline at end of file
build/lib/lbbulk/model/Registro.py
@@ -1,38 +0,0 @@ @@ -1,38 +0,0 @@
1 -from sqlalchemy import Table, Column, Integer, \  
2 - String, join, ForeignKey  
3 -from sqlalchemy.orm import column_property  
4 -from pyramid_restler.model import SQLAlchemyORMContext  
5 -from lbbulk.model import Base, metadata  
6 -  
7 -# define two Table objects  
8 -bulk_sources = Table('lb_bulk_sources', metadata,  
9 - Column('id_source', Integer, primary_key=True),  
10 - Column('nome_source', String),  
11 - )  
12 -  
13 -bulk_upload = Table('lb_bulk_upload', metadata,  
14 - Column('id_reg', Integer, primary_key=True),  
15 - Column('chave_externa', String),  
16 - Column('id_source', Integer, ForeignKey('lb_bulk_sources.id_source'))  
17 - )  
18 -  
19 -# define a join between them. This  
20 -# takes place across the bulk_sources.id_source and bulk_upload.id_source  
21 -# columns.  
22 -registro = join(bulk_sources, bulk_upload)  
23 -  
24 -# map to it  
25 -class Registro(Base):  
26 - __table__ = registro  
27 - id_source = column_property(bulk_sources.c.id_source, bulk_upload.c.id_source)  
28 -  
29 -class RegistroContextFactory(SQLAlchemyORMContext):  
30 -  
31 - entity = Registro  
32 -  
33 - def session_factory(self):  
34 - return Session()  
35 -  
36 -def root_view(context, request):  
37 - registro = Session().query(Registro).all()  
38 - return dict(registro=registro, Registro=Registro)  
39 \ No newline at end of file 0 \ No newline at end of file
build/lib/lbbulk/model/__init__.py
@@ -1,7 +0,0 @@ @@ -1,7 +0,0 @@
1 -from sqlalchemy import MetaData  
2 -from sqlalchemy.ext.declarative import declarative_base  
3 -from sqlalchemy.orm import scoped_session, sessionmaker  
4 -  
5 -metadata = MetaData()  
6 -Base = declarative_base()  
7 -DBSession = scoped_session(sessionmaker())  
8 \ No newline at end of file 0 \ No newline at end of file
build/lib/lbbulk/scripts/__init__.py
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -# package  
build/lib/lbbulk/scripts/initializedb.py
@@ -1,40 +0,0 @@ @@ -1,40 +0,0 @@
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)  
build/lib/lbbulk/static/favicon.ico
No preview for this file type
build/lib/lbbulk/static/footerbg.png

333 Bytes

build/lib/lbbulk/static/headerbg.png

203 Bytes

build/lib/lbbulk/static/ie6.css
@@ -1,8 +0,0 @@ @@ -1,8 +0,0 @@
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%}  
build/lib/lbbulk/static/middlebg.png

2.73 KB

build/lib/lbbulk/static/pylons.css
@@ -1,372 +0,0 @@ @@ -1,372 +0,0 @@
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 -}  
build/lib/lbbulk/static/pyramid-small.png

6.88 KB

build/lib/lbbulk/static/pyramid.png

32.3 KB

build/lib/lbbulk/static/transparent.gif

49 Bytes

build/lib/lbbulk/templates/mytemplate.pt
@@ -1,73 +0,0 @@ @@ -1,73 +0,0 @@
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>  
build/lib/lbbulk/view/__init__.py
@@ -1,7 +0,0 @@ @@ -1,7 +0,0 @@
1 -from pyramid.response import Response  
2 -from pyramid.view import view_config  
3 -  
4 -  
5 -@view_config(route_name='home', renderer='../templates/mytemplate.pt')  
6 -def my_view(request):  
7 - return {'project': 'LBBulk'}  
8 \ No newline at end of file 0 \ No newline at end of file
development.ini
@@ -9,7 +9,7 @@ pyramid.default_locale_name = en @@ -9,7 +9,7 @@ pyramid.default_locale_name = en
9 pyramid.includes = 9 pyramid.includes =
10 pyramid_tm 10 pyramid_tm
11 11
12 -sqlalchemy.url = postgresql://rest:rest@localhost/projeto1 12 +sqlalchemy.url = postgresql://rest:rest@localhost/lbbulk
13 13
14 domain = http://api.brlight.org 14 domain = http://api.brlight.org
15 base_name = wmi 15 base_name = wmi
dist/LBBulk-0.1-py3.2.egg
No preview for this file type
lbbulk/config/routing.py
1 # import lbbulk.model 1 # import lbbulk.model
2 from lbbulk.model.BulkUpload import BulkUploadContextFactory 2 from lbbulk.model.BulkUpload import BulkUploadContextFactory
3 -from lbbulk.model.BulkSources import BulkSourcesContextFactory 3 +from lbbulk.model.BulkSources import BulkSourceContextFactory
4 from lbbulk.view.restfulview import RegCustomView 4 from lbbulk.view.restfulview import RegCustomView
5 5
6 def make_routes(config): 6 def make_routes(config):
@@ -9,6 +9,6 @@ def make_routes(config): @@ -9,6 +9,6 @@ def make_routes(config):
9 """ 9 """
10 config.add_static_view('static', 'static', cache_max_age=3600) 10 config.add_static_view('static', 'static', cache_max_age=3600)
11 config.add_route('home', '/') 11 config.add_route('home', '/')
12 - config.add_restful_routes('sources', BulkSourcesContextFactory) 12 + config.add_restful_routes('source', BulkSourceContextFactory)
13 config.add_restful_routes('reg', BulkUploadContextFactory, 13 config.add_restful_routes('reg', BulkUploadContextFactory,
14 - view=RegCustomView)  
15 \ No newline at end of file 14 \ No newline at end of file
  15 + view=RegCustomView)
lbbulk/model/BulkSources.py
@@ -3,18 +3,18 @@ from pyramid_restler.model import SQLAlchemyORMContext @@ -3,18 +3,18 @@ from pyramid_restler.model import SQLAlchemyORMContext
3 from lbbulk.model import Base, metadata, session 3 from lbbulk.model import Base, metadata, session
4 4
5 5
6 -bulk_sources = Table('lb_bulk_sources', metadata, 6 +bulk_source = Table('lb_bulk_source', metadata,
7 Column('id_source', Integer, primary_key=True), 7 Column('id_source', Integer, primary_key=True),
8 Column('nome_source', String, nullable=False) 8 Column('nome_source', String, nullable=False)
9 ) 9 )
10 10
11 11
12 # map to it 12 # map to it
13 -class BulkSources(Base):  
14 - __table__ = bulk_sources 13 +class BulkSource(Base):
  14 + __table__ = bulk_source
15 15
16 -class BulkSourcesContextFactory(SQLAlchemyORMContext):  
17 - entity = BulkSources 16 +class BulkSourceContextFactory(SQLAlchemyORMContext):
  17 + entity = BulkSource
18 18
19 def session_factory(self): 19 def session_factory(self):
20 - return session  
21 \ No newline at end of file 20 \ No newline at end of file
  21 + return session
lbbulk/templates/mytemplate.pt
@@ -34,7 +34,10 @@ @@ -34,7 +34,10 @@
34 <h2>Restful Views</h2> 34 <h2>Restful Views</h2>
35 <ul class="links"> 35 <ul class="links">
36 <li> 36 <li>
37 - <a href="registro">Registro</a> 37 + <a href="/lbbulk/reg">Registros</a>
  38 + </li>
  39 + <li>
  40 + <a href="/lbbulk/source">Fontes de Dados</a>
38 </li> 41 </li>
39 </ul> 42 </ul>
40 </div> 43 </div>
production.ini
@@ -14,17 +14,17 @@ pyramid.default_locale_name = en @@ -14,17 +14,17 @@ pyramid.default_locale_name = en
14 pyramid.includes = 14 pyramid.includes =
15 pyramid_tm 15 pyramid_tm
16 16
17 -sqlalchemy.url = postgresql://postgres:postgres@10.1.0.152/projeto1 17 +sqlalchemy.url = postgresql://rest:rest@localhost/lbbulk
18 18
19 -domain = http://localhost/lbgenerator  
20 -base_name = WMI 19 +domain = http://api.brlight.org
  20 +base_name = wmi
21 21
22 [server:main] 22 [server:main]
23 use = egg:waitress#main 23 use = egg:waitress#main
24 host = 0.0.0.0 24 host = 0.0.0.0
25 port = 6543 25 port = 6543
26 26
27 -### 27 +###
28 # logging configuration 28 # logging configuration
29 # http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html 29 # http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
30 ### 30 ###
@@ -10,17 +10,18 @@ with open(os.path.join(here, &#39;CHANGES.txt&#39;)) as f: @@ -10,17 +10,18 @@ with open(os.path.join(here, &#39;CHANGES.txt&#39;)) as f:
10 10
11 requires = [ 11 requires = [
12 'pyramid', 12 'pyramid',
13 - 'pyramid_chameleon',  
14 - 'pyramid_debugtoolbar',  
15 - 'pyramid_tm',  
16 'SQLAlchemy', 13 'SQLAlchemy',
17 'transaction', 14 'transaction',
  15 + 'pyramid_tm',
  16 + 'pyramid_debugtoolbar',
18 'zope.sqlalchemy', 17 'zope.sqlalchemy',
19 'waitress', 18 'waitress',
  19 + 'psycopg2',
20 'pyramid_restler', 20 'pyramid_restler',
  21 + 'pyramid_chameleon',
21 'requests', 22 'requests',
22 - 'configparser'  
23 - ] 23 + 'chameleon'
  24 +]
24 25
25 setup(name='LBBulk', 26 setup(name='LBBulk',
26 version='0.1', 27 version='0.1',
@@ -49,4 +50,4 @@ setup(name=&#39;LBBulk&#39;, @@ -49,4 +50,4 @@ setup(name=&#39;LBBulk&#39;,
49 [console_scripts] 50 [console_scripts]
50 initialize_LBBulk_db = lbbulk.scripts.initializedb:main 51 initialize_LBBulk_db = lbbulk.scripts.initializedb:main
51 """, 52 """,
52 - )  
53 \ No newline at end of file 53 \ No newline at end of file
  54 + )