Re: [web2py] A friend has developed a flask application and now wants to add a login and security. I would like to know if it would be feasible to convert the flask application to web2py.

2021-10-05 Thread 'Walter Okine' via web2py-users
I also agree that py4web would give much better performance. Web2py is easy so i dont think your friend will face much problem converting the application to web2py. I have converted an app I wrote in flask to web2py and was able to do so. The actual conversion i.e. database, html, css was a

[web2py] custom user registration

2018-01-06 Thread Walter Okine
i have disable registration i have registered two admin. and added extra fields company_name and status I want these two admin to be able to register others and pass the company_name to each user they register Example Admin 1 company is xyz so when he register other users their company_name

[web2py] Re: Another online store based in web2py+ractive+stripe

2015-07-17 Thread Walter Munguia
I should be able to see My orders? I have: Not Authorized Privilegios insuficientes El martes, 14 de julio de 2015, 11:44:29 (UTC-5), Massimo Di Pierro escribió: I made another simple online store: https://github.com/mdipierro/estore3 Can you help me test, suggest improvement, add

[web2py] web2py populate foreign key constraint error

2014-05-01 Thread Walter Okine
i am using the web development with python and web2py part2 video, creating a reddit_clone. When i use the web2py database populate command to add fields to comm table i get a foreign key constraint from this line Field('parent_comm','reference comm'), when Field('parent_comm','reference

[web2py] Re: How to get request

2011-02-05 Thread walter
Where can I find a description of the framework, or UML diagrams? I'm not quite clear about its architecture. On 5 фев, 03:25, Jonathan Lundell jlund...@pobox.com wrote: On Feb 4, 2011, at 2:28 PM, walter wrote: I define a decorator into the modules folder and try get request.args. How

[web2py] How to get request

2011-02-04 Thread walter
I define a decorator into the modules folder and try get request.args. How to do correct import of request and use it in my decorator? I try something like this: env = globals() args = env.request.args

[web2py] Redirect after GAE authorization.

2011-02-03 Thread walter
I'm using GAE. Is there a possibility to perform a redirect back to a page where I have come to perform authentication?

[web2py] Re: Redirect after GAE authorization.

2011-02-03 Thread walter
My previous post has look ambiguous enough. I use GAE to run my web2py application.

[web2py] Some troubles with trailing slash

2011-02-02 Thread walter
When I do next in the action: def check(): if request.args(1) == None: table = request.args(0) return dict(table=table) And my url has a trailing slash after a function argument (i.e. applictation/controller/function/argument/) I catch an internal error everytime. I confused.

[web2py] Re: Some troubles with trailing slash

2011-02-02 Thread walter
Many thanks. I've understood where is my error.

[web2py] CRUD, Auth, doctest

2011-01-31 Thread walter
I try to use CRUD. Below my code sample. if request.args(1) == None: form=crud.create(db[request.args(0)]) else: form=crud.update(db[request.args(0)],request.args(1)) return dict(form=form) I whant to test my code, but everytime I get next: Failed example: try: edit()

[web2py] Re: CRUD, Auth, doctest

2011-01-31 Thread walter
P.S. My test code strongly elementary assert(edit()['form'] != None) True try: ... edit() ... except HTTP, http: print http.headers, session.auth My code has shown above.

[web2py] Re: CRUD, Auth, doctest

2011-01-31 Thread walter
My solution lies below, but I think it not quite elegant. def edit(): ''' request.args.append('news') request.args.append(None) request.extension = 'html' from gluon.storage import Storage user = dict(reset_password_key='', ...

[web2py] web2pythonic way

2011-01-29 Thread walter
I have to create several decorators for controllers. They needs only for particular application. Where should I place them? In the modules or in the models or in the site-packages? What way is more web2pythonic?

[web2py] Re: web2pythonic way

2011-01-29 Thread walter
Is there something like PEP for web2py?

[web2py] Test controller again

2011-01-27 Thread walter
Excuse me. May be I'm stupid, but I don't understand how to test next case. I want to test that a response.status really has 303. Bit of my code: def show(): if request.args(0) == None: redirect(URL('index')) How should I write a doctest for this?

[web2py] Troubles with index action

2011-01-27 Thread walter
This is my code. I specifically made it so primitive. def index(): ''' db.news.insert(title=Test, body=Test-test) ''' return dict(table=news) Next code is my db: db.define_table('news', Field('title'), Field('body', 'text'), Field('created_at',

[web2py] Re: Troubles with index action

2011-01-27 Thread walter
Many thanks

[web2py] Common value for all application pages

2011-01-26 Thread walter
I want to set common value for all pages. If do it manually, that is, the probability of error, if I forget to do it. Is there any option to regular automatically add some value to the dictionary returned by the controller?

[web2py] Re: Common value for all application pages

2011-01-26 Thread walter
This value lives in my file in the modules folder.

[web2py] Re: Common value for all application pages

2011-01-26 Thread walter
Into the modules folder I created file (call it myfile.py for example). Into this file there is a variable title. This variable contains value that is common for all pages of my application. If import var = local_import('myfile') and return dict(var=var) all be OK. But with many controllers I'll

[web2py] Re: Common value for all application pages

2011-01-26 Thread walter
I want to create a unified view file for multiple application. I plan to use it with the different design templates. On 26 янв, 21:06, Anthony abasta...@gmail.com wrote: On Wednesday, January 26, 2011 12:56:56 PM UTC-5, rochacbruno wrote: Also, Walter, I don't know what your variable

[web2py] Middleware code

2011-01-22 Thread walter
Where can I placed my middleware code that is common for the different controllers and would used by them?

[web2py] Re: Middleware code

2011-01-22 Thread walter
In the model? Really? It's curiously enough. I have thought I should to create file with my code and place it in a certain, according to the specification, place.

[web2py] Re: Middleware code

2011-01-22 Thread walter
It is the web2py/site-packages. OK! Many thanks.

[web2py] Change URL

2011-01-20 Thread walter
Is there possibility to change the standard URL of the form http://my_site.net/application/default/action to something like http://my_site.net/default/action?

[web2py] DRY conception

2011-01-18 Thread walter
I have two controllers which differ only a database table title. For example: default/persons/index persons = db(db.person).select() return dict(persons=persons) default/trips/index trips = db(db.trip).select() return dict(trips=trips) How implement DRY conception in this case?

[web2py] Re: DRY conception

2011-01-18 Thread walter
but the problem is that you have two controllers. Perhaps you should have only one. I have thought about it. Unfortunately, I need sometimes show all our customers but at the next time I need view all them trips. I would be glad to do merge two controllers into the one. But I cannot figure out

[web2py] Shell controllers views

2011-01-18 Thread walter
Question about a shell. Can I interact to controllers and views as easy as a DB? If it is true, how?

[web2py] Test controller

2011-01-15 Thread walter
This is my code def index(): form = SQLFORM(db.article) if form.accepts(request.vars): response.flash = Статья добавлена articles = db().select(db.article.ALL) return dict(articles=articles, form=form) I can't understand how to test index? How to test articles value for example?

[web2py] Re: Test controller

2011-01-15 Thread walter
I have another one question. How to interact with controller in shell?

[web2py] web2py permissions

2011-01-05 Thread walter
I want to ask what folders should be accessible for writing? Which folders should be set to permissions 644? Who must to be owner all folders and files?

[web2py] Re: web2py+FastCGI

2011-01-05 Thread walter
I have not asked the previous question correctly. I wanted to ask what folders should be accessible for writing and for which permission must be set to 644? Who must to be owner all folders?

[web2py] Re: web2py permissions

2011-01-05 Thread walter
Where can I read more detailed about it? Is there it in the web2py book?

[web2py] web2py+FastCGI

2011-01-04 Thread walter
I have used the http://web2pyslices.com/main/slices/take_slice/76 as an example. But when I try to call the http://w2p.edu/welcome/default/ index I get a page with the next text: Internal error Ticket issued: unknown.

[web2py] Re: web2py+FastCGI

2011-01-04 Thread walter
What permissions should I install? On 4 янв, 16:27, mdipierro mdipie...@cs.depaul.edu wrote: This may be a permission issue as web2py cannot access the file system (either looking the wrong folder or unable to read/write). On Jan 4, 7:21 am, walter wdv...@gmail.com wrote: I have used

[web2py] Templating only on GAE?

2010-08-05 Thread Walter
, including controller AND template engine? Thanks Walter

[web2py] Re: Templating only on GAE?

2010-08-05 Thread Walter
Thank you! On Aug 5, 3:36 am, mdipierro mdipie...@cs.depaul.edu wrote: Yes you can include only the template engine (gluon/template.py). It has a function render that is documented therein. On Aug 4, 10:41 pm, Walter rne...@gmail.com wrote: All, is it (1) possible or (2) advisable to use