[web2py] Re: PythonAnywhere.com

2012-04-22 Thread Osama Khan
Its a great platform to work on prototypes and supports MySQL as well. Has great customer service! I myself deployed some appliances on http://osamakhn.pythonanywhere.com Infact, with web2py admin I don't need to worry about the computer I am on as it works as my development platform. I just log

Re: [web2py] Re: bootstrap in trunk

2012-04-22 Thread Johann Spies
On 21 April 2012 18:03, Massimo Di Pierro I cannot reproduce this error. It could be a commit error. I am > re-committing. > After this morning's 'hg update' the problem seems to be solved. Thanks. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-22 Thread Tim Michelsen
+1 for a Stack Overflow Channel! But you gannot read this via Gmane. What is wrong with Google groups via Gmane? This could even be combined with a Nabble forum.

[web2py] Re: CMS question

2012-04-22 Thread Ramkrishan Bhatt
3) using fully editable html with no limitation on themes (any existing page would be a theme without need for tweaking) yet one would not be able to swap a theme on a page without loss of content, any more you can swap the theme on a msworld document. Option3 is better and most in demand now

Re: [web2py] ul, setting the active li

2012-04-22 Thread Annet
Hi Khalil, Thanks for your reply. Use jquery's .on('click', function() { } ) to do two things : one , add a > class called for example 'inactive' to all li elements and second add a > class cslled for example 'active' to the one that clicked. > I gave this a try and then found that bootstrap

Re: [web2py] How to put random attributes in A()?

2012-04-22 Thread Jonathan Lundell
On Apr 22, 2012, at 9:30 PM, Anthony wrote: > This keeps coming up. Note, it's actually in the book: > http://web2py.com/books/default/chapter/29/5#HTML-helpers > > Notice that helper attributes are passed as keyword arguments to the helper. > In some cases, however, attribute names include spec

Re: [web2py] How to put random attributes in A()?

2012-04-22 Thread Anthony
This keeps coming up. Note, it's actually in the book: http://web2py.com/books/default/chapter/29/5#HTML-helpers Notice that helper attributes are passed as keyword arguments to the helper. In some cases, however, attribute names include special characters that are not allowed in Python identif

[web2py] Re: Menu Items

2012-04-22 Thread Vineet
I am using a menu based on pure css. Replaced the superfish menu completely. If you are interested, I can share the code. -- Vineet On Monday, April 23, 2012 12:07:55 AM UTC+5:30, Vibhor Purandare wrote: > >I want attractive menu like HTML 5 How would i get > that in web2py?

[web2py] PythonAnywhere.com

2012-04-22 Thread John-Kim Murphy
PythonAnywhere.com is a new Python Platform-as-a-Service. Looks pretty cool, and Web2Py version 1.98.2 is supported out of the box! Maybe this is where I will host the latest web app ideas I've had. John

Re: [web2py] How to put random attributes in A()?

2012-04-22 Thread Jonathan Lundell
On Apr 22, 2012, at 9:09 PM, pbreit wrote: > How can I make this tag with A()? > > Launch Modal I'd try something like A('Launch Modal', **{ '_class' : 'btn', '_data-toggle' : 'modal', '_href' : '#myModal'})

[web2py] How to put random attributes in A()?

2012-04-22 Thread pbreit
How can I make this tag with A()? Launch Modal

[web2py] Re: Please help - I am struggling to get an app onto my production server

2012-04-22 Thread pbreit
Did you try one of the scripts: http://code.google.com/p/web2py/source/browse/scripts/setup-web2py-ubuntu.sh http://code.google.com/p/web2py/source/browse/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh

[web2py] trouble with background queue

2012-04-22 Thread weheh
I'm running a background queue that does this: # this is myapp/private/input_queue.py # -*- coding: utf-8 -*- import time while True: process_input_queue() time.sleep(10) # model def process_input_queue(): """processes input_queue and deletes entry when done""" for qin in db().

