[web2py] Re: ghost scheduler workers can never be deleted even the web2py-schduler is stopped.

2015-04-29 Thread Niphlod
BTW (for future readers): worker names are available as the worker_name, and are by default composed by a hostname#pid format. should be easy to spot where the scheduler is actually running :-P On Wednesday, April 29, 2015 at 6:51:08 PM UTC+2, Pengfei Yu wrote: Thanks Niphlod! It turns out

[web2py] Re: scheduler workers get deleted constantly and one task is assigned to many different runs

2015-04-29 Thread Niphlod
whoa. Thank god I put some statistics in to help with debugging.. It seems that the worker processes are handling one task and dieing in the middle of the process. Also, it seems that your task is never-ending. workers that haven't a task to be processed are running fine (empty_runs on

Re: [web2py] how to run tests over pydal locally?

2015-04-29 Thread Niphlod
, Richard Vézina ml.richa...@gmail.com javascript: wrote: :) I don't test enough!! Richard On Wed, Apr 29, 2015 at 4:08 PM, Niphlod nip...@gmail.com javascript: wrote: some time I just don't know what's going on with my writing. Am I really that obscure ? can you spot the difference

Re: [web2py] parenthesis in SQLFORM.grid search

2015-04-29 Thread Niphlod
is it something that requires an answer ? grid search is meant to be flexible AND user-friendly: you can come up with your own syntax and code your own search widget if you need something else On Wednesday, April 29, 2015 at 3:49:37 PM UTC+2, Richard wrote: Hello, It seems that

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Niphlod
The assumption was indeed if the app is the only thing accessing the database. Not trusting DB administrators is kinda weird as a requirement, but if that's your scenario, go for it. I'm a bit lost on the general idea for the implementation is the user required to input some kind of

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Niphlod
from an expert in encryption... I was thinking of sotring gpg pub and private key in auth_user field for each respectively. Then invoque the user to input password when he want to sign a record after_validation and before_insert occur... ?? Richard On Tue, Apr 28, 2015 at 4:26 PM, Niphlod

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Niphlod
I meant an hmac with the user supplying the key, of course. That puts you on the safe-side of db admin tampering. On Tuesday, April 28, 2015 at 11:32:47 PM UTC+2, Derek wrote: I'd have to agree, put the user account (email, username, whatever) and the fields all together, calculate hmac on

[web2py] Re: Show tables

2015-04-28 Thread Niphlod
grid can show a join, that is data coming from different table, but condensed into a single resultset. if you want a page with more than a grid, each holding a simple table, you should use components. On Tuesday, April 28, 2015 at 9:26:23 PM UTC+2, KevC wrote: Hi! I want to show two or more

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Niphlod
not to discredit the efforts, but if you're not going to relinquish the computed signature to the user, what good does it make over auditing changes through, e.g., record_versioning ? If the database is only accessed within your app, your app (and/or your server) is responsibile of NOT

[web2py] Re: Best way to load password at startup.

2015-04-27 Thread Niphlod
use an environmental variable or a configuration file that you'll have in private/ but won't commit to git. For the latter solution, the current scaffolding uses a new module, named appconfig. On Monday, April 27, 2015 at 4:40:06 PM UTC+2, hiro wrote: I connect to an external DB in one of my

[web2py] Re: sub sub menu in newest version

2015-04-26 Thread Niphlod
this would be the last time I post on the subject: hopefully new readers will accept things as they are and live happily ever after... bootstrap3 DOESN'T (and probably won't ever, if you followed its development closely) support any menu that goes as far as the 3rd level. ANY snippet of

[web2py] Re: Combine IS_IN_DB and IS_NOT_IN_DB

2015-04-25 Thread Niphlod
You should read the section on database validators http://web2py.com/books/default/chapter/29/07/forms-and-validators#Database-validators you can either use the _and argument of IS_IN_DB, but more easily for everybody, e.g. there's not even a chance they can select an ip that is used yet,

[web2py] Re: Capture XML response into string for further parsing with ElementTree

2015-04-25 Thread Niphlod
you have fromstring() for parsing the xml. just fetch it with, e.g. urllib2 and load it with fromstring(). On Saturday, April 25, 2015 at 5:28:15 PM UTC+2, NeoToren wrote: Amazon Payments responds to a website with XML. Amazon doesn't send back an XML to my site - it just displays XML - at

[web2py] Re: How to remove application name from urls generated from a scheduled task?

