[web2py] Update web2py manually

2019-02-11 Thread Константин Комков
Hello! Now I have last version of framework, but on my server It work not correct. The reason of uncorrect work is not full update, maybe uncorrect update. I have 6 projects and they are working. What I need to do in that case? -- Resources: - http://web2py.com - http://web2py.com/book (Docume

Re: [web2py] Update web2py manually

2019-02-11 Thread Nico Zanferrari
Hi, in order to be able to help you, we need informations: at least the Operating system, web2py & Python version used. And what exactly is not working, of course ;-) Nico Il giorno lun 11 feb 2019 alle ore 09:39 Константин Комков < fireandmi...@gmail.com> ha scritto: > Hello! > > Now I have la

Re: [web2py] Update web2py manually

2019-02-11 Thread 黄祥
*the step are:* - backup your web2py apps from applications folders (copy or sync) - update webp2y (either download and extract the package or using git fetch or pull) - restore your web2py apps to applications folders (copy or sync) the command line will match with your os environment test it fi

[web2py] Re: Update web2py manually

2019-02-11 Thread Константин Комков
Nico Zanferrari, I created that https://groups.google.com/forum/#!topic/web2py/6NZ7Ht-HXRQ item first becouse I didn't understant that problem in framework. It's windows IIS server, python 2.7.9, web2py 2.17.2. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http:/

[web2py] Re: Update web2py manually

2019-02-11 Thread Константин Комков
Stifan, can I delete all web2py files except folder with projects and paste new web2py files and what I need to do if something will not be removed? I can not update web2py becouse its new last version. And that problem don't solved updating. I have backup. -- Resources: - http://web2py.com - h

Re: [web2py] Re: Need to change text Size of the header

2019-02-11 Thread Arindam Dasgupta
Thanks Sandeep. That solved my problem. :-) Besr Regards, Arindam Dasgupta On Sun, Feb 10, 2019 at 4:20 PM sandeep patel wrote: > @Arindas > Please see an attached layout.html file. You get the idea. > > > Thanks > SP > > On Sun, Feb 10, 2019 at 2:00 PM Arindam Dasgupta > wrote: > >> Hi Sandee

[web2py] Re: Update web2py manually

2019-02-11 Thread Константин Комков
I delete all web2py files, which I can delete and nothing work. Then I tried to start web2py for run current projects but don't have succes. Backup save me but I need to update web2py still. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/we

Re: [web2py] Accessing MySQL data without define tables

2019-02-11 Thread Ben Duncan
I'm not sure what your statement means, however i will give it my best shot to explain> I'm new to web2py myself. Her goes: In my models folder i have several different sub folders: ar, ap ,gl ...etc... Each has the definition. For example under ar there is the dbf_arfiles_dal.py which starts lik

Re: [web2py] Accessing MySQL data without define tables

2019-02-11 Thread Ben Duncan
Oh yeah. One thing I missed explaining is that I spend the end of last year creating a python library that would take file layouts I've gleaned from a 4GL, old cobol systems and an Informix database, and some Oracle Financials. I've create a "layout template" that the library will generate the cre

Re: [web2py] Accessing MySQL data without define tables

2019-02-11 Thread Jon Subscripted
Thanks Ben, Honestly I do not know if I understood what you suggest, sorry... it's actually my fault as I'm still trying to learn web2py (reading the manual, etc.). My web2py-app is actually working, but I still have lost of data to load in the DB. Most of the data to populate de DB is created out

[web2py] Record Versioning ON, result 'id'

2019-02-11 Thread Ben Lawrence
Hi Using Python 3.7, anyone has Record Versioning working ok? http://www.web2py.com/books/default/chapter/29/09/access-control?search=versioning#Record-versioning Whenever I change a record under versioning, say with SQLFORM.grid(), I will get a key error 'id' thanks for your time, Ben Traceback

Re: [web2py] Re: Migrate from sqlite to mysql

2019-02-11 Thread Jon Subscripted
Hi Andrea, Is this " problem about requirements " a notification that MySQL installation wizard showed? If it is, in my experience you can ignore it and move on with the installation. Python3.X is optional for MySQL, it just suggests to install it. Regards, Jon. On Sun, Feb 10, 2019 at 12:19 PM 黄祥

Re: [web2py] Accessing MySQL data without define tables

2019-02-11 Thread Ben Duncan
If this script is being run OUTSIDE the web2py environment then you will need to include the define inside the python program itself. *Ben Duncan* DBA / Chief Software Architect Mississippi State Supreme Court Electronic Filing Division On Mon, Feb 11, 2019 at 9:01 AM Jon Subscripted wrote: >

Re: [web2py] Accessing MySQL data without define tables

2019-02-11 Thread Jon Subscripted
Thanks Ben, Should I include just the define_table for that very table (there are more, but will not be accessed)? Regards, Jon. On Mon, Feb 11, 2019 at 4:26 PM Ben Duncan wrote: > If this script is being run OUTSIDE the web2py environment then you will > need to include the define inside the py

Re: [web2py] Accessing MySQL data without define tables

2019-02-11 Thread Ben Duncan
No , all you need is the db.define for the table you are going to access, unless there is foreign keyes involved. Then include the PARENT table if these are child tables. *Ben Duncan* DBA / Chief Software Architect Mississippi State Supreme Court Electronic Filing Division On Mon, Feb 11, 2019 a

[web2py] Splitting form

2019-02-11 Thread Ben Duncan
Ok, any ideas of how I can split my form down the middle using sqlform ? I need the left 50% for login input and the right 50% for a NEWS coulumn: ie: MY HEADER TOP LINE STUFF HERE -+ User ID