Re: [web2py] CMS question

2012-04-22 Thread Massimo Di Pierro
LOL. Yes I am but I am not sure what I am doing is what people want. There are many tradeoffs. I spent a week putting together jquery jeditable and other plugins and never worked as I wanted. Then I found out there is an html property called "editableContent"... I am proud of this discovery and

[web2py] Re: pure css skins?

2012-04-22 Thread Anthony
> > I see themforest has a large collection of templates but I do not see > anywhere what I am asking. > Do all templates use the same identical index.html and differ only for > css? Or do different templates have different html? > No, Themeforest is not what you're looking for -- it's just a m

Re: [web2py] CMS question

2012-04-22 Thread Jonathan Lundell
On Apr 22, 2012, at 3:58 PM, Massimo Di Pierro wrote: > I have been working on this: https://github.com/mdipierro/editablebody > > Here is how it works: > > 1) Visit a web page that you like with the browser then save it locally > (including static files) > 2) Edit the file and in the header i

[web2py] Re: pure css skins?

2012-04-22 Thread Massimo Di Pierro
I see themforest has a large collection of templates but I do not see anywhere what I am asking. Do all templates use the same identical index.html and differ only for css? Or do different templates have different html? massimo On Thursday, 19 April 2012 08:30:11 UTC-5, simon wrote: > > Themefo

[web2py] Re: problem viewing errors via admin app because of EOFError exceptions when loading the error pickle

2012-04-22 Thread Massimo Di Pierro
Fixed in trunk. On Thursday, 19 April 2012 15:32:03 UTC-5, Frederick Yankowski wrote: > > When attempting to view an app's errors via the admin app I often get an > "Internal error" page instead. Looking in applications/admin/errors/ I see > that it encountered an EOFError when trying to load t

[web2py] Re: filename in dal

2012-04-22 Thread Massimo Di Pierro
No problem. We are here to help. :-) On Sunday, 22 April 2012 18:23:38 UTC-5, CtrlSoft wrote: > > oh, thanks, next time i will check the book before ask here : >> >>

[web2py] Re: Programmatically log in

2012-04-22 Thread Anthony
> > That works! CRYPT() validator is temporarily removed from and added back > to the list of > db.auth_user.password.requires > inside the same function. Thanks! > You don't have to bother adding the validators back unless the password field will be validated at a later point within the same

Re: [web2py] Re: python question: how to reuse this code

2012-04-22 Thread Anthony
> > Thanks Anthony... nice shortcut... > > and, any way to pass also the column as parameter ? (I don't need it right > now... just wondering) > Sure: def provider(table, field, id=request.args(0)): return dict(provider=db(db[table][field] == id).select().first()) Anthony

[web2py] Re: Programmatically log in

2012-04-22 Thread cyan
That works! CRYPT() validator is temporarily removed from and added back to the list of db.auth_user.password.requires inside the same function. Thanks!

[web2py] Re: how does Web2py resolve this variable in the link string

2012-04-22 Thread Anthony
Yes, it's just standard Python string formatting. In Python: 'here is %(key)s' % dict(key='my key') yields 'here is my key'. Nothing miraculous, or specific to web2py. Anthony On Sunday, April 22, 2012 7:28:56 PM UTC-4, mrtn wrote: > > > Some digging in the Web2py source code reveals that the v

[web2py] preferences for internationalization of the db content and URL structure

2012-04-22 Thread yus
Hi all, I just joined this group. I am new to web2py. I need to create a site with several languages. I will use the T feature for menu items and the like, and the db content will be translated as well. So I have several questions: 1) Is there a DEFAULT / PREFERABLE / STANDARD / SUGGES

[web2py] preferences for internationalization of the db content and URL structure with web2py

2012-04-22 Thread yus
Hi all, I just joined this group. I am new to web2py. I need to create a site with several languages. I will use the T feature for menu items and the like, and the db content will be translated as well. I have several questions: 1) Is there a DEFAULT / PREFERABLE / STANDARD / SUGGESTED / BE