2015-04-25 Thread Niphlod
there's nothing fancy in the scheduler that alters the environment at runtime: it's no different from a web2py shell. can you post your routes, your desired urls and the code that generates them ? On Friday, April 24, 2015 at 6:37:43 PM UTC+2, Lisandro wrote: I'm using parametric based routes

[web2py] Re: ghost scheduler workers can never be deleted even the web2py-schduler is stopped.

2015-04-25 Thread Niphlod
there's nothing that magically insert records on the scheduler_worker table. watch the last_heartbeat column and see if it changes. If it's changing, the workers are still running somewhere and accessing your database. On Friday, April 24, 2015 at 9:24:59 PM UTC+2, Pengfei Yu wrote: Hi I am

[web2py] Re: Need support for web2py application with over 1 million users.

2015-04-24 Thread Niphlod
Database, Yes. Redis, Nope with lock_Keys. I'd go as far as pointing out that the contrib redis backend is the fastest, less cumbersome and less maintenance needy of the whole set of possibilities. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Visiting One SQLFORM.grid triggers another SQLFORM.grid -- bug?

2015-04-22 Thread Niphlod
use different formname(s) for each grid. On Wednesday, April 22, 2015 at 3:15:25 PM UTC+2, LoveWeb2py wrote: Hello, I have somewhat of a weird error and I'm not sure how to fix it. Let's say I have two controllers: def controller1(): grid1 = SQLFORM.grid(db.table1) return

[web2py] Re: SQLFORM.grid order of fields on create or edit form

2015-04-21 Thread Niphlod
I know that may sound as not-really-a-reply, but can't you just switch Field order in the table definition ? On Tuesday, April 21, 2015 at 6:36:11 PM UTC+2, Kyle Flanagan wrote: I know you can specify the order of fields for the main view of an SQLFORM.grid using the optional fields

Re: [web2py] creating DAL from SQL file

2015-04-21 Thread Niphlod
On Tuesday, April 21, 2015 at 9:39:14 PM UTC+2, Ron Chatterjee wrote: I tried this: db = DAL('mysql://root@127.0.0.1:8000/my_database_name',migrate_enabled=False, pool_size=20) It didn't work either. I guess someone needs to look at how to connect to legacy database. where is the

[web2py] Re: SQLFORM.grid order of fields on create or edit form

2015-04-21 Thread Niphlod
On Tuesday, April 21, 2015 at 9:36:40 PM UTC+2, Dave S wrote: On Tuesday, April 21, 2015 at 12:32:28 PM UTC-7, Niphlod wrote: I know that may sound as not-really-a-reply, but can't you just switch Field order in the table definition ? Perhaps it is a legacy table and he's stuck

[web2py] Re: Still having trouble with format / foreign keys

2015-04-20 Thread Niphlod
we're waiting for 2.10.4 including https://github.com/web2py/pydal/issues/135 On Monday, April 20, 2015 at 9:46:58 PM UTC+2, Jim S wrote: I posted in this thread https://groups.google.com/forum/#!topic/web2py/2i9zfAzG2s8 but posted after it was closed. Evidently, this is fixed but I'm

Re: [web2py] websocket_messaging.py not working online

2015-04-20 Thread Niphlod
are you aware that websockets have the same limitation as ajax requests (same domain) ? On Monday, April 20, 2015 at 4:39:08 PM UTC+2, Samuel Sowah wrote: telnet http://official-notebook.com: telnet: could not resolve http://official-notebook.com:/telnet: Name or service not known

[web2py] Re: response.json() not working?

2015-04-20 Thread Niphlod
what are you expecting and what do you see instead ? returning from controllers is the only supported way. On Monday, April 20, 2015 at 6:28:14 PM UTC+2, Jim S wrote: I have some controller methods that I call using ajax and they return a json string using: return

Re: [web2py] response.json() not working?

2015-04-20 Thread Niphlod
On Monday, April 20, 2015 at 8:10:56 PM UTC+2, Richard wrote: https://groups.google.com/forum/#!searchin/web2py/response.json()/web2py/7EJ0-rOd1bo/iR6YWJOSaQgJ @richard: that's not helping: @jim is using response.json in a controller, that is supported, not in a view, that is not

[web2py] Re: response.json() not working?

2015-04-20 Thread Niphlod
there you are! response.json now sets content-type = application/json as it's supposed to be (if no specific content-type header is specified) Previous versions relied on the user setting the right content-type, but we noticed that nobody was properly setting it. tl;dr web2py fixed a

[web2py] Re: response.json() not working?