[web2py] Error importing csv file in python3.6

2019-02-11 Thread Maurice Waka
I shifted to web2py/python3. In python2.7 I was able to upload csv files but using the same code below I get an error. For example: def import_csv(): form = FORM(INPUT(_type = 'file', _name = 'csv_file'), INPUT(_type = 'submit', _value = T('Import'))) return dict(form=form) @m

Re: [web2py] Error importing csv file in python3.6

2019-02-11 Thread sandeep patel
I had the same issue. I have solved this way. Please try this You have to changing line 926 of gluon/packages/dal/pydal/objects.py from reader = csv.reader(csvfile, delimiter=delimiter, quotechar=quotechar, quoting=quoting) to reader = csv.reader(codecs.iterdecode(csvfile,'utf-8'), delimiter=delimi

Re: [web2py] Error importing csv file in python3.6

2019-02-11 Thread sandeep patel
In fact, this is an open issue for the same problem. You can check that as well On Mon, Feb 11, 2019 at 11:27 PM sandeep patel wrote: > I had the same issue. I have solved this way. > Please try this > You have to changing line 926 of gluon/packages

[web2py] Over ride SQLFORM defaults

2019-02-11 Thread Ben Duncan
How can you over rider the default CSS in sqlform(.factory) ... i.e.: in_form = SQLFORM.factory( Field('userid', label='User Id: ', requires=IS_NOT_EMPTY(), _style='width: 50%'), Field('password', label='Password', type='password', requires=IS_NOT_EMPTY()), formstyle='divs'

[web2py] Re: Splitting form

2019-02-11 Thread Ben Lawrence
You can use the FORM helper to add DIV elements. Or even add empty DIV elements which you can fill in later with JS one example form = FORM( DIV(DIV( INPUT(...), , _class="col-sm-2") , DIV("NEWS",_id="form-user", _class="col-sm-2" )) . , INPUT(_type='submit', _class = "btn btn-primar

Re: [web2py] Error importing csv file in python3.6

2019-02-11 Thread Lovedie JC
Works. But I can't access the data. On Mon, 11 Feb 2019, 21:02 sandeep patel In fact, this is an open issue > for the same problem. You > can check that as well > > On Mon, Feb 11, 2019 at 11:27 PM sandeep patel > wrote: > >> I had the same issue. I

Re: [web2py] Re: Splitting form

2019-02-11 Thread Ben Duncan
I originally had it using FORM and could do that in the VIEW side of things. Doing that I somehow lost the usage of in_form.process/accept for some reason. I was trying to see if i could do it with the SQLFORM(.factory) helpers to regain those, but it looks like without great difficulty .. Thanks

Re: [web2py] Error importing csv file in python3.6

2019-02-11 Thread sandeep patel
@Lovedie Can you explain a little bit more? What you mean by can't access the data? If you getting the error to import data from CSV. You can try this as well. form = FORM(DIV(LABEL('File input',_for='exampleInputFile'),INPUT(_type='file',_name='csvsheet',_id="exampleInputFile"),_class='from-gro

Re: [web2py] Over ride SQLFORM defaults

2019-02-11 Thread sandeep patel
@Ben I don't think that Field has a _style attribute but in SQLFORM.factory you can use _style attribute. This style applies for all input Fields in form. You can try this way. in_form = SQLFORM.factory( Field('userid', label='User Id: ', requires=IS_NOT_EMPTY()), Field('password',

Re: [web2py] Re: Splitting form

2019-02-11 Thread Val K
def login_news(): form = SQLFORM.factory(Field('user'), Field('password', 'password')) if form.process().accepted: ... # auth logic goes here login_div = DIV(form, _style = 'display: inline-block; width:50%') news_div = DIV('blah '*50, _style = 'display: inline-block;widt

[web2py] Re: Over ride SQLFORM defaults

2019-02-11 Thread Val K
it's a bit tricky but possible: # you can find child element by css/jquery selector: el = in_form.element('input[name=user]') # but 'input[name = user]' - doesn't work, i.e. spaces do matter #you can also: el = form.element('input', _name = 'user') el['_style'] = 'width:50%;' On Monday, Febr

Re: [web2py] Re: Splitting form

2019-02-11 Thread Ben Duncan
Ok, thanks Val. that kinda gives me something to work with. I had to modify the view to :{extend 'layout.html'}} Input form {{=login_news}} Submitted variables {{=BEAUTIFY(request.vars)}} To get it to work. I will play with some more ... Thanks again ... On Mon, Feb 11, 2019 at 2:22 PM Val K

Re: [web2py] Re: Splitting form

2019-02-11 Thread Val K
for deeper customization you can use form.custom, see: http://web2py.com/books/default/chapter/29/07/forms-and-validators#Custom-forms On Tuesday, February 12, 2019 at 12:15:51 AM UTC+3, Ben Duncan wrote: > > Ok, thanks Val. that kinda gives me something to work with. > I had to modify the view t

[web2py] Re: Splitting form

2019-02-11 Thread Dave S
On Monday, February 11, 2019 at 9:13:48 AM UTC-8, Ben Duncan wrote: > > Ok, any ideas of how I can split my form down the middle using sqlform ? > > I need the left 50% for login input and the right 50% for a NEWS coulumn: > > ie: > > MY HEADER TOP LINE STUFF HERE > > --

Re: [web2py] Re: Migrate from sqlite to mysql

2019-02-11 Thread 黄祥
another way around you can use bundled software (xampp, mamp, wamp, ampps, bitnami etc) or docker (mysql or python container) best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com