[web2py] Re: wysiwyg editor in form does not work with ajax
thanks "searialize" was the keyword that was missing in my queries for an answer here is I guess the missing puzzle peace http://maestric.com/doc/javascript/tinymce_jquery_ajax_form will try it now, I will let you know if a get a wysiwyg markdown editor working :) On Jan 25, 2:17 am, Thadeus Burgess wrote: > i think the problem is these editors actually replace the textarea so > it does not serialize when you are submitting via ajax. > > -Thadeus > > > > On Sun, Jan 24, 2010 at 4:41 PM, selecta wrote: > > not an option i want wysiwyg, it seems to be possible so i want it > > > On Jan 23, 5:59 pm, Thadeus Burgess wrote: > >> Have you ever thought of just using markdown/WIKI syntax and using a > >> markdown editor such as WMD or others like it ? > > >> -Thadeus > > >> On Sat, Jan 23, 2010 at 6:54 AM, selecta wrote: > >> > Hi there, > >> > I tried to usehttp://nicedit.com/andhttp://ckeditor.com/demoinmy > >> > project. Both work well when the form is submitted normally but both > >> > do not work when the form is submitted via ajax (plug-in). On an ajax > >> > submit the form content of the editor is always empty. Can you give me > >> > assistance on how to make it work. > >> > I could create a test project with that if it would help, but maybe > >> > the answer is simpler, I would also use a different wysiwyg edit (as > >> > long as it looks nice and has enough functions) > > >> > so far i found > >> >http://nicedit.com/ > >> >http://ckeditor.com/demo > >> >http://jhtmlarea.codeplex.com/ > >> >http://avidansoft.com/dsrte/index.php > >> >http://www.upian.com/upiansource/ueditor/en > >> > but i don't want to test them all since i expect that all of them will > >> > have the same problem > > >> > Together with the html2makdown python module this would really come in > >> > handy :) > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups "web2py-users" group. > >> > To post to this group, send email to web...@googlegroups.com. > >> > To unsubscribe from this group, send email to > >> > web2py+unsubscr...@googlegroups.com. > >> > For more options, visit this group > >> > athttp://groups.google.com/group/web2py?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "web2py-users" group. > > To post to this group, send email to web...@googlegroups.com. > > To unsubscribe from this group, send email to > > web2py+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: web2py 1.74.8 is OUT
just updated and restarted without reading release notes and i was very happy and surprised to see the remember me option! Awesome, wanted to have that, now I do :) soo cool On Jan 24, 11:53 pm, mdipierro wrote: > #1.74.8 > IS_SLUG, thanks Gustavo and Jonathan > web2py.py -nogui, thanks Jeff Bauer > solved a problem with jython, thanks Tim Farrel > login has "remember be option", thanks Piotr Banasziewicz > fixed problem with keepvalue in update forms, thanks Miguel Lopez > > Please give it a try and, as usual, report any issues. > > Massimo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] New features not documented in Book (2nd ed.)
New features not documented in Book (2nd edition) 1.74.8 1) IS_SLUG() 2) web2py.py -nogui 3) solved a problem with jython 4) login has "remember me option" 5) fixed problem with keepvalues in update forms http://groups.google.com/group/web2py/browse_thread/thread/4075ac6578a5197e# 1.74.7 1) request_password_reset and password reset verification 2) python web2py.py -S app -M -R script.py -A arg1 arg2 arg3 3) support for T("%(a)s") % dict(a="hello") http://groups.google.com/group/web2py/browse_thread/thread/fed8aa7e13d44ab2# 1.74.6 Mostly bug fixes and two main security issues fixed: * deals with misconfiguration of postgresql that may cause SQL Injection vulnerability * blocked accounts were not really blocked http://groups.google.com/group/web2py/browse_thread/thread/5b60ab4685d33b57# 1.74.5 * auth.user_id (shortcut for auth.user.id, defaults to None if not logged in) * support for all native types on GAE (e.g. StringListProperty) * cache.ram usage statistics * no more auth menu in scaffolding * no more splash screen with -Q * export_to_csv_file has represent http://groups.google.com/group/web2py/browse_thread/thread/89a718332e6d7115# 1.74.4 - 1.74.2: bug fix releases LOAD function introduced along the plugin system, this went fairly unnoticed LOAD(a, b, args=args, vars=vars, ajax=ajax, ajax_trap=ajax_trap ) http://www.web2py.com/AlterEgo/default/show/252 1.74.1 * Moved to mercurial * Default validators use the new define_table(,format='...') http://groups.google.com/group/web2py/browse_thread/thread/35298fa6005a3a5b * New get_vars and post_vars compatible in 2.5 and 2.6 * Major rewrite of gql.py extends DAL syntax on GAE, supports belongs http://groups.google.com/group/web2py/browse_thread/thread/6efa5dd4095f91e1 * No more *.w2p, welcome.w2p is created automatically, base apps are always upgraded * decimal validator allows negative numbers * last version with the old DAL, the new DAL is in gluon/dal.py To try out the new experimental DAL copy or rename gluon/dal.py as gluon/sql.py http://groups.google.com/group/web2py/msg/3e40f3d30c3b82f2 1.73.1 * New decimal field type, as discussed in http://groups.google.com/group/web2py/browse_thread/thread/3c1957d8ed743513 * New IS_DECIMAL_IN_RANGE validator * Experimental support for non UTF8 encoding in DB * T.current_languages default to 'en' and new T.set_current_languages * New gluon/contrib/populate.py * Customizable CSV and more... http://groups.google.com/group/web2py/browse_thread/thread/72a7d6d43a8aecb1 1.72.1 * Alias for id field allows to redefine the name of the 'id' field. * make_migrate=True rebuild missing .table files http://groups.google.com/group/web2py/browse_thread/thread/eed21229883b5a1a * keyed tables support for legacy tables (MS SQL, DB2, Ingres & Informix) http://groups.google.com/group/web2py/browse_thread/thread/db150376b06d47fc 1.71.1 * complete rewrite of the Rows object, makes web2py faster and smaller * DALStorage is renamed Row * Now you can call web DAL from any Python program * You can also use the template language from any Python program http://groups.google.com/group/web2py/browse_thread/thread/159b44bfbb634df2 http://groups.google.com/group/web2py/browse_thread/thread/c81061bc00c6181e 1.69.1 * Lots of new DAL APIs including OR, LIKE, BELONGS, and more on GAE * response.meta.keywords, reponse.meta.description, response.meta.author, ... * response.files.append for including JS & CSS files * experimental plugin mechanism http://groups.google.com/group/web2py/browse_thread/thread/fe6381e136995563 http://www.web2py.com/AlterEgo/default/show/248 1.68.1 * New cron * New hindi and spanish translations * cached uploads allow for progress bars * Ingres support * default setting of content-type (this may cause strange behavior in old apps when downloading images) * IS_UPPER and IS_LOWER work with unicode * CLEANUP now takes regex of allowed/now allowed characters * New rewrite.py allows dynamic routes * Better error messages for IS_INT_* and IS_FLOAT_* http://groups.google.com/group/web2py/browse_thread/thread/ba5fa43f53ad38ad Other info -- How to make your own layouts http://groups.google.com/group/web2py/browse_thread/thread/6f321414a058b4b3 http://groups.google.com/group/web2py/browse_thread/thread/5a75171b835f542d http://code.google.com/p/web2py/source/browse/trunk/scripts/layout_make.py Virtual fields http://groups.google.com/group/web2py/browse_thread/thread/c684346f13773f93 http://groups.google.com/group/web2py/browse_thread/thread/d59ee3d6c2e6d836 http://www.vimeo.com/7296755 http://www.web2py.com/AlterEgo/default/show/248 (at the end) -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Custom form doesn't submit
Hi all, I'm trying to build a custom form in this fashion: There's a parent table and a child table (many one relationship). I've created a read-only SQLFORM for a record of the parent, and then I'm trying this: form1 = SQLFORM(db.parent, readonly=True) form2 = SQLFORM(db.child, keepopts=['gender']) form1[0].append(TR(INPUT(_type='text', name='name', requires=IS_NOT_EMPTY()), \ SELECT(form2.custom.inpval.gender, name='gender'),\ INPUT(_type='submit', _value='Add another')) This gives me the appearance of the form as I want, i.e., parent read- only record in a form, with additional single row of updateable child form with "Add another" button. The second form is to provide a drop- down list for 'gender'. However, in this case the "Add another" button doesn't submit, i.e, I can't get control in form1.accepts or form2.accepts. What am I doing wrong? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Custom form doesn't submit
Corrections: form1 = SQLFORM(db.parent, record, readonly=True) On Jan 25, 4:35 pm, Adi wrote: > Hi all, > > I'm trying to build a custom form in this fashion: > > There's a parent table and a child table (many one relationship). I've > created a read-only SQLFORM for a record of the parent, and then I'm > trying this: > > form1 = SQLFORM(db.parent, readonly=True) > > form2 = SQLFORM(db.child, keepopts=['gender']) > > form1[0].append(TR(INPUT(_type='text', name='name', > requires=IS_NOT_EMPTY()), \ > SELECT(form2.custom.inpval.gender, name='gender'),\ > INPUT(_type='submit', _value='Add another')) > > This gives me the appearance of the form as I want, i.e., parent read- > only record in a form, with additional single row of updateable child > form with "Add another" button. The second form is to provide a drop- > down list for 'gender'. However, in this case the "Add another" button > doesn't submit, i.e, I can't get control in form1.accepts or > form2.accepts. > > What am I doing wrong? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] web2py help & resources
Primary source of help: web2py groups - http://groups.google.com/group/web2py/topics http://groups.google.com/group/web2py-developers/topics http://groups.google.com/group/web2py-users-brazil/topics Tips on searching the users group - The search inside the group does not work very well, use these instead: http://groups.google.com/groups/advanced_search?safe=off&q=group:web2py http://dir.gmane.org/gmane.comp.python.web2py Resources - web site http://www.web2py.com docs http://web2py.com/examples/default/docs (check the links) DALhttp://web2py.com/examples/default/dal APIhttp://web2py.com/examples/default/api examples http://www.web2py.com/examples/default/examples auth http://web2py.com/examples/default/tools +CRUD +services Cron http://web2py.com/examples/default/cron ** all links above also work on your local copy of web2py ** FAQhttp://www.web2py.com/AlterEgo Wiki http://wiki.web2py.com Book 2ed http://www.lulu.com/content/4968879 online: http://www.scribd.com/doc/19211452/Web2py-Manual errata: http://wiki.web2py.com/Errata_for_web2py_2nd_Edition_Book (please update errata if you find more) Slices http://www.web2pyslices.com/main/default/index Chat http://web2pychat.com Slides http://www.scribd.com/doc/16085263/web2py-slides-version-1644 http://www.web2py.com/examples/static/pyworks.pdf http://www.web2py.com/examples/static/web2py_presentacion_es.pdf epydocshttp://web2py.com/examples/static/epydoc/index.html cheatsheet http://www.web2py.com/examples/static/web2py_cheatsheet.pdf free apps http://www.web2py.com/appliances Videos http://vimeo.com/videos/search:web2py user made mengu's screencast video: * 135 MB (1280x928): http://omploader.org/vMzBoeg * 57,5 MB (800x580): http://omploader.org/vMzBrZg * 37.5 MB (640x462): http://omploader.org/vMzBpbg application source : http://github.com/mengu/web2py-screencast Downloads - (Win, Mac, source, latest development) http://www.web2py.com/examples/default/download Professional support http://www.web2py.com/examples/default/support Running on GAE notes http://www.futurelogic.com/init/default/wiki/GAEDeploy Who is using it? http://appliedstacks.com/NewestFirst/web2py Pycon 2009 web2py Dojo source code -- http://www.web2py.com/examples/static/dojo.pdf -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: wysiwyg editor in form does not work with ajax
success I used http://www.aaronsw.com/2002/html2text/ and http://code.google.com/p/jwysiwyg/ in the view I write form part: $('#no_table_body').wysiwyg(); this replaces the textarea on every ajax reload of the plugin the the jquery editor display part: {{import gluon.contrib.markdown}} {{=gluon.contrib.markdown.WIKI(row.body)}} like in the wiki example in the cotroller I write on form.acceppt form.vars.body = html2text.html2text(form.vars.body) ta ta WYSIWYG Markdown! On Jan 25, 11:31 am, selecta wrote: > thanks "searialize" was the keyword that was missing in my queries for > an answer > here is I guess the missing puzzle > peacehttp://maestric.com/doc/javascript/tinymce_jquery_ajax_form > will try it now, I will let you know if a get a wysiwyg markdown > editor working :) > > On Jan 25, 2:17 am, Thadeus Burgess wrote: > > > > > i think the problem is these editors actually replace the textarea so > > it does not serialize when you are submitting via ajax. > > > -Thadeus > > > On Sun, Jan 24, 2010 at 4:41 PM, selecta wrote: > > > not an option i want wysiwyg, it seems to be possible so i want it > > > > On Jan 23, 5:59 pm, Thadeus Burgess wrote: > > >> Have you ever thought of just using markdown/WIKI syntax and using a > > >> markdown editor such as WMD or others like it ? > > > >> -Thadeus > > > >> On Sat, Jan 23, 2010 at 6:54 AM, selecta wrote: > > >> > Hi there, > > >> > I tried to usehttp://nicedit.com/andhttp://ckeditor.com/demoinmy > > >> > project. Both work well when the form is submitted normally but both > > >> > do not work when the form is submitted via ajax (plug-in). On an ajax > > >> > submit the form content of the editor is always empty. Can you give me > > >> > assistance on how to make it work. > > >> > I could create a test project with that if it would help, but maybe > > >> > the answer is simpler, I would also use a different wysiwyg edit (as > > >> > long as it looks nice and has enough functions) > > > >> > so far i found > > >> >http://nicedit.com/ > > >> >http://ckeditor.com/demo > > >> >http://jhtmlarea.codeplex.com/ > > >> >http://avidansoft.com/dsrte/index.php > > >> >http://www.upian.com/upiansource/ueditor/en > > >> > but i don't want to test them all since i expect that all of them will > > >> > have the same problem > > > >> > Together with the html2makdown python module this would really come in > > >> > handy :) > > > >> > -- > > >> > You received this message because you are subscribed to the Google > > >> > Groups "web2py-users" group. > > >> > To post to this group, send email to web...@googlegroups.com. > > >> > To unsubscribe from this group, send email to > > >> > web2py+unsubscr...@googlegroups.com. > > >> > For more options, visit this group > > >> > athttp://groups.google.com/group/web2py?hl=en. > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "web2py-users" group. > > > To post to this group, send email to web...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > web2py+unsubscr...@googlegroups.com. > > > For more options, visit this group > > > athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: OperationalError: no such table: auth_user
On Jan 18, 8:38 pm, mdipierro wrote: > SVN is no longer updated. Please try the tarball form web2py.com Sorry I did not make myself clear. I was using web2py from a tarball, but checking my application in/out of SVN. I did figure out the problem -- I had checked some of the databases/*.table files into SVN. Once I had deleted these files from from my application SVN repository, then everything worked as expected. Thanks, Cliff -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: validation problems
We always use the latest version in trunk bash-3.1# hg tip changeset: 122:9d8683b8dc0f tag: tip user:mdipie...@massimo-di-pierros-macbook.local date:Sat Jan 23 18:28:38 2010 -0600 summary: gluon/contrib/urlify.py, thanks Gustavo Di Pietro I reproduces the error using a bet older version changeset: 115:64aae75c9a9c tag: tip user:mdipie...@massimo-di-pierros-macbook.local date:Sat Jan 16 15:06:34 2010 -0600 summary: IS_DATE(TIME)_IN_RANGE, thanks Gergely Kontra but I tried to reproduce it for my self again after dropping my testing db and restarting over I produce the error , then after the following error appears : the error may happen because my db contains arabic characters and the interesting thing is that : the 2 errors are related , meaning that 1st the error : File "/root/workspace/hg/gluon/html.py", line 107, in xmlescape data = str(data) TypeError: __str__ returned non-string (type lazyT) occurs then I got a line pushed into top of my translation file - I use slackware linux 13 and the other machine that I reproduced the error on it with the older version is running ubuntu The case is : I have a form in a page, to put into it a company name if form accepts that name it checks whether user is allowed to edit this company info what caused the error was that I tried to hit Choose button in the form with the companies field being empty form1 = FORM(TABLE(TR(TD(T("company name")), TD(INPUT(_name="companies", _id="no_table_companies", _autocomplete="off"), BR()), INPUT(_type="submit", _value=T ("Choose") in the view : --- {{for key, value in enumerate(domain):}} {{=domain.name}} {{if len(subdomain[key]) != 0:}} {{for subdomain in subdomains[key]:}} {{=subdomain.name}} {{pass}} {{pass}} {{pass}} I can't reproduce it again after dropping my test db, but I'm still testing -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: How to set default value based on query [RESOLVED]
LOL On Jan 24, 11:15 pm, weheh wrote: > Yup, of course, you are right as usual Mr. MDP. Which is why I want to > fatten you up so you'll slow down a little and let ordinary mortals > like me catch up. My mistake was in the IS_IN_DP syntax. I lied in my > earlier note where I said that I did exactly what you wrote. In fact, > I had written almost exactly what I put in my original note to open > this thread. I'm closing this and moving on. THANKS! > > On Jan 24, 11:06 pm, mdipierro wrote: > > > This defines the field as a reference > > > Field('make',db.car_makers) > > > This makes the dropdown > > > db.car.make.requires = IS_IN_DB(db,db.car_makers.id,'%(name)s') > > > This selects the default option on create forms (not on update forms) > > and caches it > > > db.car.make.default = db(db.car_makers.name=='Ford').select > > (db.car_makers.id,cache=(cache.ram,3600)).first().id > > > This MUST work. > > > On Jan 24, 9:17 pm, weheh wrote: > > > > When I go to the URL that displays the form, I see Edsel in the > > > pulldown, not Ford. p.s. I've never used caching. Do you have a quick > > > answer for how to do it? Thx. - RG > > > > On Jan 24, 10:12 pm, mdipierro wrote: > > > > > how doesn't work? > > > > > P.S. you should cache this for speed: > > > > > db.car.make.default = db(db.car_makers.name=='Ford').select > > > > (db.car_makers.id,cache=(cache.ram,3600)).first().id > > > > > On Jan 24, 9:01 pm, weheh wrote: > > > > > > Sorry. I was writing off the top of my head. Of course, I did exactly > > > > > what you wrote in my actual code. Still doesn't work. > > > > > > On Jan 24, 9:53 pm, mdipierro wrote: > > > > > > > I think you want: > > > > > > > Field('make',db.car_makers,IS_IN_DB(db,db.car_makers.id,'%(name)s') > > > > > > > and > > > > > > > db.car.make.default = db(db.car_makers.name=='Ford').select > > > > > > (db.car_makers.id).first().id > > > > > > > On Jan 24, 8:46 pm, weheh wrote: > > > > > > > > I'm certain this has been asked a bunch of times. I've spent the > > > > > > > last > > > > > > > hour looking for it but can't find it anywhere. Sorry. > > > > > > > > The question is how to set the default value of a reference field > > > > > > > based on a query of the referenced table. > > > > > > > > db.define_table('car_makers',Field('name',unique=True)) > > > > > > > db.define_table('car', > > > > > > > > > > > > > > Field('make',db.car_makers,IS_IN_DB(db,'car_makers.name','%(name) > > > > > > > s')), > > > > > > > Field('model')) > > > > > > > > I want to set > > > > > > > db.car.make.default=db(db.car_makers.name=='Ford').select > > > > > > > (db.car_makers.id)[0] > > > > > > > so that when I do an SQLFORM, the drop down list of db.car.make > > > > > > > will > > > > > > > pre-select "Ford". > > > > > > > > This isn't working for me. What am I doing wrong? > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: AJAX with custom widget
There is no special place for this. You can put them in a module and import, in a controller or in a model where you need them. For example: def mywidgetfield, value): return INPUT(_type='text', value=value, _id = '%s_%s' % (field._tablename, field.name), _class = field.type, _name = field.name, requires = field.requires) ...Field('myfield',widget=mywidget)... On Jan 24, 11:21 pm, weheh wrote: > OK, now I'm scared. I don't even know what file the custom widget is > supposed to live in (and I've read the doc, I swear). Do you know of > any good examples I could look at on doing an AJAX call on a drop down > list, where the drop down value is used to pick a value from a table > and then send it back to the view to update a div? > > On Jan 24, 11:03 pm, mdipierro wrote: > > > yes > > > On Jan 24, 9:15 pm, weheh wrote: > > > > I'm combining two tables into one form (yet again). I'm using > > > SQLFORM.factory(db.auth_user,db.table1) to combine the 2 tables into 1 > > > form. All fields have unique names. > > > > I am custom designing the form to make it more compact than the linear > > > approach used by SQLFORM. Therefore, I end up using > > > form.custom.begin ... form.custom.widget.fieldname ... > > > form.custom.end. > > > > One of the widgets is a drop-down list. Based on the value of the drop > > > down, I want to query the db and get a cost information on the fly and > > > update the form with this information. Do I need to write a > > > custom.widget to make this work? How else can I get the AJAX script to > > > talk to the form? > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Custom form doesn't submit
I need to try this. Can you post the entire action and a sample (one field) child and parent tables? On Jan 25, 5:36 am, Adi wrote: > Corrections: form1 = SQLFORM(db.parent, record, readonly=True) > > On Jan 25, 4:35 pm, Adi wrote: > > > Hi all, > > > I'm trying to build a custom form in this fashion: > > > There's a parent table and a child table (many one relationship). I've > > created a read-only SQLFORM for a record of the parent, and then I'm > > trying this: > > > form1 = SQLFORM(db.parent, readonly=True) > > > form2 = SQLFORM(db.child, keepopts=['gender']) > > > form1[0].append(TR(INPUT(_type='text', name='name', > > requires=IS_NOT_EMPTY()), \ > > SELECT(form2.custom.inpval.gender, name='gender'),\ > > INPUT(_type='submit', _value='Add another')) > > > This gives me the appearance of the form as I want, i.e., parent read- > > only record in a form, with additional single row of updateable child > > form with "Add another" button. The second form is to provide a drop- > > down list for 'gender'. However, in this case the "Add another" button > > doesn't submit, i.e, I can't get control in form1.accepts or > > form2.accepts. > > > What am I doing wrong? > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: wysiwyg editor in form does not work with ajax
html2text is interesting... opens many possibilities. On Jan 25, 6:16 am, selecta wrote: > success > > I > usedhttp://www.aaronsw.com/2002/html2text/andhttp://code.google.com/p/jwysiwyg/ > > in the view I write > form part: >
Re: [web2py] Re: Blogitizor Open Sourced
Well I have been looking at a bunch of them, because a CMS can be a blog and a blog is a stripped down CMS. Ive noticed that most CMS systems are actually just pluggable frameworks, in which you install the features you want. Take redmine for example, its a bug tracking software like trac, but implemented in such a way you can install a blog, your own themes, hell I could make it look and act exactly like my current website with the right plugin except for the fact I don't know ruby. HazelCMS is done in a plugin fashion as well, you just install a component and it appears, im sure you could write a version control and have it hook into hazelcms as well. So really Ive wondered do we need a CMS or a blog or a wiki, or do we need a true pluggable system that can become anything with the right mix and match of plugins -Thadeus On Mon, Jan 25, 2010 at 12:05 AM, Richard wrote: > ah I was also attracted to the admin look and feel. > > web2py needs a RadiantC -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Blogitizor Open Sourced
And because of this I have been looking and designing in my head how to make blogitizor not just a blog engine, but a pluggable system. -Thadeus On Mon, Jan 25, 2010 at 8:54 AM, Thadeus Burgess wrote: > Well I have been looking at a bunch of them, because a CMS can be a > blog and a blog is a stripped down CMS. > > Ive noticed that most CMS systems are actually just pluggable > frameworks, in which you install the features you want. > > Take redmine for example, its a bug tracking software like trac, but > implemented in such a way you can install a blog, your own themes, > hell I could make it look and act exactly like my current website with > the right plugin except for the fact I don't know ruby. > > HazelCMS is done in a plugin fashion as well, you just install a > component and it appears, im sure you could write a version control > and have it hook into hazelcms as well. > > So really Ive wondered do we need a CMS or a blog or a wiki, or do we > need a true pluggable system that can become anything with the right > mix and match of plugins > > -Thadeus > > > > > > On Mon, Jan 25, 2010 at 12:05 AM, Richard wrote: >> ah I was also attracted to the admin look and feel. >> >> web2py needs a RadiantC > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: wysiwyg editor in form does not work with ajax
so you convert your markdown back into html to feed to the WYSIWYG editor? -Thadeus On Mon, Jan 25, 2010 at 7:54 AM, mdipierro wrote: > html2text is interesting... opens many possibilities. > > On Jan 25, 6:16 am, selecta wrote: >> success >> >> I >> usedhttp://www.aaronsw.com/2002/html2text/andhttp://code.google.com/p/jwysiwyg/ >> >> in the view I write >> form part: >>
[web2py] Calling a SQLFORM through AJAX
I created a controller function that could be called through ajax and returns a SQLFORM. I've got the form to appear on the page, but the SQLFORM doesn't work as it should. When I submit information from the view that the generated content has been placed into, the page refreshes and nothing is inserted/updated in the database. When I call the controller function directly, it works fine and the submitted data is inserted/updated in the database properly. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Calling a SQLFORM through AJAX
Hard to say without looking at the code. I assume there is an accepts in the controller. Try call it with accepts(request.vars,formname=None) instead of accepts(request.vars,session) On Jan 25, 9:00 am, Khaled ElAdawy wrote: > I created a controller function that could be called through ajax and > returns a SQLFORM. > I've got the form to appear on the page, but the SQLFORM doesn't work > as it should. > When I submit information from the view that the generated content has > been placed into, > the page refreshes and nothing is inserted/updated in the database. > When I call the controller function directly, it works fine and the > submitted > data is inserted/updated in the database properly. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Calling a SQLFORM through AJAX
Is the form submitting to same controller perhaps? Then it would just return another form which is what you are experiencing. On Jan 25, 10:00 am, Khaled ElAdawy wrote: > I created a controller function that could be called through ajax and > returns a SQLFORM. > I've got the form to appear on the page, but the SQLFORM doesn't work > as it should. > When I submit information from the view that the generated content has > been placed into, > the page refreshes and nothing is inserted/updated in the database. > When I call the controller function directly, it works fine and the > submitted > data is inserted/updated in the database properly. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Custom form doesn't submit
On Jan 25, 6:35 am, Adi wrote: > Hi all, > > I'm trying to build a custom form in this fashion: > > There's a parent table and a child table (many one relationship). I've > created a read-only SQLFORM for a record of the parent, and then I'm > trying this: > > form1 = SQLFORM(db.parent, readonly=True) > > form2 = SQLFORM(db.child, keepopts=['gender']) > > form1[0].append(TR(INPUT(_type='text', name='name', > requires=IS_NOT_EMPTY()), \ > SELECT(form2.custom.inpval.gender, name='gender'),\ > INPUT(_type='submit', _value='Add another')) > > This gives me the appearance of the form as I want, i.e., parent read- > only record in a form, with additional single row of updateable child > form with "Add another" button. The second form is to provide a drop- > down list for 'gender'. However, in this case the "Add another" button > doesn't submit, i.e, I can't get control in form1.accepts or > form2.accepts. > > What am I doing wrong? You are appending to form1 so check: 1) An INPUT named 'name', is it the only 'name' field in form1? 2) Same for the SELECT, is there another 'gender' field? 3) A second button named 'Add another' which will submit to the controller that generated form1 (self-submission), is that what you want?. Denes. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Custom form doesn't submit
In db.py: db.define_table('job', Field('filename', 'string', label='File Name', requires = IS_NOT_EMPTY()), Field('total_duration_minutes', 'integer', label ='Total Duration (minutes)', requires = IS_NOT_EMPTY())) db.define_table('worker', Field('filename', 'string', requires = IS_IN_DB(db, 'job.filename'), Field('name','string', requires=IS_NOT_EMPTY( Every job may be assigned to multiple workers (one-many relationship). Controller (default.py) code: def assign(): """ assign a newly created job to workers """ jobform = SQLFORM(db.job, request.args[0], readonly = True) # request.args[0] is the id of the current job # fetch existing workers records = db((db.worker.filename == request.args[1])).select() # add the above to the read-only form for r in range(len(records)): readonlyrecord = TR(TD(str(r+1)), TD(records[r].name), TD (records[r].filename)) jobform[0].append(readonlyrecord) # add an additional row to the form for assigning transcribers form = SQLFORM(db.worker, keepopts=['filename']) newrow = TR(TD(''),SELECT(form.custom.inpval.filename, name='filename'), \ INPUT(_type='text',name='name', requires=IS_NOT_EMPTY()), INPUT (_type='submit', _value='Add another')) jobform[0].append(newrow) if form.accepts(request.vars, session): session.flash = 'Added worker!' db.worker.insert(job_id = request.args[0], name = jobform.vars.name) # control never reaches here redirect(URL(r=request, f='assign', args=request.args)) elif form.errors: session.flash = 'Some error occured.' return dict(jobform = jobform) There may be some typos, please use your judgement to correct them. :) On Jan 25, 6:52 pm, mdipierro wrote: > I need to try this. Can you post the entire action and a sample (one > field) child and parent tables? > > On Jan 25, 5:36 am, Adi wrote: > > > > > Corrections: form1 = SQLFORM(db.parent, record, readonly=True) > > > On Jan 25, 4:35 pm, Adi wrote: > > > > Hi all, > > > > I'm trying to build a custom form in this fashion: > > > > There's a parent table and a child table (many one relationship). I've > > > created a read-only SQLFORM for a record of the parent, and then I'm > > > trying this: > > > > form1 = SQLFORM(db.parent, readonly=True) > > > > form2 = SQLFORM(db.child, keepopts=['gender']) > > > > form1[0].append(TR(INPUT(_type='text', name='name', > > > requires=IS_NOT_EMPTY()), \ > > > SELECT(form2.custom.inpval.gender, name='gender'),\ > > > INPUT(_type='submit', _value='Add another')) > > > > This gives me the appearance of the form as I want, i.e., parent read- > > > only record in a form, with additional single row of updateable child > > > form with "Add another" button. The second form is to provide a drop- > > > down list for 'gender'. However, in this case the "Add another" button > > > doesn't submit, i.e, I can't get control in form1.accepts or > > > form2.accepts. > > > > What am I doing wrong? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: wysiwyg editor in form does not work with ajax
i wrote it down http://www.web2pyslices.com/main/slices/take_slice/54 however some elements are not coverted to markdown or back eg. underline and strikethrough is converted to markdown but not from markdown to html here is another converter that I dismissed for some reason i do not remember http://www.codefu.org/wiki/Main/Html2markdown On Jan 25, 3:56 pm, Thadeus Burgess wrote: > so you convert your markdown back into html to feed to the WYSIWYG editor? > > -Thadeus > > > > On Mon, Jan 25, 2010 at 7:54 AM, mdipierro wrote: > > html2text is interesting... opens many possibilities. > > > On Jan 25, 6:16 am, selecta wrote: > >> success > > >> I > >> usedhttp://www.aaronsw.com/2002/html2text/andhttp://code.google.com/p/jwy... > > >> in the view I write > >> form part: > >>
[web2py] Re: Custom form doesn't submit
Sorry I was posting the other reply so missed this: Responses inline. > You are appending to form1 so check: > 1) An INPUT named 'name', is it the only 'name' field in form1? Yes. names of all fields are different. > 2) Same for the SELECT, is there another 'gender' field? No. All fields are different. > 3) A second button named 'Add another' which will submit to the > controller that generated form1 (self-submission), is that what you > want?. A button in the same row as the inserted form which says "Add another" & submits the data to the same controller and function. So, Yes. > > Denes. On Jan 25, 8:15 pm, DenesL wrote: > On Jan 25, 6:35 am, Adi wrote: > > > > > > > Hi all, > > > I'm trying to build a custom form in this fashion: > > > There's a parent table and a child table (many one relationship). I've > > created a read-only SQLFORM for a record of the parent, and then I'm > > trying this: > > > form1 = SQLFORM(db.parent, readonly=True) > > > form2 = SQLFORM(db.child, keepopts=['gender']) > > > form1[0].append(TR(INPUT(_type='text', name='name', > > requires=IS_NOT_EMPTY()), \ > > SELECT(form2.custom.inpval.gender, name='gender'),\ > > INPUT(_type='submit', _value='Add another')) > > > This gives me the appearance of the form as I want, i.e., parent read- > > only record in a form, with additional single row of updateable child > > form with "Add another" button. The second form is to provide a drop- > > down list for 'gender'. However, in this case the "Add another" button > > doesn't submit, i.e, I can't get control in form1.accepts or > > form2.accepts. > > > What am I doing wrong? > > You are appending to form1 so check: > 1) An INPUT named 'name', is it the only 'name' field in form1? > 2) Same for the SELECT, is there another 'gender' field? > 3) A second button named 'Add another' which will submit to the > controller that generated form1 (self-submission), is that what you > want?. > > Denes. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: wysiwyg editor in form does not work with ajax
On a related topic. The html wysiwyg editor that comes with admin has a major problem. It escapes URLS. This is a probem since URL may include code like {{=URL(...)}} that should not be escaped. It would be great if somebody could look into this. On Jan 25, 9:18 am, selecta wrote: > i wrote it downhttp://www.web2pyslices.com/main/slices/take_slice/54 > however some elements are not coverted to markdown or back > eg. underline and strikethrough is converted to markdown but not from > markdown to html > > here is another converter that I dismissed for some reason i do not > rememberhttp://www.codefu.org/wiki/Main/Html2markdown > > On Jan 25, 3:56 pm, Thadeus Burgess wrote: > > > so you convert your markdown back into html to feed to the WYSIWYG editor? > > > -Thadeus > > > On Mon, Jan 25, 2010 at 7:54 AM, mdipierro wrote: > > > html2text is interesting... opens many possibilities. > > > > On Jan 25, 6:16 am, selecta wrote: > > >> success > > > >> I > > >> usedhttp://www.aaronsw.com/2002/html2text/andhttp://code.google.com/p/jwy... > > > >> in the view I write > > >> form part: > > >>
[web2py] Web2py for PHP
Hello Maybe it sounds strange but I need something like Web2py for PHP. Most PHP frameworks are too complicated. I know Codeigniter but IMO web2py has a great job, too for newbies that don´t know any OOP. Do you think something with the simplicity of web2py exists in PHP? Thanks and sorry for the strange question. F-X -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Web2py for PHP
Web2py has it all -- but if you must insist on PHP: See Cakephp.org (and try the new fork, http://li3.rad-dev.org/) After another 3 months of frustration, you'll be back! ;-) D -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Web2py for PHP
Hi, Why don't you take the time to learn Python? As a programmer experienced in Java/C/C++/Lisp etc. I can only say good things about my decision to learn python a while back. It is a great language. Just my 2cent. I'm afraid I can't help you with php frameworks. See ya. -- On Mon, Jan 25, 2010 at 3:48 PM, Pynthon Pynthon wrote: > Hello > > Maybe it sounds strange but I need something like Web2py for PHP. Most PHP > frameworks are too complicated. I know Codeigniter but IMO web2py has a > great job, too for newbies that don´t know any OOP. > > Do you think something with the simplicity of web2py exists in PHP? > > Thanks and sorry for the strange question. > F-X > > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Web2py for PHP
you won't find the simplicity just because of the way php is as a language, you might be able to emulate web2py but it will never be web2py because the thing that makes web2py so awesome is python. i'm assuming this is a requirement based on you have clients that want php but you want an easy framework? -Thadeus On Mon, Jan 25, 2010 at 10:38 AM, tiago almeida wrote: > Hi, > > Why don't you take the time to learn Python? > As a programmer experienced in Java/C/C++/Lisp etc. I can only say good > things about my decision to learn python a while back. It is a great > language. > > Just my 2cent. I'm afraid I can't help you with php frameworks. > > See ya. > -- > > On Mon, Jan 25, 2010 at 3:48 PM, Pynthon Pynthon > wrote: >> >> Hello >> >> Maybe it sounds strange but I need something like Web2py for PHP. Most PHP >> frameworks are too complicated. I know Codeigniter but IMO web2py has a >> great job, too for newbies that don´t know any OOP. >> >> Do you think something with the simplicity of web2py exists in PHP? >> >> Thanks and sorry for the strange question. >> F-X >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To post to this group, send email to web...@googlegroups.com. >> To unsubscribe from this group, send email to >> web2py+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/web2py?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Web2py for PHP
Not that this is a good idea in general BUT you can do the following create a web2py app called, for example, "php" with a single controller called default.py that contains def index(): redirect(URL(r=request,f='public/index')) def public(): response.view='default/public/%s.html' % request.args(0) return dict() @auth.requires_login() def private(): response.view='default/private/%s.html' % request.args(0) return dict() def user(): return dict(form=auth()) then in views/default make two subfolder:"public" and "private". Now you can program in web2py like you would in PHP. For example you can create views/default/public/index.html with inside: Hello{{for k in range(3):}}World{{pass}} In the .html files you can {{db.define_table()}} and {{form=crud.create(...)}} and {{redirect()}} files in public will not require login, stuff in private will require login. There is a limited and experimental and lousy PHP to web2py converter (http://web2py.com/php) perhaps it could be integrated to support proper PHP syntax with web2py functions. Massimo On Jan 25, 9:48 am, Pynthon Pynthon wrote: > Hello > > Maybe it sounds strange but I need something like Web2py for PHP. Most PHP > frameworks are too complicated. I know Codeigniter but IMO web2py has a > great job, too for newbies that don´t know any OOP. > > Do you think something with the simplicity of web2py exists in PHP? > > Thanks and sorry for the strange question. > F-X -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Web2py for PHP
Gahh! Python Server Pages Gahh! Don't ever suggest that again! On 1/25/2010 10:50 AM, mdipierro wrote: Not that this is a good idea in general BUT you can do the following create a web2py app called, for example, "php" with a single controller called default.py that contains def index(): redirect(URL(r=request,f='public/index')) def public(): response.view='default/public/%s.html' % request.args(0) return dict() @auth.requires_login() def private(): response.view='default/private/%s.html' % request.args(0) return dict() def user(): return dict(form=auth()) then in views/default make two subfolder:"public" and "private". Now you can program in web2py like you would in PHP. For example you can create views/default/public/index.html with inside: Hello{{for k in range(3):}}World{{pass}} In the .html files you can {{db.define_table()}} and {{form=crud.create(...)}} and {{redirect()}} files in public will not require login, stuff in private will require login. There is a limited and experimental and lousy PHP to web2py converter (http://web2py.com/php) perhaps it could be integrated to support proper PHP syntax with web2py functions. Massimo On Jan 25, 9:48 am, Pynthon Pynthon wrote: Hello Maybe it sounds strange but I need something like Web2py for PHP. Most PHP frameworks are too complicated. I know Codeigniter but IMO web2py has a great job, too for newbies that don´t know any OOP. Do you think something with the simplicity of web2py exists in PHP? Thanks and sorry for the strange question. F-X -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Web2py for PHP
I feel ashamed of myself. Honestly. I should have just suggested look into http://web2py.appspot.com/t3 until we complete all the plugins we need to make https://launchpad.net/t4 a production system. On Jan 25, 11:02 am, Timothy Farrell wrote: > Gahh! > > Python Server Pages > > Gahh! > > Don't ever suggest that again! > > On 1/25/2010 10:50 AM, mdipierro wrote: > > > Not that this is a good idea in general BUT you can do the > > following > > > create a web2py app called, for example, "php" with a single > > controller called default.py that contains > > > def index(): redirect(URL(r=request,f='public/index')) > > def public(): > > response.view='default/public/%s.html' % request.args(0) > > return dict() > > @auth.requires_login() > > def private(): > > response.view='default/private/%s.html' % request.args(0) > > return dict() > > def user(): return dict(form=auth()) > > > then in views/default make two subfolder:"public" and "private". > > > Now you can program in web2py like you would in PHP. For example you > > can create > > > views/default/public/index.html > > > with inside: > > > Hello{{for k in range(3):}}World{{pass}} > body> > > > In the .html files you can {{db.define_table()}} and > > {{form=crud.create(...)}} and {{redirect()}} > > > files in public will not require login, stuff in private will require > > login. > > > There is a limited and experimental and lousy PHP to web2py converter > > (http://web2py.com/php) perhaps it could be integrated to support > > proper PHP syntax with web2py functions. > > > Massimo > > > On Jan 25, 9:48 am, Pynthon Pynthon wrote: > > >> Hello > > >> Maybe it sounds strange but I need something like Web2py for PHP. Most PHP > >> frameworks are too complicated. I know Codeigniter but IMO web2py has a > >> great job, too for newbies that don t know any OOP. > > >> Do you think something with the simplicity of web2py exists in PHP? > > >> Thanks and sorry for the strange question. > >> F-X -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Web2py for PHP
hi, this is certainly not the place to start a php vs python debate, but unless you have very valid reasons to use php, i'd suggest to stick with python. python is a very elegant and mature language. php has gained a huge popularity more for the moment when it came out that for the goodness of the language itself. it has a broken object system, no namespaces and so on. its luck is that, when it gained popularity, the alternatives where expensive or harder for the newbie (eg. perl). today the only reason one can have to use php over python is cost- based. for example, i can buy a decent php hosting + domain to get started for as low as 10 euros a year (here: http://www.tophost.it/th/index.php). i've bought a space for my python hosting the other day at http://www.webfaction.com/ (that seems a favorite here). it gives you lots of power and control, but certainly it's much more expensive and i could not find a cheaper place to host the web2py application i'm developing. so, if you have problem with the language itself (but, given your nick, i doubt it), the time spent learning it is even lower than the time you'd spend getting around php strangeness and the not-easy-out- of-the-box approach of most of its frameworks. just my two cents. On Jan 25, 4:48 pm, Pynthon Pynthon wrote: > Hello > > Maybe it sounds strange but I need something like Web2py for PHP. Most PHP > frameworks are too complicated. I know Codeigniter but IMO web2py has a > great job, too for newbies that don´t know any OOP. > > Do you think something with the simplicity of web2py exists in PHP? > > Thanks and sorry for the strange question. > F-X -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Blogitizor Open Sourced
that would be great if you further developed blogitizor so it had the functionality of a CMS. If there anything preventing blogitizor running on GAE? On Jan 26, 1:55 am, Thadeus Burgess wrote: > And because of this I have been looking and designing in my head how > to make blogitizor not just a blog engine, but a pluggable system. > > -Thadeus > > > > On Mon, Jan 25, 2010 at 8:54 AM, Thadeus Burgess > wrote: > > Well I have been looking at a bunch of them, because a CMS can be a > > blog and a blog is a stripped down CMS. > > > Ive noticed that most CMS systems are actually just pluggable > > frameworks, in which you install the features you want. > > > Take redmine for example, its a bug tracking software like trac, but > > implemented in such a way you can install a blog, your own themes, > > hell I could make it look and act exactly like my current website with > > the right plugin except for the fact I don't know ruby. > > > HazelCMS is done in a plugin fashion as well, you just install a > > component and it appears, im sure you could write a version control > > and have it hook into hazelcms as well. > > > So really Ive wondered do we need a CMS or a blog or a wiki, or do we > > need a true pluggable system that can become anything with the right > > mix and match of plugins > > > -Thadeus > > > On Mon, Jan 25, 2010 at 12:05 AM, Richard wrote: > >> ah I was also attracted to the admin look and feel. > > >> web2py needs a RadiantC -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Cron Problem
Hello, The cron feature does not seem to work for me. Any insights? Here is some information: at this URL, http://127.0.0.1:8000/admin/default/edit/oves_beta_001x2auden/cron/crontab, this is what I have #crontab -1 * * * * root *cron_operations/ labor_bidding_processes at this URL, http://127.0.0.1:8000/admin/default/edit/oves_beta_001x2auden/controllers/cron_operations.py, this is what I have def labor_bidding_processes(): db.tester.insert(tf1 = 'cat dog mouse!!!') return dict() I expect that when I start the application oves_beta_001x2auden, that the database is updated - but it does not update. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Serious issue with upgrading to latest version
This issue happend to me several times, I ended reinstalling all again. alex f El 25/01/2010 23:13, weheh escribió: I want to test out my new website under development on my server production area. Problem is, the server is running web2py 1.64.3 and won't let me install my new website. So I downloaded the source version of web2py on the server side and after backing everything up, of course, installed it and restarted the web2py app. My old app seemed to work OK, but when I went to the admin page of web2py, I got a ticket. When I clicked to open the ticket, I got another ticket, and so on. So there's practically no way for me to install the packed app. I undid everything and that's where I am now. Any ideas what could be causing the admin app to fail like that? -- Alejandro Fanjul Fdez. alex.fan...@gmail.com www.mhproject.org -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Blogitizor Open Sourced
I do use joins. I know I have a left join in there somewhere :) So no, I don't have support for GAE out of box. I actually designed blogitizor to be more CMS oriented, hence I use the name Pages instead of Posts. However my first and foremost goal was to deprecate my wordpress blog, now that that is completed I am taking a step back. It is an interesting development theory on GAE vs Relational database, relational databases you need to normalize the tables, so you need joins, however on GAE you need just a bigtable, so no joins and lots of repeated data. So the whole design of your data changes, comletely whether you are on GAE/or using a notable database like mongo or couch, or using a relational database like mysql postgres or sqlite. So here the real question comes in for supporting GAE vs relational, we actually need a layout on top of the DAL that can translate for us queries based on what platform we are on. So I am thinking that all queries will have to be meta classes, so instead of doing db(db.page.id > 0).select(limitby=(1,15)) you will do Posts.get(limitby, etc etc) class Query def get def update def insert def delete class PostQueryBigTableAdapter(Query) def get(category="web2py") return db(db.post.categories == "web2py").select() class PostQueryRelationalAdapter(Query) def get(category="web2py") return db(db.post.category == db.category.id & db.category.name == category).select() This would allow for seamless integration into either a relational database or GAE and be able to monopolize on the features of both. You sacrifice alot of speed doing relation like tables on Google Big Table, and you lose a almost making your application not run by doing BIgTable things on a relational database. -Thadeus On Mon, Jan 25, 2010 at 5:29 PM, Richard wrote: > that would be great if you further developed blogitizor so it had the > functionality of a CMS. > If there anything preventing blogitizor running on GAE? > > > On Jan 26, 1:55 am, Thadeus Burgess wrote: >> And because of this I have been looking and designing in my head how >> to make blogitizor not just a blog engine, but a pluggable system. >> >> -Thadeus >> >> >> >> On Mon, Jan 25, 2010 at 8:54 AM, Thadeus Burgess >> wrote: >> > Well I have been looking at a bunch of them, because a CMS can be a >> > blog and a blog is a stripped down CMS. >> >> > Ive noticed that most CMS systems are actually just pluggable >> > frameworks, in which you install the features you want. >> >> > Take redmine for example, its a bug tracking software like trac, but >> > implemented in such a way you can install a blog, your own themes, >> > hell I could make it look and act exactly like my current website with >> > the right plugin except for the fact I don't know ruby. >> >> > HazelCMS is done in a plugin fashion as well, you just install a >> > component and it appears, im sure you could write a version control >> > and have it hook into hazelcms as well. >> >> > So really Ive wondered do we need a CMS or a blog or a wiki, or do we >> > need a true pluggable system that can become anything with the right >> > mix and match of plugins >> >> > -Thadeus >> >> > On Mon, Jan 25, 2010 at 12:05 AM, Richard wrote: >> >> ah I was also attracted to the admin look and feel. >> >> >> web2py needs a RadiantC > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Serious issue with upgrading to latest version
I also have noticed an inability to upgrade web2py from an older version to a newer version, I always have to wipe the web2py installation, and untar/clone from scratch. I have yet to run into this sort of problem when keeping up with the latest trunk however, this is confusing as to why it happens. -Thadeus On Mon, Jan 25, 2010 at 6:16 PM, Alex Fanjul wrote: > This issue happend to me several times, I ended reinstalling all again. > alex f > > El 25/01/2010 23:13, weheh escribió: >> >> I want to test out my new website under development on my server >> production area. Problem is, the server is running web2py 1.64.3 and >> won't let me install my new website. >> >> So I downloaded the source version of web2py on the server side and >> after backing everything up, of course, installed it and restarted the >> web2py app. My old app seemed to work OK, but when I went to the admin >> page of web2py, I got a ticket. When I clicked to open the ticket, I >> got another ticket, and so on. So there's practically no way for me to >> install the packed app. >> >> I undid everything and that's where I am now. Any ideas what could be >> causing the admin app to fail like that? >> >> > > -- > Alejandro Fanjul Fdez. > alex.fan...@gmail.com > www.mhproject.org > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Serious issue with upgrading to latest version
I have no clue. Please share any insight on this matter. On Jan 25, 6:45 pm, Thadeus Burgess wrote: > I also have noticed an inability to upgrade web2py from an older > version to a newer version, I always have to wipe the web2py > installation, and untar/clone from scratch. I have yet to run into > this sort of problem when keeping up with the latest trunk however, > this is confusing as to why it happens. > > -Thadeus > > On Mon, Jan 25, 2010 at 6:16 PM, Alex Fanjul wrote: > > This issue happend to me several times, I ended reinstalling all again. > > alex f > > > El 25/01/2010 23:13, weheh escribió: > > >> I want to test out my new website under development on my server > >> production area. Problem is, the server is running web2py 1.64.3 and > >> won't let me install my new website. > > >> So I downloaded the source version of web2py on the server side and > >> after backing everything up, of course, installed it and restarted the > >> web2py app. My old app seemed to work OK, but when I went to the admin > >> page of web2py, I got a ticket. When I clicked to open the ticket, I > >> got another ticket, and so on. So there's practically no way for me to > >> install the packed app. > > >> I undid everything and that's where I am now. Any ideas what could be > >> causing the admin app to fail like that? > > > -- > > Alejandro Fanjul Fdez. > > alex.fan...@gmail.com > >www.mhproject.org > > > -- > > You received this message because you are subscribed to the Google Groups > > "web2py-users" group. > > To post to this group, send email to web...@googlegroups.com. > > To unsubscribe from this group, send email to > > web2py+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Cron Problem
I will try check this asap. On Jan 25, 5:48 pm, Auden RovelleQuartz wrote: > Hello, > > The cron feature does not seem to work for me. Any insights? > > Here is some information: > > at this > URL,http://127.0.0.1:8000/admin/default/edit/oves_beta_001x2auden/cron/cr..., > this is what I have > > #crontab > -1 * * * * root *cron_operations/ > labor_bidding_processes > > at this > URL,http://127.0.0.1:8000/admin/default/edit/oves_beta_001x2auden/control..., > this is what I have > > def labor_bidding_processes(): > db.tester.insert(tf1 = 'cat dog mouse!!!') > return dict() > > I expect that when I start the application oves_beta_001x2auden, that > the database is updated - but it does not update. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Serious issue with upgrading to latest version
Insight: I put this in the same category as "printer trouble" -Thadeus On Mon, Jan 25, 2010 at 8:55 PM, mdipierro wrote: > I have no clue. Please share any insight on this matter. > > On Jan 25, 6:45 pm, Thadeus Burgess wrote: >> I also have noticed an inability to upgrade web2py from an older >> version to a newer version, I always have to wipe the web2py >> installation, and untar/clone from scratch. I have yet to run into >> this sort of problem when keeping up with the latest trunk however, >> this is confusing as to why it happens. >> >> -Thadeus >> >> On Mon, Jan 25, 2010 at 6:16 PM, Alex Fanjul wrote: >> > This issue happend to me several times, I ended reinstalling all again. >> > alex f >> >> > El 25/01/2010 23:13, weheh escribió: >> >> >> I want to test out my new website under development on my server >> >> production area. Problem is, the server is running web2py 1.64.3 and >> >> won't let me install my new website. >> >> >> So I downloaded the source version of web2py on the server side and >> >> after backing everything up, of course, installed it and restarted the >> >> web2py app. My old app seemed to work OK, but when I went to the admin >> >> page of web2py, I got a ticket. When I clicked to open the ticket, I >> >> got another ticket, and so on. So there's practically no way for me to >> >> install the packed app. >> >> >> I undid everything and that's where I am now. Any ideas what could be >> >> causing the admin app to fail like that? >> >> > -- >> > Alejandro Fanjul Fdez. >> > alex.fan...@gmail.com >> >www.mhproject.org >> >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "web2py-users" group. >> > To post to this group, send email to web...@googlegroups.com. >> > To unsubscribe from this group, send email to >> > web2py+unsubscr...@googlegroups.com. >> > For more options, visit this group at >> >http://groups.google.com/group/web2py?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Innapropriate field name
I tried to create a field name called 'order'. This threw an exception. Changing to another name called 'item_order' solved this. I just wanted to share this. Correct me if I am wrong. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Innapropriate field name
Currently the dal does not rename field and table names and transparently passes them to the db. "order" is a reserved keyword in SQL because used for "ORDER BY", so it cannot be a table or field name. On Jan 25, 9:44 pm, rama wrote: > I tried to create a field name called 'order'. This threw an > exception. Changing to another name called 'item_order' solved this. > > I just wanted to share this. Correct me if I am wrong. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Serious issue with upgrading to latest version
I have to wiat 'til my server is less busy before I can try Thadeus' and Alex's suggestions. That'll probably be tomorrow morning. On Jan 25, 10:04 pm, Thadeus Burgess wrote: > Insight: I put this in the same category as "printer trouble" > > -Thadeus > > > > On Mon, Jan 25, 2010 at 8:55 PM, mdipierro wrote: > > I have no clue. Please share any insight on this matter. > > > On Jan 25, 6:45 pm, Thadeus Burgess wrote: > >> I also have noticed an inability to upgrade web2py from an older > >> version to a newer version, I always have to wipe the web2py > >> installation, and untar/clone from scratch. I have yet to run into > >> this sort of problem when keeping up with the latest trunk however, > >> this is confusing as to why it happens. > > >> -Thadeus > > >> On Mon, Jan 25, 2010 at 6:16 PM, Alex Fanjul wrote: > >> > This issue happend to me several times, I ended reinstalling all again. > >> > alex f > > >> > El 25/01/2010 23:13, weheh escribió: > > >> >> I want to test out my new website under development on my server > >> >> production area. Problem is, the server is running web2py 1.64.3 and > >> >> won't let me install my new website. > > >> >> So I downloaded the source version of web2py on the server side and > >> >> after backing everything up, of course, installed it and restarted the > >> >> web2py app. My old app seemed to work OK, but when I went to the admin > >> >> page of web2py, I got a ticket. When I clicked to open the ticket, I > >> >> got another ticket, and so on. So there's practically no way for me to > >> >> install the packed app. > > >> >> I undid everything and that's where I am now. Any ideas what could be > >> >> causing the admin app to fail like that? > > >> > -- > >> > Alejandro Fanjul Fdez. > >> > alex.fan...@gmail.com > >> >www.mhproject.org > > >> > -- > >> > You received this message because you are subscribed to the Google Groups > >> > "web2py-users" group. > >> > To post to this group, send email to web...@googlegroups.com. > >> > To unsubscribe from this group, send email to > >> > web2py+unsubscr...@googlegroups.com. > >> > For more options, visit this group at > >> >http://groups.google.com/group/web2py?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "web2py-users" group. > > To post to this group, send email to web...@googlegroups.com. > > To unsubscribe from this group, send email to > > web2py+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/web2py?hl=en.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Alert when email not sent sucessfully !
Hello mate, This may be a stupid question... I wonder if there is way to know if an email has been successfully send or not... Like for example someone can register to a website using a fake (valid format email) email and the application will send an email but I wonder how to track these cases... Like have a sort of alert when the email is not successfully sent in web2py... Thanks a lot for your help, Cheers, Yannick P. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Alert when email not sent sucessfully !
Check the servers SMTP for mail-delivery failure messages. Beyond that, if they never click your verification link thats a fairly good indication the email is false, you could always use anything past 2 weeks is probably fake filters too. -Thadeus On Mon, Jan 25, 2010 at 10:29 PM, Yannick wrote: > Hello mate, > This may be a stupid question... I wonder if there is way to know if > an email has been successfully send or not... Like for example someone > can register to a website using a fake (valid format email) email and > the application will send an email but I wonder how to track these > cases... Like have a sort of alert when the email is not successfully > sent in web2py... > > Thanks a lot for your help, > > Cheers, > Yannick P. > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Cron Problem
Turns out @reboot only worked with extcron. I modified the cron.py so that now it should work with hardcron (the default) and softcron too. The fix is in trunk. Would you please test it and see if I did not break anything? Massimo On Jan 25, 5:48 pm, Auden RovelleQuartz wrote: > Hello, > > The cron feature does not seem to work for me. Any insights? > > Here is some information: > > at this > URL,http://127.0.0.1:8000/admin/default/edit/oves_beta_001x2auden/cron/cr..., > this is what I have > > #crontab > -1 * * * * root *cron_operations/ > labor_bidding_processes > > at this > URL,http://127.0.0.1:8000/admin/default/edit/oves_beta_001x2auden/control..., > this is what I have > > def labor_bidding_processes(): > db.tester.insert(tf1 = 'cat dog mouse!!!') > return dict() > > I expect that when I start the application oves_beta_001x2auden, that > the database is updated - but it does not update. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Alert when email not sent sucessfully !
Thanks for the note... Yes that's why I was asking because I don't have a verification link on my appl... I was wondering if there are a way to know about the failure ASAP... the failure message from SMTP come later in the process... On Jan 25, 11:32 pm, Thadeus Burgess wrote: > Check the servers SMTP for mail-delivery failure messages. > > Beyond that, if they never click your verification link thats a fairly > good indication the email is false, you could always use anything past > 2 weeks is probably fake filters too. > > -Thadeus > > On Mon, Jan 25, 2010 at 10:29 PM, Yannick wrote: > > Hello mate, > > This may be a stupid question... I wonder if there is way to know if > > an email has been successfully send or not... Like for example someone > > can register to a website using a fake (valid format email) email and > > the application will send an email but I wonder how to track these > > cases... Like have a sort of alert when the email is not successfully > > sent in web2py... > > > Thanks a lot for your help, > > > Cheers, > > Yannick P. > > > -- > > You received this message because you are subscribed to the Google Groups > > "web2py-users" group. > > To post to this group, send email to web...@googlegroups.com. > > To unsubscribe from this group, send email to > > web2py+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Alert when email not sent sucessfully !
nope, not that I know of. -Thadeus On Mon, Jan 25, 2010 at 10:39 PM, Yannick wrote: > Thanks for the note... Yes that's why I was asking because I don't > have a verification link on my appl... I was wondering if there are a > way to know about the failure ASAP... the failure message from SMTP > come later in the process... > > On Jan 25, 11:32 pm, Thadeus Burgess wrote: >> Check the servers SMTP for mail-delivery failure messages. >> >> Beyond that, if they never click your verification link thats a fairly >> good indication the email is false, you could always use anything past >> 2 weeks is probably fake filters too. >> >> -Thadeus >> >> On Mon, Jan 25, 2010 at 10:29 PM, Yannick wrote: >> > Hello mate, >> > This may be a stupid question... I wonder if there is way to know if >> > an email has been successfully send or not... Like for example someone >> > can register to a website using a fake (valid format email) email and >> > the application will send an email but I wonder how to track these >> > cases... Like have a sort of alert when the email is not successfully >> > sent in web2py... >> >> > Thanks a lot for your help, >> >> > Cheers, >> > Yannick P. >> >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "web2py-users" group. >> > To post to this group, send email to web...@googlegroups.com. >> > To unsubscribe from this group, send email to >> > web2py+unsubscr...@googlegroups.com. >> > For more options, visit this group >> > athttp://groups.google.com/group/web2py?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] cron anybody
I made some changes to cron.py in trunk. If you use cron, could you please hep me test it? Massimo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: [web2py:36899] Creating a CSV file from data
2009/12/9 Thadeus Burgess : > Is there something wrong with the following? > > results = db(db.table.field == searchvar)(db.table.field2 == > searchvar2).select() > > results.export_to_csv(outputfile, delimiter=',', quotechar='"', > qouting=csv.QOUTE_MINIMAL, represent=False) > I would like to give the user a choice to download the results shown on the screen to a csv-file - much like appadmin do. My problem is that I still do not understand enough on how to handle the relation between the original controller, the view, and the csv-controller in this case. Once the table data (SQLTABLE) is on the screen and there is a link to download it to a csv-file, I want the user to be able to choose a filename download the data using a link in the view. In the book there is an example of a view (say default/example.csv) that looks like this: {{ import cStringIO stream=cStringIO.StringIO() sarua.export_to_csv_file(stream) response.headers['Content-Type']='application/vnd.ms-excel' response.write(stream.getvalue(), escape=False) }} But I don't know how to use it. I am also not sure how to use your example as above. I have tried this controller def csv(): import gluon.contenttype response.headers['Content-Type'] = \ gluon.contenttype.contenttype('.csv') response.vars.records.export_to_csv(response.vars.outputfile, delimiter = ',', quotechar = '"', quoting = csv.QUOTE_MINIMAL, represent = False) return And this in the view? {{extend 'layout.html'}} {{=T("export as csv file")}} {{=records}} represent = False) -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] globalposttasks
I am planning to eliminate the wsgihooks.py file from web2py including ExecuteOnCompletion2, globalposttasks and localposttasks I will move softcron to inside wsgibase. To most of the people here this does not mean anything. If this means something to you and you are using any of these functions in a custom handler or for any other reason, please let me know what you are using them for. Massimo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: EOFError?
i finally sorted out the problem. it is the file locking issue on the .table file. i run the application under mod_wsgi with multiple process. this error can be reproduce by loading a page with lots of images and those images are handle by the "download function". migrate=false will fix this for sure. i suggest error ticket should record the url as well as cookie data too for debug purpose. -vince On Jan 25, 3:24 am, mdipierro wrote: > You can have a problem with sqlite if you remove a field and you add > it again with the same name. > > This is because sqlite does not support ALTER TABLE ... DROP. > > Massimo > > On Jan 24, 1:21 pm, vince wrote: > > > > > i can't sort out how to reproduce it anyway, it's not happening > > everytime i add a field. i'll see if the clean up of .table works > > > On Jan 25, 2:58 am, vince wrote: > > > > i just did some test and the error seems to appear when i modify the > > > table definition, eg add a new field with migrate=true. > > > it will only appear in the error log and i won't see the actually > > > error ticket on browsing. > > > > On Jan 25, 1:12 am, mdipierro wrote: > > > > > web2py will only recreate them if > > > > > a) you also delete the database itself (for sqlite, you must delete > > > > everything in databases) > > > > > OR > > > > > b) you know for sure that the current models reflect exactly the > > > > structure of the database tables and you set "db.define_table > > > > (...,fake_migrate=True)" for all tables. > > > > > In any case. Make a backup of the .tables before you delete them. In > > > > theory, if you lose them it is always possible to rebuild them (they > > > > are just picked files. > > > > Massimo > > > > > On Jan 24, 10:54 am, vince wrote: > > > > > > i just double check and it should not be file permission issue. > > > > > > is it safe to just delete all .table? web2py will auto recreate them? > > > > > > On Jan 25, 12:44 am, mdipierro wrote: > > > > > > > I can only see three possible causes of the problem: > > > > > > 1) bug in your version of pickle > > > > > > 2) file permission issue > > > > > > 3) there are some .table files in you databases folder that were > > > > > > created by a different python dictribution > > > > > > > On Jan 24, 10:16 am, vince wrote: > > > > > > > > i am running from source on linux and mac. > > > > > > > > On Jan 23, 6:36 am, mdipierro wrote: > > > > > > > > > Are you using the web2py binary or source? > > > > > > > > Did you delete only the .table or everything in databases? > > > > > > > > Does you app run if you set migrate=False for all tables? > > > > > > > > > Massimo > > > > > > > > > On Jan 22, 4:11 pm, Brian M wrote: > > > > > > > > > > Hmm, I've been running into this problem a bunch today. WinXP > > > > > > > > > with > > > > > > > > > source web2py 1.74.5 and SQLite. My .table files keep getting > > > > > > > > > truncated to 0 bytes for some reason and then web2py chokes. > > > > > > > > > > ~Brian > > > > > > > > > > On Jan 22, 2:13 pm, Thadeus Burgess > > > > > > > > > wrote: > > > > > > > > > > > looks like a corrupted .table file > > > > > > > > > > -Thadeus > > > > > > > > > > > On Fri, Jan 22, 2010 at 1:18 PM, vince > > > > > > > > > > wrote: > > > > > > > > > > > i just look into the error log for some clean up and > > > > > > > > > > > found several > > > > > > > > > > > ticket with the following errors. i am using 1.74.6, any > > > > > > > > > > > ideas? > > > > > > > > > > > > Traceback (most recent call last): > > > > > > > > > > > File > > > > > > > > > > > "/Library/WebServer/Documents/web2py/gluon/restricted.py", > > > > > > > > > > > line > > > > > > > > > > > 173, in restricted > > > > > > > > > > > exec ccode in environment > > > > > > > > > > > File > > > > > > > > > > > "/Library/WebServer/Documents/web2py/applications/cms/models/ > > > > > > > > > > > db.py", line 137, in > > > > > > > > > > > migrate=is_migrate) > > > > > > > > > > > File "/Library/WebServer/Documents/web2py/gluon/sql.py", > > > > > > > > > > > line 1252, > > > > > > > > > > > in define_table > > > > > > > > > > > t._create(migrate=migrate, fake_migrate=fake_migrate) > > > > > > > > > > > File "/Library/WebServer/Documents/web2py/gluon/sql.py", > > > > > > > > > > > line 1703, > > > > > > > > > > > in _create > > > > > > > > > > > sql_fields_old = cPickle.load(tfile) > > > > > > > > > > > EOFError > > > > > > > > > > > > -- > > > > > > > > > > > You received this message because you are subscribed to > > > > > > > > > > > the Google Groups "web2py-users" group. > > > > > > > > > > > To post to this group, send email to > > > > > > > > > > > web...@googlegroups.com. > > > > > > > > > > > To unsubscribe from this group, send email to > > > > > > > > > > > web2py+unsubscr...@googlegroups.com. > > > > > > > > > > > For more options, visit this group > > > > > > > > > > > athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you ar