2015-04-20 Thread Niphlod
On Monday, April 20, 2015 at 9:16:49 PM UTC+2, Jim S wrote: Shoot, so now I have to have different behavior based on the web2py version. If I fix this code so it runs properly, it will quit working on my production servers unless I upgrade them to 2.9.12 or later. Again, the only

[web2py] Re: Web2py: Using images in HTML data

2015-04-18 Thread Niphlod
can't you just use some templating and parse the richbox text, turning /mysitename/static/image.png to /%whatever%/static/image.png ,store that on db, and upon rendering replacing %whatever% with request.application ? On Sunday, April 19, 2015 at 3:18:16 AM UTC+2, Joe Magaro wrote: Does

Re: [web2py] Application Arquitecture advices

2015-04-16 Thread Niphlod
calling web2py functions is still taxing the server. Don't forget that for the 99% of usecases, the taxing problem is accessing the db data, not processing it. On Thursday, April 16, 2015 at 2:46:08 AM UTC+2, Richard wrote: Ok, you are right... I only said that as long as that page not reload

Re: [web2py] Re: in model or controller?

2015-04-16 Thread Niphlod
custom_auth_table = db[auth.settings.table_user_name] On Thursday, April 16, 2015 at 10:13:54 AM UTC+2, Annet wrote: Hi Niphlod, - hit appname/testlazy/does_nothing: by default the generic view shows the toolbar. If you have all the tables listed as lazy you did a goo job

[web2py] Re: Need help with web2pyslices plugin administration

2015-04-16 Thread Niphlod
ok, time to check in with the maintainer ;-P On Thursday, April 16, 2015 at 2:40:21 PM UTC+2, Mirek Zvolský wrote: So, I have tested web2pyslices as user once again. Twice, as original user (zvolsky, zvolsky@..) and new user (mirek, myum@..). Create slice - Recipe, Article, Question,

[web2py] Re: VARCHAR or NVARCHAR?

2015-04-15 Thread Niphlod
I'm on top of this issue in these days, but in the end we will just have to create yet another adapter (maybe a mssql*u* , mssql3*u* and mssql4*u*). The problem is subtle, and goes pretty unnoticed. If - as I - you create an app with mssql: (or mssql3, or mssql4) which have varchar type the odbc

[web2py] Re: in model or controller?

2015-04-15 Thread Niphlod
putting db.tablename.fieldname.requires = VALIDATOR() doesn't do anything BUT if you have lazy_tables turned on, this syntax would trigger the unlazyification of the table. Minus points (the reverse concept of bonus points) for db.tablename.fieldname.requires = IS_IN_DB(db.othertable)

[web2py] Re: unknown error on production server! I need help fixing it asap ['NoneType' object is not callable]

2015-04-15 Thread Niphlod
I really don't know how to put it without hurting anyone's feeling, but the mere fact is that ATM sessions are NOT tied to users. This is correct from a logical standpoint because not every site needs authentication by default, but still needs to use sessions. This is the same kind of

[web2py] Re: unknown error on production server! I need help fixing it asap ['NoneType' object is not callable]

2015-04-15 Thread Niphlod
granted, but discussing to fix this is like - kinda, please grant me a bit of exxageration - forcing a user to logout if the developer changes the password in the database. Identity verification (and the consequent authorization) is meant to happen at a time x to enable accessing the app

Re: [web2py] Re: in model or controller?

2015-04-15 Thread Niphlod
in order: @alex: same thing. if you can stuff everything inside the define_table() call you'll be sure to have everything working in the speediest way with lazy_tables. @richard: if you put a requires in the controller, the second that line is executed, the table is unlazyed. The whole point

Re: [web2py] Application Arquitecture advices

2015-04-15 Thread Niphlod
this is the uttmost unproper and biased statement I've seen in a while. Angular doesn't make your app fast by default, and neither snappier, and neither more resource-friendly on the server. If you're good with Angular you're just pushing your logic client-side, and avoiding page reloads. This

[web2py] Re: Does Lazy Tables setting only have relevance if migration = True?

2015-04-15 Thread Niphlod
the code to post to be helped is the INNER exception, not the OUTER one. What's on line 69 of plugin_ckeditor ? On Wednesday, April 15, 2015 at 11:37:35 PM UTC+2, Alex Glaros wrote: When setting lazy_tables = True I get this error 'NoneType' object has no attribute 'upload' Traceback

[web2py] Re: AWS S3 SSLv3 Deprecation

