[web2py] Re: Inserting a new field to an old table - default value is not updated correctly

2016-07-27 Thread Ykä Marjanen
Thanks Massimo! Much easier way. Ykä On Wednesday, July 27, 2016 at 10:24:13 AM UTC+3, Massimo Di Pierro wrote: > > No need for a loop just do fro the shell: > > db(db.persons.new_field==None).update(new_field=0) > > Massimo > > On Tuesday, 26 July 2016 10:54:19 U

[web2py] Re: Inserting a new field to an old table - default value is not updated correctly

2016-07-26 Thread Ykä Marjanen
s done on the python layer. > > On Tuesday, July 26, 2016 at 10:13:19 AM UTC+2, Ykä Marjanen wrote: >> >> Hi, >> >> I have been using Web2py for couple years now, but have not been able to >> find a decent solution to this issue. >> >> When creating a new

[web2py] Inserting a new field to an old table - default value is not updated correctly

2016-07-26 Thread Ykä Marjanen
Hi, I have been using Web2py for couple years now, but have not been able to find a decent solution to this issue. When creating a new web app I am constantly updating new fields to a database table after I already have data there. When I add a new field, I want it to have a default value for

[web2py] Re: Important New Year News: PyCon 2014 Tutorial

2014-05-19 Thread Ykä Marjanen
Here's the link to the video from pyvideo.org: http://pyvideo.org/video/2558/0-to-0000-with-web2py I think it's a good introductory video for newbies to get some insights, but I think Massimo's videos are better for actually learning the framework :) Ykä On Saturday, January 4, 2014

[web2py] Web2py Separating Controller and View Layer

2014-02-18 Thread Ykä Marjanen
Juslin, I've done it manually like in your example. Yes it's long, but gives full control on every field. I also define number of rows for each text box and have a placeholder text. Also classes and other parameters (e.g. Default values) are easier too define in view than in controller, so that

[web2py] Adventures and issues with implementing scheduled background task with web2py and pythonanywhere

2014-02-15 Thread Ykä Marjanen
I've been reading and trying to figure out the best way to implement scheduled background tasks in PythonAnywhere. I think I understand the basics and challenges, but I still think I'm missing something. I haven't found a reasonable way to use web2py scheduler directly in PythonAnywhere. Is it

[web2py] Absolute URL issue in PythonAnywhere when using scheduled script

2014-02-15 Thread Ykä Marjanen
I got the scheduled background script working in PA. The script is started in web2py environment with -S app and -M -R parameters. The script generates emails, which include links (e.g. registration link with UUID). I use scheme=True and host=True to generate absolute URL. This works when I

Re: [web2py] Absolute URL issue in PythonAnywhere when using scheduled script

2014-02-15 Thread Ykä Marjanen
worked so well. On Saturday, February 15, 2014 5:53:57 PM UTC+2, Marin Pranjić wrote: As explained here: http://www.web2py.com/books/default/chapter/29/04/the-core#Absolute-urls You should use: URL(..., scheme='http', host='www.mysite.com') Marin On Sat, Feb 15, 2014 at 4:49 PM, Ykä

[web2py] Re: Can you help me test this project of mine?

2013-12-12 Thread Ykä Marjanen
Looks promising. I can test this next week. I will implement an email reminder service and compare it with using own scheduler in Pythonanywhere. Ykä On Thursday, December 12, 2013 5:05:40 AM UTC+2, Massimo Di Pierro wrote: Should be self-explanatory: http://callme.experts4solutions.com/

[web2py] Re: Online classes

2013-12-03 Thread Ykä Marjanen
Thanks Massimo! Even though I already have the basic knowledge of web2py this is a great way to recap. Ykä On Tuesday, December 3, 2013 8:34:18 AM UTC+2, Massimo Di Pierro wrote: Hello everybody, As you know I teach a certification program about web development with Python and I use

[web2py] Re: Model and Controller with Web2Py, View with Excel ??

2013-11-28 Thread Ykä Marjanen
I don't think you can use a web based application without a server. However, the local server is already there without additional installation, so if you want an application that has a browser interface, then you don't need to do any extra. You can use the webpy current architecture directly

[web2py] Re: auth.messages.verify_email html template

2013-10-27 Thread Ykä Marjanen
I have replaced the standard verification with my own. The standard authentication is pretty simple as it creates a unique key, which it stores in the database and sends as a link to the registrant. When the link is clicked it will match the registration details with the unique id and stores

[web2py] How Do You Choose Frameworks That Will Survive?

2013-10-25 Thread Ykä Marjanen
First choose a language as it has a longetivity beyond a framework (i.e. Python). Then choose a framework which meets your needs and start using it. I dont think long analysis will do any good as it is not that difficult to learn and adapt to another framework (especially python). I've done

