[web2py] Best practice regarding applications

2017-09-01 Thread Najtsirk
Hello, after a long years of active use of web2py it came to me that probably I am not doing it as it should! :) So within one web2py i have several applications and each one is acctualy a separate site ona a different domain. Is this best pracitce or should i have one web2py instance for ever

[web2py] best practice for create table base on user insert

2017-07-25 Thread 黄祥
let say i have table that will create a new table base on user input on that table *e.g.* *models/db_schema_1_chart_of_account.py* def __after_insert_chart_of_account(f, id): name = f['name'] table_name = name.replace(' ','_').lower() filename = os.path.join(request.folder, 'models', 'db_schema_3_

[web2py] Best practice to check for raw_args

2016-12-30 Thread LoveWeb2py
Hello, I'm wondering if it's better to check for raw_args inside of the controller or in the view and then call another controller based on that. For example: I have: http://127.0.0.1:8000/application/controller/view which returns a SQLFORM.Grid Inside of the grid I now have clickable link

[web2py] best practice for internal function

2015-05-13 Thread Alex
Hi, sometimes I need a function which I only use in one controller (file) and nowhere else (e.g. a function for form validation). Are there any recommendations where I could/should put those functions? Previously I put them in a model file but this is probably not optimal since the model file

Re: [web2py] Best practice for a development environment together with a live environment

2014-02-10 Thread Vinicius Assef
Probably you're talking about continuous delivery, right? But you'll always need a deploy process, to face database versioning and external libraries install or web/rdbms server restarts. Synchronizing "on the fly" is a risky process and I wouldn't recommend you doing so. On Mon, Feb 10, 2014 at

[web2py] Best practice for a development environment together with a live environment

2014-02-10 Thread Robin Manoli
Hey, I'm working on developing projects that will have live releases. In other words, I want to be able to develop my app calmly on a dev version, and once I'm done with that I want to synchronize it with the live version which is open to the public. I'm using two separate mysql databases for t

[web2py] Best practice when making downloads more private.

2013-11-09 Thread Encompass solutions
I need a way to make downloads private/one time for the user. What is the best practice for this? * Should I need a special download script? My guess is yes. * Should I have a special directory and how would I best do that? * Is there a way to create one time downloads without authentication? Some

[web2py] best practice for migrating wiki pages, tags, and media between repositories?

2013-02-05 Thread Michael Beller
I'm developing locally and using Git to manage and push updates to my server (pythonganywhere) via github. I've excluded databases in gitignore but need to migrate the wiki tables. I think I could add !databases/*wiki* to the gitignore for the sqlite tables but I'm thinking ahead when I plan to

[web2py] Best practice for prepopulating regular form

2012-10-31 Thread MichaelF
I have a 'regular' form (i.e., FORM, not SQLFORM). I want to prepopulate some of the fields, but I don't know the values to use for them when I first create the form. What's the best practice for populating field 'subject'? Is it using the 'element' function? For example: form = FORM( FIELD

[web2py] Best practice using scheduler as a task queue?

2012-06-12 Thread Michael Toomim
Here's a common scenario. I'm looking for the best implementation using the scheduler. I want to support a set of background tasks (task1, task2...), where each task: • processes a queue of items • waits a few seconds It's safe to have task1 and task2 running in parallel, but I cannot have

Re: [web2py] best practice: subclassing Auth

2011-11-30 Thread pbreit
OK, I think that probably requires subclassing. I subclassed once for customizing the navbar but ended up just creating my own navbar independent of auth. I don't recall it being too bad.

Re: [web2py] best practice: subclassing Auth

2011-11-30 Thread Carlos Hanson
Good question. I want to override retrieve_username(). Of course, I expect I'll eventually want to override any of the methods exposed by Auth. If there is another way, I would prefer it.While subclassing is easy, it may be overkill.

Re: [web2py] best practice: subclassing Auth

2011-11-30 Thread pbreit
Also, what do you need to do exactly? There are some customizations available that don't require sub-classing.

Re: [web2py] best practice: subclassing Auth

2011-11-30 Thread Carlos Hanson
Thanks. Modules is actually where I started to put it last night, but decided I should ask the question, since I really want to learn web2py well.

Re: [web2py] best practice: subclassing Auth

2011-11-30 Thread Bruno Rocha
Dont do it in models, do in /modules in modules/myauth.py from gluon.tools import Auth form gluon import * class MyAuth(Auth): def __init__(self): #do whatever you want here Auth.__init__(self) in any place of app (model, controller) from myauth import MyAuth auth = MyAuth(

[web2py] best practice: subclassing Auth

2011-11-30 Thread Carlos Hanson
Chapter 8 says, "All of the methods above can be extended or replaced by subclassing Auth." However, it does not give the best place to add the code to do so. There is mention of adding to your model, but I'm a little unclear about that too. It seems that the models are imported in order, since

[web2py] Best practice of organizing/present static pages

2011-10-28 Thread YesYesYes++
Dear All, I'm developing a website for introduction of something. In this case there is quite a lot of static contents (img+text) spreading over several pages, like: Home |-Introduction 1 ||-page 1 ||-page 2 ||- |-Int

[web2py] Re: web2py - Best Practice

2011-09-15 Thread Daniel Aguayo
maybe we could add to this project: http://pyforum.org (afaik author is also in this forum :))

[web2py] Re: web2py - Best Practice

2011-09-15 Thread pbreit
How about a PHPBB/Vbulletin clone...but better?

[web2py] Re: web2py - Best Practice

2011-09-15 Thread nic
I apologise to the group that I have not been able to pursue this over the past few weeks. My idea to get the ball rolling was to try and create a google groups like 'forum' on gae or fluxflex using the comments widget from the plugin_wiki as a base. (Whilst it would be easy to just start a ne

[web2py] Re: web2py - Best Practice

2011-07-16 Thread Anthony
In addition to full applications, we should also consider building plugin functionality that would be widely useful. Two things that come to mind: - Full-text search abstraction layer -- something that could potentially work with multiple search backends, similar to http://haystacksearch.o

Re: [web2py] Re: web2py - Best Practice

2011-07-13 Thread Nicolas Palumbo
I like this as well! On Wed, Jul 13, 2011 at 10:54 PM, nic wrote: > Great !!! > Looks like there is some interest. > Thanks for all the comments. > I totally agree "it's important to figure out what the compelling use > case is for them, and how the necessary thousands of developer hours > are go

[web2py] Re: web2py - Best Practice

2011-07-13 Thread nic
Great !!! Looks like there is some interest. Thanks for all the comments. I totally agree "it's important to figure out what the compelling use case is for them, and how the necessary thousands of developer hours are going to get committed and coordinated to make it happen" Unless someone has a be

[web2py] Re: web2py - Best Practice

2011-07-13 Thread pbreit
I think this is a worthwhile aspiration but I suspect we will only get there organically. The problem with some of those categories is that there are multiple good solutions that make it difficult to decide to use a probably inferior solution. I was beginning to create a generic shopping cart

Re: [web2py] web2py - Best Practice

2011-07-13 Thread Michele Comitini
Martin, i totally agree with your analysis. We need to make easier code sharing with a well defined interface to extend the core. Mic Il giorno 13/lug/2011 17:32, "Martín Mulone" ha scritto: > Is what I want to achieve in powerpack, but now I'm reworking it in > boilerplate https://bitbucket.o

Re: [web2py] web2py - Best Practice

2011-07-13 Thread Jonathan Lundell
On Jul 12, 2011, at 10:45 PM, nic wrote: > > Things like: > > A Wiki / Blog / CMS / Forum > An Online Store > A Personal Accounting System > A Media Center > etc ... > > The focus would be on producing complete usable and beautiful > applications. That's a very ambitious goal. I use, for a coup

Re: [web2py] web2py - Best Practice

2011-07-13 Thread Martín Mulone
Is what I want to achieve in powerpack, but now I'm reworking it in boilerplate https://bitbucket.org/mulonemartin/web2pyboilerplate/src . Nic you are right, web2py fit perfect for starter or as education platform, althought myself I use to teach some web programming to others. But in the next leve

Re: [web2py] Re: web2py - Best Practice

2011-07-13 Thread Ismael Alejandro
+1 On Wed, Jul 13, 2011 at 7:37 AM, newnomad wrote: > > > On Jul 13, 1:05 pm, Marin Pranjic wrote: > > On Wed, Jul 13, 2011 at 7:45 AM, nic wrote: > > > > > A Wiki / Blog / CMS / Forum > > > An Online Store > > > A Personal Accounting System > > > A Media Center > > > etc ... > > > > This is g

[web2py] Re: web2py - Best Practice

2011-07-13 Thread newnomad
On Jul 13, 1:05 pm, Marin Pranjic wrote: > On Wed, Jul 13, 2011 at 7:45 AM, nic wrote: > > > A Wiki / Blog / CMS / Forum > > An Online Store > > A Personal Accounting System > > A Media Center > > etc ... > > This is great idea, I had it few months ago, but never wrote it here. > Next week I'll

Re: [web2py] web2py - Best Practice

2011-07-13 Thread Marin Pranjic
On Wed, Jul 13, 2011 at 7:45 AM, nic wrote: > > A Wiki / Blog / CMS / Forum > An Online Store > A Personal Accounting System > A Media Center > etc ... > This is great idea, I had it few months ago, but never wrote it here. Next week I'll start programming a Forum software (with web2py ofc). Mai

Re: [web2py] web2py - Best Practice

2011-07-13 Thread Miguel Lopes
Let me add the advantage that the initiative stimulates focuses contribution and supplies a platform for learning. Some people may not wish, have the time or expertise to get involved with the development of the web2py framework. This sort of initiative supplies a narrower ground for contribution

Re: [web2py] Re: web2py - Best Practice

2011-07-13 Thread Kenneth Lundström
On 13.7.2011 10:23, cjrh wrote: On Wednesday, July 13, 2011 7:45:18 AM UTC+2, nic wrote: A Wiki / Blog / CMS / Forum An Online Store A Personal Accounting System A Media Center etc ... How about an issue tracker? We're currently using Redmine, and it's really clunky and

[web2py] Re: web2py - Best Practice

2011-07-13 Thread cjrh
On Wednesday, July 13, 2011 7:45:18 AM UTC+2, nic wrote: > > A Wiki / Blog / CMS / Forum > An Online Store > A Personal Accounting System > A Media Center > etc ... > How about an issue tracker? We're currently using Redmine, and it's really clunky and features very high memory consumption

Re: [web2py] Re: web2py - Best Practice

2011-07-13 Thread steve van christie
like this, +1

[web2py] Re: web2py - Best Practice

2011-07-12 Thread Massimo Di Pierro
I am all for this! Massimo On Jul 13, 12:45 am, nic wrote: > Dear friends, > > I am a huge web2py fan and would like to propose an idea to the > community. > > I understand that web2py is a development environment and has it’s > roots as an educational platform. One of the things that I have > p

Re: [web2py] web2py - Best Practice

2011-07-12 Thread Manuele Pesenti
On 13/07/2011 07:45, nic wrote: Dear friends, [...] I would like to propose that we develop a suite of products (open source of course) based on the best practices of web2py that would be: +1 :) Manuele

[web2py] web2py - Best Practice

2011-07-12 Thread nic
Dear friends, I am a huge web2py fan and would like to propose an idea to the community. I understand that web2py is a development environment and has it’s roots as an educational platform. One of the things that I have personally found most useful are the free appliances. However as web2py has m

[web2py] Best practice for inserting possible duplicates?

2011-07-02 Thread Nick Arnett
Getting more comfortable with Web2Py and there sure is a lot to like about it. I'm wondering what is considered best practice for inserting records that might already exist, when I also want to get the id of the record if it does exist. I haven't come across a shortcut for this. For now, I'm usi

[web2py] Best practice to start background process

2011-04-27 Thread teemu
Hi, I would like to know what would be the best way to start background process in production environment. I have implemented background process by using the web2py book chapter as a template ("http:// www.web2py.com/book/default/chapter/04#Background-Processes-and-Task-Queues"). I start backgroun

[web2py] Best practice

2011-03-17 Thread Dave Warnock
Hi, I am new to web2py and am developing a GPL application which I plan to deploy in Google App Engine. >From my reading there appear to be at least 4 ways of building the web pages to maintain the application data: - writing individual controllers and views - using the CRUD tools - using the Wi

[web2py] Re: What is web2py best practice basis for modular site development?

2011-01-28 Thread kenji4569
I am developing a website with many features required my client, using web2py. So, I'd also like to see the best practice for modular site development. In my development, I made two applications for a website, one is for front, and the other is for admin site. And I think it worked well, though ob

[web2py] Re: What is web2py best practice basis for modular site development?

2011-01-28 Thread kenji4569
I am developing a website with many features required my client, using web2py. So, I'd also like to see the best practice for modular site development. In my development, I made two applications for a website, one is for front, and the other is for admin site. And I think it worked well, though ob

Re: [web2py] What is web2py best practice basis for modular site development?

2011-01-27 Thread Kenneth Lundström
My gut tells one application, having applications share layout, database and all is not piece of cake. But I guess it depends on the application, but I would make it as one application. Kenneth Dear web2py users, I am developing a website that will have many features, some of which are no

[web2py] What is web2py best practice basis for modular site development?

2011-01-27 Thread JoeCodeswell
Dear web2py users, I am developing a website that will have many features, some of which are not yet specified by my client. Therefore and for other reasons, I would like to develop it in a modular fashion. Should I base my website on a web2py site with a single application, with modularity achie

Re: [web2py] Best practice for including python libraries with my app

2011-01-15 Thread Arun K.Rajeevan
I use site-packages directory to put external libraries. Because, I tried gdata (google data ) library to put in app modules folder. But it breaks on import, because, gdata module has no knowledge of local_import() and since they try to do imports with usual way, it'll break. So, for complex lib

Re: [web2py] Best practice for including python libraries with my app

2011-01-13 Thread Jonathan Lundell
On Jan 13, 2011, at 11:49 AM, Lorin Rivers wrote: > > That's exactly the kind of user experience I want to avoid. You could put a copy in web2py's site-packages, though it'd have to be the right version for the environment (or at least a compatible version). You could put it in your app's modul

Re: [web2py] Best practice for including python libraries with my app

2011-01-13 Thread Anthony
And for details, check out: http://web2py.com/book/default/chapter/04#Third-Party-Modules On Thursday, January 13, 2011 2:52:50 PM UTC-5, rochacbruno wrote: > Put your libraries under app/modules an use local_import() > > Bruno Rocha > http://about.me/rochacbruno/bio > > > 2011/1/13 Lorin Riv

Re: [web2py] Best practice for including python libraries with my app

2011-01-13 Thread Bruno Rocha
Put your libraries under app/modules an use local_import() Bruno Rocha http://about.me/rochacbruno/bio 2011/1/13 Lorin Rivers > That's exactly the kind of user experience I want to avoid. > > > On Jan 13, 2011, at 13:34 , Alexandre Andrade wrote: > > > try to import, and if fails, generate mes

Re: [web2py] Best practice for including python libraries with my app

2011-01-13 Thread Lorin Rivers
That's exactly the kind of user experience I want to avoid. On Jan 13, 2011, at 13:34 , Alexandre Andrade wrote: > try to import, and if fails, generate message to user to install it on the > system > > > Alexandre Andrade > Hipercenter.com Classificados Gratuitos e Inteligentes > > > > 201

Re: [web2py] Best practice for including python libraries with my app

2011-01-13 Thread Alexandre Andrade
try to import, and if fails, generate message to user to install it on the system Alexandre Andrade Hipercenter.com Classificados Gratuitos e Inteligentes 2011/1/13 Lorin Rivers > I am using tabular (which requires > numpy), as well as psycopg2 and a numb

[web2py] Best practice for including python libraries with my app

2011-01-13 Thread Lorin Rivers
I am using tabular (which requires numpy), as well as psycopg2 and a number of other libraries. The default location for such things is one of the local site-packages directories, which of course, doesn't migrate to another machine automagically. What's the

[web2py] Best practice: swapping between different layout.html files within a single application

2010-10-21 Thread cjrh
Hi I have a different layout.html file for each of several different users, but I need to select and use the right one, depending on on the user. What is best practice for doing that?Which bit of what must be substituted where?

[web2py] Best practice for removing link to active page from menu?

2010-08-03 Thread mwolfe02
I wrote this simple website using Django (http:// www.heberlings.com/). As part of the navigation, I wanted to turn off the link for the currently active page. If you visit the site and click on a couple of the menu items on the left side of the page, you will see what I mean. To implement this

[web2py] best practice for an upload with a very long file name

2010-04-19 Thread Rowdy
Greetings, I am (still) using 1.76.5, running under Ubuntu 7.10. During file upload (whether from a form or as part of a cron job that extract files attached to emails) I am finding that some long filenames are causing the store() function to choke: Traceback (most recent call last): File "ap

[web2py] Best practice for logging w/ wsgi?

2010-04-07 Thread Michael Toomim
Now that I'm on apache, I find that the logging library iceberg wrote no longer works: http://groups.google.com/group/web2py/browse_thread/thread/ae37920ce03ba165/6e5d746f6222f70a I suspect this is because of the stdout/stderr problem with wsgi, but I thought that would only affect print statemen