2015-04-15 Thread Niphlod
the problem would arise only if you connect to S3 to fetch whatever is stored there AND you use a library that allows ONLY SSLv3. Since most of python modules manage other https algorithms without issues AND you're using S3 just as a repo to serve basically static assets, there's no issue:

Re: [web2py] Thumbnails

2015-04-14 Thread Niphlod
2 years later ?! for starters, PLEASE don't concatenate paths as strings and use a proper os.path.join call On Tuesday, April 14, 2015 at 4:53:14 PM UTC+2, Gael Princivalle wrote: Hi. If I click on the file link I obtain:

[web2py] Re: Advanced mechanics : Lazy tables VS response.models_to_run

2015-04-14 Thread Niphlod
On Tuesday, April 14, 2015 at 10:51:31 PM UTC+2, Louis Amon wrote: I'm trying to optimize the load-speed of my app, and I'm considering using conditional models. I've also been using lazy_tables for a while now and I can attest for the speed boost, but I don't really understand how and

[web2py] Re: Issue with lookup foreign key / format statement in 2.10.3

2015-04-14 Thread Niphlod
being a bug, we need to ship a new web2py. it got fixed already. we're waiting for Massimo to release a 2.10.4. On Tuesday, April 14, 2015 at 10:51:31 PM UTC+2, wish...@gmail.com wrote: I just discovered, there's already a issue posted..

[web2py] Re: Issue with lookup foreign key / format statement in 2.10.3

2015-04-13 Thread Niphlod
yes, it's a bug. there's no reference anymore to the format.opened on web2py/pydal On Monday, April 13, 2015 at 7:34:58 AM UTC+2, wish...@gmail.com wrote: Hey guys! Did 2.10.3-stable+timestamp.2015.04.02.21.42.07 change something in the way* format statements *%(fields)s are

[web2py] Re: SQLFORM displaying fields that are readable/writeable = false

2015-04-13 Thread Niphlod
what version of web2py are you using ? On Saturday, April 11, 2015 at 6:00:33 AM UTC+2, Thomas Sitter wrote: Hello, I have the following in my db.py file: db.define_table('customer', Field('firstname'), Field('lastname'), Field('account', unique=True, length=12), Field('email',

[web2py] Re: Using Travis CI to test a web2py app on Github

2015-04-13 Thread Niphlod
take from the lack of response that if it doesn't run on your machine, it's not going to run on travis-ci For starters, it seems that gluon is not importable how do you fetch web2py's libraries and put them into the path ? -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] Re: Triggering a one-time migration when schema changes

2015-04-13 Thread Niphlod
- Hash: SHA1 El 09/04/15 a las 10:21, Niphlod escribió: another caveat circumvented, another step in the good direction now the problem is only IF you have conditional models. I tried this and it triggered the migration on a conditional model: python web2py.py -S welcome/appadmin

[web2py] Re: Need help with web2pyslices plugin administration

2015-04-13 Thread Niphlod
, Mirek Zvolský wrote: So (Niphlod? or other core developer?), how we can solve this? 1) Can we change web2pyslices sources to get access to update uploaded data for the original authors, or 2) should we make new simple application on pythonanywhere with grid of plugins and update link

[web2py] Re: pygraphviz library not found (site5 webhosting)

2015-04-13 Thread Niphlod
code in appadmin is pretty straightforward. If you have pygraphviz importable it worksif not, it displays the message pygraphviz library not found. On Monday, April 13, 2015 at 10:43:36 PM UTC+2, Ron Chatterjee wrote: I have the same problem. I am using source. Is that the issue? On

[web2py] Re: web2py 2.10.3 si OUT

2015-04-09 Thread Niphlod
did you take AT LEAST time to inspect why it's failing ? On Thursday, April 9, 2015 at 6:37:19 AM UTC+2, 黄祥 wrote: functional test is not work in newest version, in old version work. *error* C:\web2py\applications\test\modulespython funcional_test.py No handlers could be found for logger

Re: [web2py] Re: Triggering a one-time migration when schema changes

2015-04-09 Thread Niphlod
another caveat circumvented, another step in the good direction now the problem is only IF you have conditional models. On Thursday, April 9, 2015 at 10:01:17 AM UTC+2, Pablo Angulo wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 El 08/04/15 a las 20:58, Niphlod escribió

Re: [web2py] Need help with web2pyslices plugin administration