Re: [web2py] Bootstrap 2.2.2 / 2.3.2

2013-10-22 Thread Ykä Marjanen
I'm with Niphlod on moving this to developers forum. As a newbie on front end framework and implementing it to web2py, here are some issues/topics I went through: 1) How layout.html works and can be changed 2) What are the additional web2py ajax and js functions and which ones I need and which

Re: [web2py] Bootstrap 2.2.2 / 2.3.2

2013-10-21 Thread Ykä Marjanen
I would vote for bootstrap 3 as it is simpler to implement and use. With the current guidance and the layout template it is pretty easy to customize to any framework already. So I would only focus on improving the documentation, especially for customizing the forms and errors. Then people can

[web2py] Re: Issue with switching to mysql from sqlite in Pythonanywhere (table not created)

2013-10-14 Thread Ykä Marjanen
. SQLite has no referential integrity turned on by default, so it skips the issue entirely. Remember, SQLite is a wonderful db but is tiny and has its own limitations. On Sunday, October 13, 2013 6:36:16 PM UTC+2, Ykä Marjanen wrote: I got everything working, when I moved the table order so

[web2py] Issue with switching to mysql from sqlite in Pythonanywhere (table not created)

2013-10-13 Thread Ykä Marjanen
Hi guys, I thought of using pythonanywhere for the next level of development, so deployed my code there. I had been using sqlite as a test environment, and wanted to move to the mysql database that pythonanywhere provides. I created a new mysql database and then switched the DAL connection to:

[web2py] Re: Issue with switching to mysql from sqlite in Pythonanywhere (table not created)

2013-10-13 Thread Ykä Marjanen
, Ykä Marjanen wrote: Hi guys, I thought of using pythonanywhere for the next level of development, so deployed my code there. I had been using sqlite as a test environment, and wanted to move to the mysql database that pythonanywhere provides. I created a new mysql database and then switched

[web2py] Re: Issue with switching to mysql from sqlite in Pythonanywhere (table not created)

2013-10-13 Thread Ykä Marjanen
, line 36, in defaulterrorhandler raise errorclass, errorvalue OperationalError: (1005, Can't create table 'ykamarjanen$dbname.campaign' (errno: 150)) On Sunday, October 13, 2013 3:59:08 PM UTC+3, Ykä Marjanen wrote: Niphlod, this is the log. The test table, that I created, passes fine

[web2py] Re: Issue with switching to mysql from sqlite in Pythonanywhere (table not created)

2013-10-13 Thread Ykä Marjanen
, try to issue the create statement to the db to see what is the error, eventually trimming out the column that are references to external tables. On Sunday, October 13, 2013 3:00:57 PM UTC+2, Ykä Marjanen wrote: And the resulting ticket: Error ticket for innopinion_01 Ticket ID

[web2py] Re: Issue with switching to mysql from sqlite in Pythonanywhere (table not created)

2013-10-13 Thread Ykä Marjanen
to the db to see what is the error, eventually trimming out the column that are references to external tables. On Sunday, October 13, 2013 3:00:57 PM UTC+2, Ykä Marjanen wrote: And the resulting ticket: Error ticket for innopinion_01 Ticket ID 91.155.41.52.2013-10-13.12-54-52.7a8f0165-58f8-4ca8

[web2py] Re: Custom Style of a textarea.

2013-10-07 Thread Ykä Marjanen
you for your fast answer. Regards. El sábado, 5 de octubre de 2013 09:24:59 UTC+2, Ykä Marjanen escribió: Hi Francisco, happy to help you, as I've gone a 4 day intensive bootstrap 3 integration to web2py and learned a lot about customizing the views and forms. This might not be the best

[web2py] Re: Custom Style of a textarea.

2013-10-05 Thread Ykä Marjanen
Hi Francisco, happy to help you, as I've gone a 4 day intensive bootstrap 3 integration to web2py and learned a lot about customizing the views and forms. This might not be the best (or only) solution, but has worked well for me: - Web2py form includes classes based on their type, which I

Re: [web2py] Crowdsourcing platform in Web2Py?

2013-09-09 Thread Ykä Marjanen
Hi, check out Massimo's appliances from Git. There are lots of good example sources for web2py projects: https://github.com/mdipierro/web2py-appliances Ykä On Monday, September 9, 2013 11:40:58 AM UTC+3, D.P. wrote: Sorry about the long time to answer. I will would be please to take a look

[web2py] Re: Is it mandatory to add new html page for every new function ?

2013-09-07 Thread Ykä Marjanen
You can redirect to any page you wish from a function. This way you don't have to create a page for the function and can decide what is the page you want to call. example: def no_page(): redirect(URL('index')) This is beneficial, if you want to have a function which handles the link data

[web2py] how to sms web app

2013-09-06 Thread Ykä Marjanen
Hi, You need sms API service like textmagic. Then you create a basic application that reads text messages and displays them. The display part is well documented in web2py book. Ykä -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To

[web2py] Re: Webhosts for Web2py

2013-08-29 Thread Ykä Marjanen
Regarding pythonanywhere.com, what's the best way to run own background tasks? In the website they state 1-hour scheduled task, but I need to run multiple tasks almost real-time (e.g. sending registration emails and such). I've designed my website so that most tasks are queued and done in the

[web2py] Re: Not a web2py issues but ...

2013-08-21 Thread Ykä Marjanen
Happy to help Massimo (sending you an email). I've done my PhD using Python and Scipy/Numpy and in my company we develop motion algorithms using Python. Now starting to learn Pandas. Ykä On Monday, August 19, 2013 4:51:56 PM UTC+3, Massimo Di Pierro wrote: ... I am writing a book about

[web2py] Re: inbuilt login form

2013-08-21 Thread Ykä Marjanen
Hi kn, it would help to provide a code (model, controller, view) and a description of what you want it to do. Ykä On Wednesday, August 21, 2013 7:05:19 PM UTC+3, kn wrote: hi, am new to web2py and i have been struggling to use it, could anyone help me on how to make it work as in what

[web2py] Re: An architectural strategy for a website - I'd like comments

2013-08-17 Thread Ykä Marjanen
wrote: On Friday, 16 August 2013 06:58:49 UTC-5, Ykä Marjanen wrote: I read about cached select a bit more. So basically I could cache especially the queries that are non user dependent (e.g. when calculating all participant rankings) and the query would be cached to all session. Right

Re: [web2py] Re: Pass python list back to controller

2013-08-16 Thread Ykä Marjanen
to copy url and send it by email to colleague... :) Richard On Thu, Aug 8, 2013 at 5:24 PM, Kyle Flanagan kylefl...@gmail.comjavascript: wrote: This worked well. Thanks. On Thursday, July 18, 2013 11:18:23 AM UTC-5, Ykä Marjanen wrote: Hi, If I understood correctly, you could