[web2py] Re: how does Web2py resolve this variable in the link string

2012-04-22 Thread mrtn
Some digging in the Web2py source code reveals that the variable merely holds a string which contains a variable 'key' that is set to 'registration_key' field of the auth_user table.

[web2py] Re: filename in dal

2012-04-22 Thread CtrlSoft
> > oh, thanks, next time i will check the book before ask here : > >

[web2py] Re: filename in dal

2012-04-22 Thread Massimo Di Pierro
You can. http://web2py.com/books/default/chapter/29/7?search=filename#Storing-the-original-filename You can also retrieve the original filename directly from the upload field. using (filename, filestream) = db.table.uploadfield.retrieve(row.uploadfield) If the filename was too long it may

[web2py] filename in dal

2012-04-22 Thread CtrlSoft
hi, it's possible in dal to write smth like this: db.define_table("files", Field('file', 'upload', uploadfolder=request.folder+'static/docs'), Field('filename',type='string', default=request.vars.file.filename), ) i tried but got some errors, can anyone help me

[web2py] Re: featured web2py apps

2012-04-22 Thread Alan Etkin
gpo2py - name: gpo2py - author: Alan Etkin - A mail client app that reads mails with the web2py IMAP adapter and a simple user interface (uses the welcome app). Sending email SMTP is not fully implemented yet but will use the builtin web2py capabilities. Released under the terms of the AGPLv3

Re: [web2py] CMS question

2012-04-22 Thread Massimo Di Pierro
I have been working on this: https://github.com/mdipierro/editablebody Here is how it works: 1) Visit a web page that you like with the browser then save it locally (including static files) 2) Edit the file and in the header include < script src="https://raw.github.com/mdipierro/editablebody/

[web2py] Please help - I am struggling to get an app onto my production server

2012-04-22 Thread Simon Shapiro
Hi, I am really struggling with web2py. I love the app on my local machine but to get my application into a production environment has cost me 2.5 weeks already!!! And I feel totally lost for ideas on how to go further. I have a virtual server running on AWS. For the apache config, I follo

Re: [web2py] CMS question

2012-04-22 Thread Ivica Kralj
I've been using Modx (Evolution and Revolution) for some time and I must say I prefer MODX's templating system (I never went back to wordpress or other CMSs unless I really had to - clients requests). Massimo, I think your technical and practical side might be happy with this method as it is using

[web2py] Re: CMS question

2012-04-22 Thread Gour
On Sun, 22 Apr 2012 09:24:50 -0700 (PDT) Massimo Di Pierro wrote: > Let's say we want to build a new kick-ass CMS. That's great to hear. ;) > Most CMS's (like concrete CMS) solve the problem by a compromise. You > can only edit specific parts of a page (and they must be clearly tag > in the HT

Re: [web2py] Re: python question: how to reuse this code