2015-04-09 Thread Niphlod
uhm. usually I just: - login to web2pyslices - click on wrote n slices button (redirects to something like http://www.web2pyslices.com/slice/list?author=*some_integer*) - click on my slice title (redirects to something like http://www.web2pyslices.com/slice/show/*an_integer/title_slug*) - click

[web2py] Re: web2py 2.10.3 si OUT

2015-04-09 Thread Niphlod
Why do you even care copy/pasting around snippets? you're registering *ho...* instead of a valid email address! READ the code, UNDERSTAND what the test does, and act accordingly, BEFORE calling it a bug. On Thursday, April 9, 2015 at 8:25:36 AM UTC+2, 黄祥 wrote: 1. create new test app 2.

Re: [web2py] Re: Triggering a one-time migration when schema changes

2015-04-08 Thread Niphlod
or do anything you like... then in db.py import sys if '--do-migrate' in sys.args: do_migrate = True else: do_migrate = False db = DAL(, migrate=do_migrate,...) 2015-04-08 0:03 GMT+02:00 pa...@cancamusa.net javascript:: El martes, 7 de abril de 2015, 17:53:14 (UTC+2), Niphlod

[web2py] Re: Best way to display table columns in correct order using a Handsontable

2015-04-08 Thread Niphlod
todos.json() returns a list of dictionaries, each one being a row. in js terms, it's an array of objects. skimming through handsontable docs http://handsontable.com/demo/datasources.html, you can use an array of objects to populate the table, but if you want your own headers (and possibly in

Re: [web2py] AppConfig and Storage

2015-04-07 Thread Niphlod
Sorry for late intromission. Is all of this documented in the book? If I got right, this can change the programer’s expectation about when the system parameters will be refreshed. that's why the scaffolding has reload=True, with a comment to remove that parameter once in production.

[web2py] Re: Triggering a one-time migration when schema changes

2015-04-07 Thread Niphlod
don't ever set migrate=True if not on the development server. When you need it, set migrate=True, hit appadmin one time to let the migration happen, then set it to False. No need to waste CPU or I/O if you're in complete control of when migrations need to happen. -- Resources: -

[web2py] Re: how to display foreign language symbols

2015-04-06 Thread Niphlod
when you do for line in open('afile.txt'): do_something_on_line you are using a generator that is memory-friendly. readlines() creates a whole list of lines beforehand, so it uses more memory. On Saturday, April 4, 2015 at 10:09:50 PM UTC+2, Alex Glaros wrote: your new example worked,

[web2py] Re: AppConfig and Storage

2015-04-06 Thread Niphlod
Once again: it's just an ini parser that works as a singleton when you don't pass reload: it's not black magic.. but it's not made to hold every bit of python syntax (if you want it, you don't need appconfig, just use models and modules.) You calling it not stable is just calling

[web2py] Re: AppConfig and Storage

2015-04-04 Thread Niphlod
if you look at the source code, you'll see that it's just an ini parser by default. All that it does is speedup the settings part without users knowing anything about python (think when you finish an app and you deploy it on a system you may not have access to, or if you ship an app to your

[web2py] Re: how to display foreign language symbols

2015-04-04 Thread Niphlod
tabbed_file is holding the entire content! if you want to use for line in file syntax, don't read() beforehand all the contents... filename = os.path.join() thefile = open(filename) for line in thefile: splitted = line.split('\t') .. On Friday, April 3, 2015 at 7:08:05 PM UTC+2,

[web2py] Re: sorting ip address

2015-04-03 Thread Niphlod
IP addresses to decimal representation, then sort them. import socket, struct def ip2long_1(ip): return struct.unpack(!L, socket.inet_aton(ip))[0] On Tuesday, March 31, 2015 at 3:52:51 PM UTC-7, Niphlod wrote: nope, wrong... sorry, I reaally need some bed time ^_^ You

[web2py] Re: AppConfig and Storage

2015-04-03 Thread Niphlod
it's faster and reads config files automatically. and you don't need to redefine a storage at every request. On Friday, April 3, 2015 at 1:43:50 PM UTC+2, 黄祥 wrote: hi, i notice that the new 2.10.3 have an AppConfig what is the difference with Storage? At the earlier i usually use

[web2py] Re: how to display foreign language symbols

2015-04-02 Thread Niphlod
why do you need appadmin ? it doesn't import any csv you have lying around.. code a loop over your nicely tab separated lines that inserts into your table. On Thursday, April 2, 2015 at 9:03:07 PM UTC+2, Alex Glaros wrote: am trying to import geonames.org cites/countries files, which are

[web2py] Re: how to display foreign language symbols

2015-04-02 Thread Niphlod
I'm not going to give you the complete solution... a) use https://docs.python.org/2/library/codecs.html to open the file b) use os.path.join to concatenate pieces of paths to build the file location c) assuming splitted = line.split('\t') you're going to get a list of values for every row.

[web2py] Re: how to display foreign language symbols

2015-04-02 Thread Niphlod
is a tool really needed ? for line in file: values = line.split('\t') . On Thursday, April 2, 2015 at 12:33:54 AM UTC+2, Alex Glaros wrote: Niphlod, I don't know how to apply that information to this web2py upload project. avoiding Excel, I edited with vi editor (replaced

[web2py] Re: manually update password

2015-04-02 Thread Niphlod
, José Eloy wrote: Hello Niphlod. *B*ecause I've modified the presentation of the form (I use check boxes to represent multiselect box) and save another variables that they aren't part of the form*.* All I need is to know how to recover the password value and save if this changed

[web2py] Re: how to display foreign language symbols

2015-04-02 Thread Niphlod
nope. if you need to parse a tab separated file, why on earth would you want to convert it to a csv ? On Thursday, April 2, 2015 at 6:31:45 PM UTC+2, Alex Glaros wrote: this looks like something that would be very valuable to me but I don't know what it is. Can you please explain

[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain

2015-04-01 Thread Niphlod
the file served wrong come from cloudflare though 1. cache-control: public, max-age=3600 2. cf-cache-status: MISS 3. cf-ray: 1d0249f0f33c0e24-MXP 4. content-type: http_x_forwarded_proto 5. date: Wed, 01 Apr 2015 06:38:02 GMT 6. expires: Wed, 01 Apr 2015

Re: [web2py] Re: 2.10.1 / Windows errors / cache

2015-04-01 Thread Niphlod
Straight from Peter Pan “Everytime a user says 'I can't clean the cache,' there's a a little developer somewhere that falls down dead muahhaha. We'd need a regression test for it. On Wednesday, April 1, 2015 at 7:01:20 AM UTC+2, Kiran Subbaraman wrote: Just cloned the repo, and noticed

[web2py] Re: websocket messaging VS scheduler

2015-04-01 Thread Niphlod
start processes separately: you can't launch daemon processe within a web2py action, for pete's sake :P web2py.py -a yourpassword #--the webserver web2py.py -K yourappname#-- the scheduler gluon/contrib/websocket_messaging.py -k yourkey -p #-- message dispatcher On Wednesday, April 1,

[web2py] Re: idea: new helpers

2015-04-01 Thread Niphlod
hell no! On Wednesday, April 1, 2015 at 7:51:26 AM UTC+2, Dmitry Ermolaev wrote: DIV( _class='row my_class') = ROW(_class='my_class') DIV( _class='col-sm-4 my_class') = COL4(_class='my_class') -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain

2015-04-01 Thread Niphlod
the same Net tab and view you describe, so I can't find that X-Powered-By line. On Tuesday, March 31, 2015 at 2:09:53 PM UTC-7, Niphlod wrote: You need to activate the Net tab ... you're probably inspecting a 304 response, which doesn't carry the header: hit ctrl+f5 to erase the cache

[web2py] Re: rewrite url

2015-04-01 Thread Niphlod
using routes.py, something like routes_in = ( ('/web2py/$anything', '/$anything'), ) routes_out = [(x, y) for (y, x) in routes_in] should suffice I prefer being more conservative and allow only proper app names given you'd like to publish the app named myapp, it would be routes_in

[web2py] Re: web2py 2.10.1 is OUT

2015-04-01 Thread Niphlod
beware of the dog: since now pydal is a subrepo, releases on github don't carry the subrepo in it. On Wednesday, April 1, 2015 at 4:07:17 PM UTC+2, rif wrote: I can't reproduce the issue using zipped releases from github. miercuri, 1 aprilie 2015, 17:00:59 UTC+3, rif a scris: The releases

[web2py] Re: how to display foreign language symbols

2015-04-01 Thread Niphlod
they handle foreign files with https://docs.python.org/2/library/codecs.html as it's supposed to be ^_^ On Wednesday, April 1, 2015 at 11:08:42 PM UTC+2, Alex Glaros wrote: wait I closed and opened Excel and question marks are there. Probably not web2py's fault then. So updated

[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain

2015-04-01 Thread Niphlod
On Wednesday, April 1, 2015 at 9:58:21 PM UTC+2, weheh wrote: I'm not sure if this is a problem or not? let's just say it's not a config I'd deploy in production. The whole point of static files is that you don't need any python to ship them, and given you have apache.. using web2py to

[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain

2015-03-31 Thread Niphlod
aside from the fact that that config is uber-simple and not what web2py ships usually. who is serving css's ? apache or web2py ? On Tuesday, March 31, 2015 at 7:05:25 AM UTC+2, weheh wrote: Thanks, Brian. My page does have a lot of ajax calls. The problem seems to be that some of my css

[web2py] Re: manually update password

2015-03-31 Thread Niphlod
why all this fuss ? let the form handle it instead of your code. On Tuesday, March 31, 2015 at 3:07:57 AM UTC+2, José Eloy wrote: Sorry for the delay in answering. I have the following code for modify the auth_user table: administrador = db2.auth_user(request.args(0)) or

[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain

2015-03-31 Thread Niphlod
=utf-8DateTue, 31 Mar 2015 21:06:50 GMTLast-ModifiedMon, 16 Mar 2015 07:42:10 GMTPragmacacheServerRocket 1.2.6 Python/2.7.8X-Powered-Byweb2py On Tuesday, March 31, 2015 at 10:54:09 PM UTC+2, Dave S wrote: On Tuesday, March 31, 2015 at 1:34:28 PM UTC-7, Niphlod wrote: web2py appends a X

[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain

2015-03-31 Thread Niphlod
web2py appends a X-Powered-By : web2py header. On Tuesday, March 31, 2015 at 10:27:25 PM UTC+2, weheh wrote: How do I figure out whether web2py is serving the css files? On Tuesday, March 31, 2015 at 12:39:00 AM UTC-7, Niphlod wrote: aside from the fact that that config is uber-simple

[web2py] Re: SQLite: select within transaction

2015-03-31 Thread Niphlod
you're basically asking for a select ... for update, that isn't supported on many backends. Asking for it in SQLite means locking THE ENTIRE table . usually you'd mimick what you want (without hurting performances so much) with an additional field. db(db.table.id == x).update(hidden=True)

[web2py] Re: sorting ip address

2015-03-31 Thread Niphlod
use the power, luke! aside from various networking libraries out there, the problem is rather simple what you're getting back is the alphabetical order . what you need instead is to sort every triplet as an integer. In reality, python strings for ip addresses are good enough, if taken

[web2py] Re: Change the default application to run

2015-03-31 Thread Niphlod
have a look at http://web2py.com/books/default/chapter/29/04/the-core#URL-rewrite On Wednesday, April 1, 2015 at 12:27:11 AM UTC+2, wei zhu wrote: Hello Team I found the application welcome was set to the default application to run when you just type your_name.pythonanywhere.com. Is there

[web2py] Re: sorting ip address

2015-03-31 Thread Niphlod
nope, wrong... sorry, I reaally need some bed time ^_^ You NEED to convert triplets to integers before sorting. no worries though... what_you_want = sorted(myips, key=lambda x:tuple(map(int, x.split('.' is the correct one. -- Resources: - http://web2py.com -

Re: [web2py] cost of importing into models vs define functions

2015-03-30 Thread Niphlod
On Monday, March 30, 2015 at 1:53:27 AM UTC+2, Jose wrote: Hi [*1*] models/ model1.py model2.py model3.py model4.py vs [*2*] modules/ model1.py model2.py model3.py model4.py models/ model0.py (import model1, model2, model3, model4) You

[web2py] Re: mod_wsgi errors -- dead in the water

2015-03-30 Thread Niphlod
what config are you using ? failed to write data is usually meaning that the client terminated the socket before apache being able to stream the response back to it. kinda of close the browser in the middle of a download. On Tuesday, March 31, 2015 at 12:33:14 AM UTC+2, weheh wrote: On a

[web2py] Re: Write dynamic query in DAL without extra nested parentheses

2015-03-29 Thread Niphlod
btw: sqlite has a pretty deep default value that should handle 1000 of those or. but or the sake of your app is it reaally necessary to fetch records in a single query asking for 1000 specific values ? On Saturday, March 28, 2015 at 6:37:03 PM UTC+1, Anthony wrote: In this particular

Re: [web2py] cost of importing into models vs define functions

2015-03-27 Thread Niphlod
uhmyou lost me at move some function declared kind of globally into models if importing there functions in models global kind let's just stick to basics: models are executed at every request. Modules are imported at the first occasion and never again. On

[web2py] Re: ProgrammingError violates unique constraint when inserting into a postgresql table

2015-03-26 Thread Niphlod
the composite pkey isn't in the model either: there was no way for us to identify that :P On Thursday, March 26, 2015 at 8:28:37 PM UTC+1, Ian W. Scott wrote: Found the problem. There were two rows with the same combination of 'name' and 'tag' values. That didn't violate any constraints on

Re: [web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-26 Thread Niphlod
tl;dr: don't ever put here what are the sites you manage, you may get someone like me on the other end and he'd not be pleased :-P I must say I didn't fully understand that. Do you mean I shouldn't put here the domains I manage? Or do you mean that I should tell what are the sites

[web2py] Re: try exception update does not work

2015-03-26 Thread Niphlod
web2py commits by default at the end of a successful request, and rollbacks in case of any exception is raised. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report

Re: [web2py] uwsgi question

2015-03-25 Thread Niphlod
On Wednesday, March 25, 2015 at 6:54:31 PM UTC+1, Ron Chatterjee wrote: Try to commit the database in shell. That should take the lock off. On Wednesday, March 25, 2015 at 5:02:40 AM UTC-4, Roberto De Ioris wrote: Hello Peter. I've got also a problem with scheduler/sqlite,

[web2py] Re: ProgrammingError violates unique constraint when inserting into a postgresql table

2015-03-25 Thread Niphlod
apart from the repetitive table definition (why reinstating IS_IN_DB when you can do it simply using 'reference table' instead of db.table ?) did you try creating the same table from scratch ? i.e. a tag_records2 table, which you can try your things on. It seems that there is a unique

[web2py] Re: scheduler_run records desapeared

2015-03-24 Thread Niphlod
def myfunc(): do_something doesn't return anything def myfunc(): do_something return 1 returns something On Tuesday, March 24, 2015 at 2:44:26 PM UTC+1, Manuele wrote: Il 24/03/15 12:12, Manuele Pesenti ha scritto: How is it possible? bingo! Beware that if the task

[web2py] Re: Page hangs when calling subprocess.check_call from within web2py

2015-03-24 Thread Niphlod
On Tuesday, March 24, 2015 at 9:34:41 PM UTC+1, Toby wrote: On Tuesday, March 24, 2015 at 8:07:45 PM UTC, Niphlod wrote: seems the right job for the scheduler :-P Yeah, maybe you're right. Basically my program generates a large image for a user which takes about 1 min. I want

[web2py] Re: Page hangs when calling subprocess.check_call from within web2py

2015-03-24 Thread Niphlod
seems the right job for the scheduler :-P On Tuesday, March 24, 2015 at 6:10:15 PM UTC+1, Toby wrote: Good idea to look through uwsgi.log. The problem was harakiri on a process after 60 seconds. There was an entry in the log along the lines of HARAKIRI ON WORKER 4 (pid: 2557, try: 1). To

[web2py] Re: pyquery, pyjs and web2py

2015-03-24 Thread Niphlod
every bit of code you need to run on the client side should be in javascript. you can code everything else in python. BTW: that's really not the direction web development is taking though :-P On Tuesday, March 24, 2015 at 2:32:25 AM UTC+1, Ron Chatterjee wrote: I don;t know much javascript

[web2py] Re: Catch errors in scheduler task

2015-03-23 Thread Niphlod
and the traceback is stored on the scheduler_run table. What do you need exactly ? On Monday, March 23, 2015 at 12:08:46 PM UTC+1, flagist0 wrote: Hello! Is there any way to catch errors produced by scheduler task (create an error ticket, send mail etc)? Currently nothing happens if some

[web2py] Re: Catch errors in scheduler task

2015-03-23 Thread Niphlod
nope, but it would easy to have such system... a) you have a function def myfunc(): blablabla return 1 you wrap it on a try:except and send a notification def myfunc(): try: blablablabla return 1 except: mail.send(...) b) you code a watcher task

[web2py] Re: sessions in redis logout error

2015-03-21 Thread Niphlod
it's a bug. could you please file it on github issues so it gets tracked ? On Saturday, March 21, 2015 at 4:56:42 PM UTC+1, Rod Watkins wrote: Hi all, Has anyone run into this problem? If you use Redis to store sessions, when logging out, the following error is thrown. I'm looking into i8t

[web2py] Re: several vars in page

2015-03-21 Thread Niphlod
the same way you want a new_dict to store anything inside an existing_dict, and then some other values. What you're trying to do existing_dict = {'a' : 1, 'b' : 2} wrong_way_dict = dict(c=4, existing_dict) File stdin, line 1 SyntaxError: non-keyword arg after keyword arg existing_dict

<    6   7   8   9   10   11   12   13   14   15   >