Hi all,
This is a request for ideas on good code organization for my application.
I've been reading up on the preferred organization for web2py as well as
typical REST HTTP conventions, and I'm trying to use some ideas of both
where they make sense.
If I understand correctly, web2py takes more
Are got it.
thankyou
On Sat, Aug 8, 2015 at 9:58 AM, 黄祥 wrote:
> e.g.
> *private/appconfig.ini*
> [smtp]
> server = smtp.gmail.com:587
> sender = em...@gmail.com
> login = email:password
>
> *models/db.py*
> from gluon.tools import Auth, Crud, Service, PluginManager, prettydate
> auth = Auth(d
thanks for the great job massimo and team!!
Is bootstrap 3 + as default?
On Friday, August 7, 2015 at 11:59:13 AM UTC-5, Massimo Di Pierro wrote:
>
> Changelog:
>
> - security fix: Validate for open redirect everywhere, not just in login()
>
> - allow to pack invidual apps and selected files as p
e.g.
*private/appconfig.ini*
[smtp]
server = smtp.gmail.com:587
sender = em...@gmail.com
login = email:password
*models/db.py*
from gluon.tools import Auth, Crud, Service, PluginManager, prettydate
auth = Auth(db)
mail = auth.settings.mailer
mail.settings.server = 'logging' if request.is_local
I have looked at that but still cant figure out, do you have example
cheers
tony
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this mess
How is request.vars.table being set? For that to work, presumably you would
need "?table=some_table" in the query string of the URL used to access the
grid.
Anthony
On Friday, August 7, 2015 at 6:27:52 PM UTC-4, ESRA GÜÇLÜ wrote:
>
>
> Hi ,
> I'm pretty new to web2py, I'm developing a project f
Hi ,
I'm pretty new to web2py, I'm developing a project for my internship and i
have a problem.
My program gets a choice from user and according to the choice it shows db
table on the SQLFORM.grid.
SQLFORM.grid is displaying but the user cannot add new record or delete or
update. This is my co
Hi,
I this default.py
import os
import sys
def nslookup():
form = SQLFORM.factory(Field('hostname',
label='Please enter a valid HOSTNAME to
resolve:',
requires=IS_NOT_EMPTY()))
if form.process().accepted:
response
Ne because it iI do not know for sure that is a bug in web2py.
On Friday, 7 August 2015 14:14:18 UTC-5, ermolaev.icrea...@gmail.com wrote:
>
> pickled.HIGHPROTOCOL - fixed?
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source cod
Oh right, the point was the point ...
now it works fine with:
open('test.csv', 'wb').write(str(db(db.person.id).select()))
thanks a lot
Am Freitag, 7. August 2015 20:39:32 UTC+2 schrieb forum...@gmail.com:
>
> He group,
>
> i create serial letters with web2py and pdfLatex. It works fine with
I assume that's not the actual code, as there is a syntax error (no "."
before the "write"). Also, you appear to be doing the same thing twice --
first using str() to convert the Rows to CSV, and then using the
export_to_csv_file method. As detailed in the book, those methods are the
same -- ju
Ok, i change the code but i get an error:
@auth.requires_login()
def create_csv():
from gluon.contenttype import contenttype
import os
response.headers['Content-
Type'] = contenttype('.csv')
response.headers['Content-disposition'] = 'attachment;
filename=%s_database.csv' % (
pickled.HIGHPROTOCOL - fixed?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"
See
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#CSV--one-Table-at-a-time-.
No need for StringIO -- just create an open file and pass it to the export
method (then close the file).
Anthony
On Friday, August 7, 2015 at 2:39:32 PM UTC-4, forumweb...@gmail.com wro
>
> To *store sessions in cookies* instead you can do:
>
> session.connect(request,response,cookie_key='yoursecret',compression_level=None)
I do that - but folders continue to created in app/sessions
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.co
He group,
i create serial letters with web2py and pdfLatex. It works fine with a
static csv-file in private folder.
But i want to create the csv and save directly to the folder. No Download!
I create the csv ... no Problem:
@auth.requires_login()
def create_csv():
from gluon.contenttype i
python web2py.py -i 0.0.0.0 -p 80
will use any IP address you have and port 80. Your OS may block port 80 so
be careful.
On Thursday, 6 August 2015 21:57:27 UTC-5, Zhihong Zeng wrote:
>
> Hello,
>
> I just start using web2py, and get the following questions:
>
> 1) Based on my experience on apa
On Friday, August 7, 2015 at 12:18:12 PM UTC-4, Luis Valladares wrote:
>
> Thanks Anthony! using the option helper and returning without the
> dictionary solved my issue, there is other errors on the javascript but i
> already solved it, now works well, one more question: There is no built-in
>
See answer here: http://stackoverflow.com/a/31882961/440323
Unless you need the file-listing functionality of Expose, don't bother with
it -- instead just use response.stream (even if you do need Expose for
listing the files, you can still use response.stream to do the individual
file serving).
Changelog:
- security fix: Validate for open redirect everywhere, not just in login()
- allow to pack invidual apps and selected files as packed exe files
- allow bulk user registration with default bulk_register_enabled=False
- allow unsorted multiword query in grid search
- better MongoDB su
yes. re-posting.
On Friday, 7 August 2015 09:17:05 UTC-5, Jack Kuan wrote:
>
> surely you meant 2.12.1 ?
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
Thanks Anthony! using the option helper and returning without the
dictionary solved my issue, there is other errors on the javascript but i
already solved it, now works well, one more question: There is no built-in
function that creates a dropdown list from a DAL select?
El viernes, 7 de agosto
If your function returns a dictionary, web2py assumes you want to execute a
view. If you haven't created a view, it will use generic.html (by default,
this only works for local requests). If you just want to return the raw
HTML generated in the controller without then executing a view, then just
Thanks Stifan,
I don't have any code, but just type this into the shell:
from gluon.contrib.populate import populate
populate(db.auth_user,10)
but you have shown me another way I can do it.
On Friday, August 7, 2015 at 12:48:41 AM UTC-7, 黄祥 wrote:
>
> IntegrityError: FOREIGN KEY constraint fail
It is a Method Field,
Field.Method('do_someting', . )
On Thursday, August 6, 2015 at 10:55:22 PM UTC-4, Massimo Di Pierro wrote:
>
> what is out.dog.do_something()?
> Is it an example of a VirtualMethod?
>
> On Thursday, 6 August 2015 16:36:13 UTC-5, Umpei Kurokawa wrote:
>>
>> I'm having p
Hello!
I've a form where i store country, state and municipality and i need to
dynamcally change the value based on the select, i mean: If i select a X
country i need to display only the states of the country "X" in the states
dropdown, the same with municipality
I used a basic approach that i
surely you meant 2.12.1 ?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2
Should it looks like
http_response.headers['Content-Length'] = int(request.env.content_length)
?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You re
Hi there.
Web2py has some cool field types called "list:string", "list:integer" and
"list:reference table". Check them here:
http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-types
In your case, you could avoid the creation of the third table with
*list:refer
perhaps you can use request.env.content_length
ref:
http://web2py.com/books/default/chapter/29/04/the-core#request
best regards,
stifan
On Friday, August 7, 2015 at 3:14:18 PM UTC+7, Alehandro Ramoz Rodrigez
wrote:
>
> My application should respond to remote application request with data from
>
My application should respond to remote application request with data from
attached file.
By default web2py has "Transfer-Encoding: Chunked" parameter and for some
reason remote app can get only
first string from file, so I need to use "Content-Length" parameter that
set to file bytes size.
My c
Hello,
I realize this is a bit of an old thread, but I figured I'd post an answer
anyway as I came up with this same problem recently.
For development, sometimes I create static sites before I get into the
dynamic interaction.
I handled this case with a simple routes.py in the "web2py folder"
perhaps you can use random
ref:
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#orderby--groupby--limitby--distinct--having-orderby_on_limitby-left-cache
https://groups.google.com/forum/#!topic/web2py/-Y2JL2cIQEI
best regards,
stifan
On Thursday, August 6, 2015 at 4:1
IntegrityError: FOREIGN KEY constraint failed ?
perhaps you modify auth_user table, could you show some code.
no, i don't use populate, i insert it manually.
e.g.
controllers/install.py
# -*- coding: utf-8 -*-
# index
def index():
if db(db.auth_permission).isempty() and db(db.auth_membership).ise
please take a look at the book :
http://web2py.com/books/default/chapter/29/08/emails-and-sms
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Iss
Changelog:
- security fix: Validate for open redirect everywhere, not just in login()
- allow to pack invidual apps and selected files as packed exe files
- allow bulk user registration with default bulk_register_enabled=False
- allow unsorted multiword query in grid search
- better MongoDB su
Hi All,
I have a app where I records sales, but I want to email different part of
the sale to different people eg the person I brought only need to know what
I item and how much, then another person needs to know how many and the
item and how much.
I can get this by using a post,but I cant wor
37 matches
Mail list logo