2012-04-22 Thread Sebastian E. Ovide
Thanks Anthony... nice shortcut... and, any way to pass also the column as parameter ? (I don't need it right now... just wondering) On Sun, Apr 22, 2012 at 3:50 PM, Anthony wrote: > How general does it need to be? Are you always checking a field named > "uuid" (but potentially in different

Re: [web2py] Menu Items

2012-04-22 Thread Bruce Wade
This is javascript and css related. With them two technologies you can get any type of attractive menu you like :D On Sun, Apr 22, 2012 at 11:37 AM, Vibhor Purandare < vibhor.purand...@zero-group.com> wrote: >I want attractive menu like HTML 5 How would i get > that in web2py

Re: [web2py] Re: post attack

2012-04-22 Thread Bruce Wade
Ok thanks I will try that to see if it prevents the attack. On Sun, Apr 22, 2012 at 12:12 PM, Roberto De Ioris wrote: > > > Thanks, I know how to use the apache and nginx one but how to I set > > limit-post in uwsgi? > > > --limit-post 4096 > > to accept a maximum of 4k body > > > > > > On Sun,

Re: [web2py] Re: Limit SQLFORM.grid results

2012-04-22 Thread Bruce Wade
Yeah I will add an index I have another table with the same problem so I think you might be right on the counting taking the most amount of time. Is there anyway to index on count? The other table: db.cash_journal.distributor_id.readable = db.cash_journal.transaction_id.readable = db.cash_journal.

Re: [web2py] Re: post attack

2012-04-22 Thread Roberto De Ioris
> Thanks, I know how to use the apache and nginx one but how to I set > limit-post in uwsgi? --limit-post 4096 to accept a maximum of 4k body > > On Sun, Apr 22, 2012 at 11:48 AM, Niphlod wrote: > >> apache has LimitRequestBody directive, nginx has client_max_body_size, >> uwsgi has limit-po

Re: [web2py] Re: post attack

2012-04-22 Thread Bruce Wade
Thanks, I know how to use the apache and nginx one but how to I set limit-post in uwsgi? On Sun, Apr 22, 2012 at 11:48 AM, Niphlod wrote: > apache has LimitRequestBody directive, nginx has client_max_body_size, > uwsgi has limit-post. > > > > > > Il giorno domenica 22 aprile 2012 17:09:17 UTC+2,

[web2py] Re: post attack

2012-04-22 Thread Niphlod
apache has LimitRequestBody directive, nginx has client_max_body_size, uwsgi has limit-post. Il giorno domenica 22 aprile 2012 17:09:17 UTC+2, Bruce Wade ha scritto: > > chunk_size : > 10 > dest : > ', mode 'w+b'> > size : > 179 > src : > > > On Sun, Apr 22, 2012 at 8:03 AM, Bruc

Re: [web2py] Re: Limit SQLFORM.grid results

2012-04-22 Thread simon
Perhaps it is the sorting that is taking the time. Might be worth adding an index on ad_id. On Sunday, 22 April 2012 17:37:14 UTC+1, Bruce Wade wrote: > > The grid is limiting the amount on the page being displayed. however it is > still querying all the records then creating the pages so you c

[web2py] Menu Items

2012-04-22 Thread Vibhor Purandare
I want attractive menu like HTML 5 How would i get that in web2py

Re: [web2py] Re: Limit SQLFORM.grid results

2012-04-22 Thread Martín Mulone
Perhaps the slowdown comes, counting such amount of records. 2012/4/22 Massimo Di Pierro > This is the logic in sqlhtml.py SQLFORM.grid > > if paginate and paginate > limitby = (paginate*page,paginate*(page+1)) > rows = > dbset.select(left=left,orderby=orderb

Re: [web2py] Re: Limit SQLFORM.grid results

2012-04-22 Thread Massimo Di Pierro
This is the logic in sqlhtml.py SQLFORM.grid if paginate and paginate > The grid is limiting the amount on the page being displayed. however it is > still querying all the records then creating the pages so you can page > between them. The query still queries all of the data instead of using

Re: [web2py] CMS question

2012-04-22 Thread Jonathan Lundell
On Apr 22, 2012, at 9:24 AM, Massimo Di Pierro wrote: > Let's say we want to build a new kick-ass CMS. > > My technical side tells me that the best way it to use markup language and > separate data from presentation (which allows swapping of themes). > > My practical side tells is is better to a

[web2py] Re: Validating row

2012-04-22 Thread Anthony
There are no full row validators. It gets tricky because some validators also transform their values, so dependencies among validators could become difficult to resolve. Anyway, if the inserts will be happening via form submissions, you have a couple options. First, you could use an onvalidatio

Re: [web2py] Re: Limit SQLFORM.grid results

2012-04-22 Thread Bruce Wade
The grid is limiting the amount on the page being displayed. however it is still querying all the records then creating the pages so you can page between them. The query still queries all of the data instead of using limits and or ajax. for 50,000 records it takes almost 3-8 seconds to load the pag

[web2py] Re: Programmatically log in

2012-04-22 Thread Anthony
> > so far, I've only found so-called manual authentication in the manual: > > user = auth.login_bare(username, password) > > but I am not so sure if this is what I need for the case above. In > particular, how could I obtain the corresponding password for the user > here? And I suppose it is en

Re: [web2py] Re: Limit SQLFORM.grid results

2012-04-22 Thread Massimo Di Pierro
This is what I do not understand. If the query is done by the grid, it should limit the number of records to the number of records displayed. If that now happening? Are you calling the query outside of the grid? On Sunday, 22 April 2012 11:22:32 UTC-5, Bruce Wade wrote: > > Yes it has built in pa

[web2py] CMS question

2012-04-22 Thread Massimo Di Pierro
Let's say we want to build a new kick-ass CMS. My technical side tells me that the best way it to use markup language and separate data from presentation (which allows swapping of themes). My practical side tells is is better to allow users to edit html. Everytime I has worked with end-users I

Re: [web2py] Re: Limit SQLFORM.grid results

2012-04-22 Thread Bruce Wade
Yes it has built in pagination, however some of my grids will return over 500,000+ records which causes query's to be very very very slow. I would rather limit the returned data because the average person is not going to go through all them records or care about them. For example currently there ha

[web2py] Re: Limit SQLFORM.grid results

2012-04-22 Thread Massimo Di Pierro
grid has built-in pagination. Perhaps I do not understand the question. Can you show us your code? On Sunday, 22 April 2012 10:40:37 UTC-5, Bruce Wade wrote: > > Hi, > > Is there a way to limit the returned results for the grid? I am finding > that my site has so much data already that most area

[web2py] Re: HTML Tamplate conversion into web2py

2012-04-22 Thread Anthony
On Sunday, April 22, 2012 11:07:02 AM UTC-4, Vibhor Purandare wrote: > > I've downloaded a tamplate from web, now i want it to convert into > web2py.But the css is not working... > It's very hard to say without seeing any code. I'd say review the resources I mentioned, make some attempts, and co

[web2py] Limit SQLFORM.grid results

2012-04-22 Thread Bruce Wade
Hi, Is there a way to limit the returned results for the grid? I am finding that my site has so much data already that most areas where I am using grid are failing current transaction is aborted, commands ignored until end of transaction block If there is no way to limit the results is there a s

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-22 Thread Anthony
> > Maybe move away from Google Groups is really a nice ideia... > > Even the App Engine groups did that... > > http://groups.google.com/group/google-appengine/browse_thread/thread/67a5cdffae1c03bc > Looks like they only moved "development questions" to Stack Overflow -- they kept general discu

Re: [web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-22 Thread Bruno Rocha
+1 for a Stack Overflow Channel! On Sun, Apr 22, 2012 at 11:16 AM, Alex Benfica wrote: > Hi! > > Maybe move away from Google Groups is really a nice ideia... > > Even the App Engine groups did that... > > http://groups.google.com/group/google-appengine/browse_thread/thread/67a5cdffae1c03bc > > >

[web2py] Re: post attack

2012-04-22 Thread Bruce Wade
chunk_size: 10 dest: ', mode 'w+b'> size: 179 src: On Sun, Apr 22, 2012 at 8:03 AM, Bruce Wade wrote: > Hi, > > It looks like someone on my site is trying to use a post submission to > take down my server. Unfortunately for them we have multiple servers. > > How can I detect this kind of at

[web2py] Re: HTML Tamplate conversion into web2py

2012-04-22 Thread Vibhor Purandare
I've downloaded a tamplate from web, now i want it to convert into web2py.But the css is not working... On Saturday, April 21, 2012 8:05:19 PM UTC+5:30, Anthony wrote: > > I think you'll have to be more specific -- what are you trying to do? It > might help if you take a look at > http://web2py

[web2py] post attack

2012-04-22 Thread Bruce Wade
Hi, It looks like someone on my site is trying to use a post submission to take down my server. Unfortunately for them we have multiple servers. How can I detect this kind of attack and just ignore it? Some how they are submitting a chunk size of 10 which is killing my I/O on the server. --

[web2py] Re: python question: how to reuse this code

2012-04-22 Thread Anthony
How general does it need to be? Are you always checking a field named "uuid" (but potentially in different tables)? Does the id being checked always come from request.args(0)? Note, request.args(0) simply returns None if there are no request.args, so as long as no records have a uuid == None, y

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-22 Thread Alex Benfica
Hi! Maybe move away from Google Groups is really a nice ideia... Even the App Engine groups did that... http://groups.google.com/group/google-appengine/browse_thread/thread/67a5cdffae1c03bc On Saturday, April 21, 2012 1:24:32 PM UTC-3, JoeCodeswell wrote: > > This new look that Google Gro

Re: [web2py] Re: Continuous Integration

2012-04-22 Thread Sebastian E. Ovide
I am interested too... Is there any reason why not to use the same tools that other python projects are using ? On Sat, Apr 21, 2012 at 5:58 PM, lpg wrote: > HI All I'm doing some research on Continuous Integration for web2py, and > would really like someone to share their experience with this.

[web2py] python question: how to reuse this code

2012-04-22 Thread Sebastian E. Ovide
Hi All, I'm using this function at least twice... and I'll use it again... how can I reuse it in some way ? for example passing the table and arg as function parameters... def provider(): theProvider = None if len((request.args))>=1: providers=db(db.auth_user.uuid==request.args[0]

[web2py] Validating row

2012-04-22 Thread Joseph.Piron
Hi guys, I just wondered how I am supposed to add a row validator in db models ? I looked at the code of validate function but it seems each validator is only passed the value of the field it is bound to. I am looking for this as I have to validate the value of one field based on other fields v

Re: [web2py] ul, setting the active li

2012-04-22 Thread Khalil KHAMLICHI
Use jquery's .on('click', function() { } ) to do two things : one , add a class called for example 'inactive' to all li elements and second add a class cslled for example 'active' to the one that clicked. Ofcource inavtive and active should be in your css file. On Apr 22, 2012 8:28 AM, "Annet" w

Re: [web2py] Re: What would be the best way to generate a summary of the 'count(*) 'of all my database table columns?

2012-04-22 Thread Cédric Mayer
I suppose you have somewhere my_legacy_db = DAL(...) In the "db()" part, you need a query (unless in the select, you have the list of fields (not tables) to retrieve), like: my_legacy_db(my_legacy_db.users.id > 0) or my_legacy_db(my_legacy_db.users.name.contains('foo')) or (selectgin fields) :

[web2py] ul, setting the active li

2012-04-22 Thread Annet
In a view I have the following ul containing the navigation for that view: Home {{if vevent.opening_hours:}} Openingtijden {{pass}} {{if vevent.event_list:}} Event list {{pass}} {{if vevent.timetable:}} Lesrooster {{pass}} {{if vevent.course_table:}} Cursusrooste

[web2py] Re: Bootstrap modal and AJAX

2012-04-22 Thread Annet
Hi Anthony, Thanks for your reply, after spending figuring out why I ended up with an empty backdrop I found that I had to move the JavaScript part from calendar/index.html to calendar/eventlist.html. I have no idea why, eventList.html is loaded into index.html. This is the relevant part in in

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-22 Thread Gour
On Sat, 21 Apr 2012 22:55:57 -0700 (PDT) Massimo Di Pierro wrote: > +1000 Huh...the large sum is now on the stake :-) ...do you plan to simply deploy mailing list (e.g. mailman, hopefully subscribed to gmane), some forum software? Being interested in D, I know that there is forum software writt