[web2py] An architectural strategy for a website - I'd like comments

2013-08-16 Thread Ykä Marjanen
Hi, After learning Python and web2py deeper, I've restructured my web2py application so that all functions and data are now in classes with lazy methods in my own module. The lazy property class turns any method into a cached attribute, thus I can make a db query that returns rows and if it

[web2py] Re: An architectural strategy for a website - I'd like comments

2013-08-16 Thread Ykä Marjanen
your zillions participant when you'll grow big. On Friday, August 16, 2013 10:25:32 AM UTC+2, Ykä Marjanen wrote: Hi, After learning Python and web2py deeper, I've restructured my web2py application so that all functions and data are now in classes with lazy methods in my own module

[web2py] Re: An architectural strategy for a website - I'd like comments

2013-08-16 Thread Ykä Marjanen
() with cache, possibly exploiting memcache or redis to do the hard job. Don't take this the wrong way, the cached_property is a neat trick, it's just not that suitable for storing your zillions participant when you'll grow big. On Friday, August 16, 2013 10:25:32 AM UTC+2, Ykä Marjanen wrote: Hi

[web2py] offtopic : beautiful code

2013-07-23 Thread Ykä Marjanen
I've watched this at least 10 times. Definately would recommend all web2py developers to watch and learn from this. Ykä -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send

[web2py] Re: Pass python list back to controller

2013-07-18 Thread Ykä Marjanen
Hi, If I understood correctly, you could use 'session' to save the list, so you don't have to pass it back and forth to the controller. E.g. session.serials = [] and then session.serials.append(x) Ykä On Thursday, July 18, 2013 6:55:52 PM UTC+3, Kyle Flanagan wrote: What's the best way to

[web2py] Re: Filling form in multiple phases with some data from database and some from a dictionary

2013-06-15 Thread Ykä Marjanen
(four phases) I add them all to a one dictionary to add it to database: db.campaign.insert(**db_data). It seems to work okay. On Thursday, June 13, 2013 11:55:08 AM UTC+3, Ykä Marjanen wrote: Hi, I've been programming Python for 10 years now, mainly algorithms. I found out about Web2py 4

[web2py] Filling form in multiple phases with some data from database and some from a dictionary

2013-06-13 Thread Ykä Marjanen
Hi, I've been programming Python for 10 years now, mainly algorithms. I found out about Web2py 4 months ago, and have been intensively learning it since. So thanks for all contributors! I'm developing a web interface where a user can create a new idea campaign. Because the campaign has lots