pls try:
table.image.uploadfolder = os.path.join(request.folder, '..', '..', '..',
'webapps', 'uploads')
assuming there are folders:
/home/web2py/applications/adminmod
/home/webapps/uploads
according to your path, i think it just a little adjustment of parent
folder ,'..', '..'
best regards,
Lately i am experiencing this error:
* decorator() takes exactly 1 argument (0
given)* but i do not understand what it stems from, here is the controller
below:
def Company_Update():
details=db(db.company).select(db.company.ALL)
details2=db(db.company).select(db.company.ALL)
for dtls
I've done this with a table with a year as its id:
idb.define_table(
'next_id',
Field('year', 'id'),
Field('next', 'integer'),
)
def get_next_id(year):
record = idb.next_id(year)
if not record:
# Auto add new years
idb.next_id.insert(year=year, next=1)
Greetings,
I have defined a table referencing auth_user, but i want on the web form
select box to only bring users belonging to one group,
not showing all the system users.
i am wondering if i should use a lambda function or if there is a way of
adding a condition on a reference field.
E,g
You can put conditions into the field validator:
Field('writer_user', 'string',
requires=IS_IN_DB(
db(
(db.auth_user.id == db.auth_membership.user_id)
& (db.auth_membership.group_id == db.auth_group.id)
& (db.auth_group.role
On Friday, January 12, 2018 at 6:58:33 AM UTC-5, tim.nyb...@conted.ox.ac.uk
wrote:
>
> You can put conditions into the field validator:
>
> Field('writer_user', 'reference auth_user',
> requires=IS_IN_DB(
> db(
> (db.auth_user.id ==
On Friday, January 12, 2018 at 5:31:35 AM UTC-5, mostwanted wrote:
>
> Lately i am experiencing this error:
> * decorator() takes exactly 1 argument (0
> given)* but i do not understand what it stems from, here is the
> controller below:
> def Company_Update():
>
On Friday, January 12, 2018 at 1:10:04 AM UTC-8, Gaël Princivalle wrote:
>
> Hello.
>
> Is it possible to clean an app by script?
>
> Sometimes Web2py don't work anymore because it have too much log/error
> files to manage.
>
> I remember a Massimo post about it but I've don't found it.
>
>
On Friday, January 12, 2018 at 12:07:22 AM UTC-8, Annet wrote:
>
> In web2py I have an init application and an adminmod application
> containing the model, module and static files.
>
> To manage images I have the following code in a function:
>
>
> table.image.uploadfolder =
On Friday, January 12, 2018 at 5:18:30 AM UTC-5, 黄祥 wrote:
>
> pls try:
> table.image.uploadfolder = os.path.join(request.folder, '..', '..', '..',
> 'webapps', 'uploads')
>
Also, unless it needs to be portable to other filesystems where the path
does not start with "/home", you can simplify
i think you can do it with shell script or batch script, create the script
that remove (rm) or move (mv) the logs or error and execute it (manually
(via web2py or terminal), schedully (cron) )
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
In web2py I have an init application and an adminmod application containing
the model, module and static files.
To manage images I have the following code in a function:
table.image.uploadfolder = os.path.join(request.env.applications_parent,
'applications',
Hello.
Is it possible to clean an app by script?
Sometimes Web2py don't work anymore because it have too much log/error
files to manage.
I remember a Massimo post about it but I've don't found it.
Thanks, regards.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
13 matches
Mail list logo