but it
will not work on centos 6 due to differences is these two systems.
On Tuesday, November 11, 2014 12:29:34 PM UTC+1, lesssugar wrote:
Hi, guys, I would like to setup web2py on my CentOS 6.6 and I'm looking
for deployment script, as I'm no expert.
Apache and MySQL is in place, but I'm
On Thursday, November 13, 2014 12:01:13 AM UTC+1, lesssugar wrote:
Does anyone have experience with setting up web2py with Plesk Panel
preinstalled on the server?
I'm using a VPS with one IP, CentOS 6.6. Initially I wanted to setup
Nginx with uWSGI, however Plesk won't work in this configuration
Does anyone have experience with setting up web2py with Plesk Panel
preinstalled on the server?
I'm using a VPS with one IP. Initially I wanted to setup Nginx with uWSGI,
however Plesk won't work in this configuration (it needs Apache). Apache
service could be stopped permanently and web2py
Hi, guys, I would like to setup web2py on my CentOS 6.6 and I'm looking for
deployment script, as I'm no expert.
Apache and MySQL is in place, but I'm looking for relatively painless way
to automatically install web2py, configure mod_wsgi etc.
Any help?
--
Resources:
- http://web2py.com
-
, 2014 5:52:33 PM UTC+2, lesssugar wrote:
I used the following script for the setup:
http://web2py.googlecode.com/hg/scripts/setup-web2py-nginx-uwsgi-centos64.sh
I tried recreating logs folder under /var/www/web2py/, restarting uwsgi
and nginx - unfortunately the error occurs. Do I need to add
that file.
The second step would be to review carefully the configuration ^_^
On Saturday, May 31, 2014 2:30:22 PM UTC+2, lesssugar wrote:
I'm using web2py's nginx + uwsgi + centos configuration and I
accidentally removed web2py/logs folder on my server. Now I get 502 bad
gateway whenever I try
I'm using web2py's ngix + uwsgi + centos configuration and I accidentally
removed web2py/logs folder on my server. Now I get 502 bad gateway
whenever I try to open my page.
nginx error log:
2014/05/31 13:16:50 [crit] 762#0: *1052 connect() to
unix:///var/www/web2py/logs/web2py.socket failed
I'm using IS_LENGTH in my model to validate file size of uploaded image:
IS_LENGTH(2097152, 1, error_message='Max image size: 2MB')
However, the size is being checked after the file's been uploaded, which is
not very user friendly when it comes to files larger than 2MB. How can I
validate the
Boths ways work great. Thanks a lot.
On Saturday, November 30, 2013 7:40:42 AM UTC+1, Massimo Di Pierro wrote:
Or
register_form.element('table').append(TR(...))
On Friday, 29 November 2013 18:34:38 UTC-6, 黄祥 wrote:
please try (not tested) :
register_form[0].insert(-1,TR('',
I use auth.register() to create my registration form. I managed to add
reCaptcha to it, however it's appended after my submit button.
The current code:
register_form[0].append(Recaptcha(request,
'',
'',
options=theme:'white',
Just let my understand it.
I created a basic routes.py file in my web2py/ folder. The whole content is:
default_application = 'myapp'# ordinarily set in base routes.py
default_controller = 'default' # ordinarily set in app-specific routes.py
default_function = 'index' # ordinarily set
Very useul post, Jonathan. And the router works great, thanks.
On Wednesday, November 20, 2013 3:20:22 PM UTC+1, lesssugar wrote:
Just let my understand it.
I created a basic routes.py file in my web2py/ folder. The whole content
is:
default_application = 'myapp'# ordinarily set
I'm trying to use web2py slice to make images thumbnails:
http://www.web2pyslices.com/slice/show/1522/generate-a-thumbnail-that-fits-in-a-box
The script worked fine with web2py 2.4.7. When upgraded to 2.7.4, when I;m
uploading an image, I get this:
* File [path]/PIL/Image.py, line 37, in
:
http://web2py.googlecode.com/hg/scripts/setup-web2py-nginx-uwsgi-centos64.sh
so Nginx 1.4.1 + uWSGI + Web2py.
Am I missing something? I'mkeep getting Ticket issued: unrecoverable in
my admin page.
On Thursday, October 17, 2013 7:11:16 PM UTC+2, lesssugar wrote:
Hi. I put dummy routes.py file
What do you mean?
On Friday, October 18, 2013 1:57:13 PM UTC+2, Andreas Wienes wrote:
What is the best way to change the target of the edit profile
link permanently?
Thanks for your help!
Andreas
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
Hi. I put dummy routes.py file in my web2py/ folder. All there is in this:
routers = dict(
# base router
BASE=dict(
default_application='my_app_name',
),
)
I reload web2py with *touch /etc/uwsgi/web2py.ini *on my server. The
default application route works but when I go
to
Just upgraded to 2.7.4. My LOAD() based component is not displaying,
although it worked in the older version of web2py (2.4.7).
I copied web2py.js from the newest welcome application to my app/static/js/
folder.
What can be wrong?
--
Resources:
- http://web2py.com
- http://web2py.com/book
cached version working. Make sure that your page fetches the
correct web2py.js, then post a simple app to reproduce the issue if the
problem isn't solved.
On Wednesday, October 16, 2013 9:11:14 PM UTC+2, lesssugar wrote:
Just upgraded to 2.7.4. My LOAD() based component is not displaying
On Wednesday, October 16, 2013 9:24:40 PM UTC+2, lesssugar wrote:
Sh*t, it was the cache indeed
Sorry guys. And thanks Niphlod.
On Wednesday, October 16, 2013 9:19:01 PM UTC+2, Niphlod wrote:
to make it short, it should work, and usually peoples reporting this bug
quickly realize
Hi,
I'm planning to bring my app to life. So far, I have followed
one-step-production deployment guides and used this script:
http://web2py.googlecode.com/hg/scripts/setup-web2py-nginx-uwsgi-centos64.sh
All the setup has been completed on my server, now I would like to upload
my application
.
On Monday, October 14, 2013 10:06:53 PM UTC+2, Anthony wrote:
One option is to upload it through the admin interface.
On Monday, October 14, 2013 3:53:43 PM UTC-4, lesssugar wrote:
Hi,
I'm planning to bring my app to life. So far, I have followed
one-step-production deployment guides
away).
Anthony
On Monday, October 14, 2013 4:19:03 PM UTC-4, lesssugar wrote:
Sure, I understand. That's the main question: how do I get to admin or
any other application now?
Let's say I want to display the welcome application. When I run web2py.py
on the server I still get the information
Now, however, I can't get to admin. The password was set during the one
step deployment but I cannot get to admin panel with the pass. Any way to
retrieve it?
On Monday, October 14, 2013 10:56:57 PM UTC+2, lesssugar wrote:
OK, I had apache running and blocking the port. Stopped apache
Nevermind, figured it out.
On Monday, October 14, 2013 11:09:31 PM UTC+2, lesssugar wrote:
Now, however, I can't get to admin. The password was set during the one
step deployment but I cannot get to admin panel with the pass. Any way to
retrieve it?
On Monday, October 14, 2013 10:56:57 PM
UTC-4, lesssugar wrote:
OK, I removed next from auth.change_password(). Now, after submitting,
I'm being redirected to default/index and the default flash message appears.
The thing is I would like to stay on Settings page after changing the
password - hence I tried next. Is there a way
:44 UTC-5, lesssugar wrote:
I'm using auth.change_password() in my profile Settings section. The code
responsible for the form:
change_password = auth.change_password(next=URL('profile', 'settings'))
change_password.update(_class='formstyle', _name='change_password')
return dict
Anthony, it worked. I was staring at this code and didn't see it. Thanks a
lot.
On Sunday, October 13, 2013 3:44:39 PM UTC+2, Anthony wrote:
change_password = auth.change_password(next=URL('profile', 'settings'))
When the password change form is submitted, the above sets session.flash
to
there is something that sets session.flash=None
before redirection or response.flash=None after redirection. Double
redirection may also cause the flash to disappear.
On Sunday, 13 October 2013 08:42:49 UTC-5, lesssugar wrote:
You're right. When I changed the page to redirect after password change
I'm using auth_change_password() in my profile Settings section. The code
responsible for the form:
change_password = auth.change_password(next=URL('seafarer', 'settings'))
change_password.update(_class='formstyle', _name='change_password')
return dict(change_password=change_password)
The
, there is already a default message set (Password changed.),
so if you're not seeing it, something is going wrong. Do you get other
flash messages? Maybe confirm that session.flash is being set.
Anthony
On Saturday, October 12, 2013 5:23:44 PM UTC-4, lesssugar wrote:
I'm using
Did you try using *next* in your login function?
user_auth = auth.login(next=URL('controller_name', 'function_name')
On Friday, October 11, 2013 2:34:35 PM UTC+2, LightOfMooN wrote:
In v 2.7.2 don't work redirects after login and logout.
How to fix it?
четверг, 27 июня 2013 г., 19:36:27
tried.
It works with login, but not with logout.
пятница, 11 октября 2013 г., 22:37:20 UTC+6 пользователь lesssugar написал:
Did you try using *next* in your login function?
user_auth = auth.login(next=URL('controller_name', 'function_name')
On Friday, October 11, 2013 2:34:35 PM UTC+2
login.
If i go to url /default/user/logout?_next=blablabla, I stay at
/default/user/logout after logout. Redirect doesn't work there.
пятница, 11 октября 2013 г., 23:04:36 UTC+6 пользователь lesssugar написал:
What do you mean it doesn't wok with logout? Linking your logout
to /default/user
on /default/user/logout page. It's terrible.
пятница, 11 октября 2013 г., 23:18:19 UTC+6 пользователь lesssugar написал:
How about a simple logout-link:
a href={{=URL('default', 'user', args='logout')}}Logout/a
This also does not redirect to default/index when clicked?
On Friday, October 11, 2013 7
web2py's default layout is not responsive. If you're facing problems with
displaying the tables, you should overwrite the CSS to adapt the columns
behaviour.
On Tuesday, October 8, 2013 2:06:13 PM UTC+2, stefaan wrote:
Hello all,
I noticed the following when using a grid with some links
.
On Sunday, 6 October 2013 11:53:27 UTC-5, lesssugar wrote:
Massimo (or anyone willing to help),
all I'm trying to achieve is use my own email template to send a
password-reset message to user. How do I do this properly?
Currently, I have this
*db.py*
auth.messages.reset_password
must be in mailing/pass_reset.html. Can you show us that file?
On Monday, 7 October 2013 04:17:53 UTC-5, lesssugar wrote:
Your problem does not come from the code you show us
When I comment this piece of code *(A)*:
auth.messages.reset_password = response.render(
'mailing
October 2013 09:04:07 UTC-5, lesssugar wrote:
Here's the code of mailing/pass_reset.html:
{{extend 'mailing/template.html'}}
tr
td bgcolor=#ff style=padding: 40px 30px 40px 30px;
table border=0 cellpadding=0 cellspacing=0 width=100%
tbody
tr
Shouldn't it be *form.errors*?
On Monday, October 7, 2013 11:20:32 PM UTC+2, raferbop wrote:
# Model/db.py
db = DAL('sqlite://storage.sqlite')
db.define_table(
'person',
Field('name', requires=IS_NOT_EMPTY(error_message=auth.messages.
is_empty)),
Field('email',
In general:
db(your_condition).select(db.table_name.ALL, orderby=~db.table_name.logtime)
As for your_condition, Python's timedelta should be useful:
http://docs.python.org/2/library/datetime.html#datetime.timedelta
On Tuesday, October 8, 2013 3:56:33 AM UTC+2, Dave S wrote:
On Monday,
:14:17 UTC-5, lesssugar wrote:
Sorry, Massimo, but I really don't get it. Is the slash causing the
problem? I use '[controller_name]/[view_name.html]' to render other emails
and it's all ok.
I even tried to do it this way in the mailing view:
a href={{=URL('default','user', args
2013 13:26:46 UTC-5, lesssugar wrote:
I'm trying to send a custom email template to user when they perform
password reset:
*db.py:*
auth.messages.reset_password = response.render(
'mailing/pass_reset.html',
dict(subject=Password reset,
link=URL('default','user', args
Or you could store all the things as a string and split it nicely in the
view, when displaying ;)
On Wednesday, October 2, 2013 5:16:18 PM UTC+2, Andreas Wienes wrote:
Hey guys,
in the web2py-book is an example for a one-to-many relation.
I'm trying to send a custom email template to user when they perform
password reset:
*db.py:*
auth.messages.reset_password = response.render(
'mailing/pass_reset.html',
dict(subject=Password reset,
link=URL('default','user', args='reset_password')))
and in
parsing a specific feed
and inserts results into the db. I guess I'll really start to worry when
there's actually something to worry (e.g. high server load).
On Monday, September 30, 2013 1:58:32 PM UTC+2, LightDot wrote:
@lesssugar Define efficient. :) Are you after a shorter overall execution
In my app I have a script running in the background 3 times a day. The
script generates lots of inserts into the db.
In terms of performance, which one of the two below is better?
1) Leaving the script as it is = many insert actions at one time / script
runs shorter
2) Using time.sleep() after
That was a theoretical question. I'm asking because I don't know which approach
is better. There's no specific issue I'm trying to address. I just want to find
out which way is more efficient.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
In the RSS aggregator section, the web2py's book shows an example taht uses
Python's feedparser (http://pythonhosted.org/feedparser/):
d = feedparser.parse(url)
- this way all the items in the feed get parsed.
However, some of external RSS feeds may take lots of time to parse. Does
anyone
I'm planning to implement RSS aggregator in my app, using instruction from
the book:
http://web2py.com/books/default/chapter/29/10/services?search=rss#RSS
The twist is to firstly store the news in my database, and display the feed
using the stored data.
My questions:
1) Does anyone know
Can I ask, what would be the best way to cache the feed action? I'm
currently working on my own feed as well but I'm not experienced in
implementing caching.
On Saturday, August 24, 2013 8:18:13 PM UTC+2, Alan Etkin wrote:
I'm trying to display a feed on my page that needs to update about
/gluon/validators.py#L2525
If you can suggest improvements I will happy to include them. I guess the
problem is here:
https://github.com/web2py/web2py/blob/master/gluon/validators.py#L2534
Massimo
On Friday, 16 August 2013 07:39:50 UTC-5, lesssugar wrote:
I'm using the following module
, lesssugar wrote:
Oh, I wasn't aware that IS_SLUG.urlify() is a part of our great framework
:) I thought urlify is an external Python module.
Anyway, found docs here:
http://www.web2py.com.ar/examples/global/vars/IS_SLUG/urlify
Thanks!
On Saturday, August 17, 2013 12:00:52 AM UTC+2, Massimo
I'm using the following module to convert my urls:
http://pydoc.net/Python/redsolutioncms.django-hex-storage/0.1.1/pinyin.urlify/
I have urlify.py (main function) and maps.py (chars mapping) in my
/modules. I test it in one of my views, simply trying to print the
urlify-ed value in the
:
There is a IS_SLUG.urlify() which is probably better than Django's.
;-)
On Friday, 16 August 2013 07:39:50 UTC-5, lesssugar wrote:
I'm using the following module to convert my urls:
http://pydoc.net/Python/redsolutioncms.django-hex-storage/0.1.1/pinyin.urlify/
I have urlify.py
that demonstrates the problem?
Anthony
On Tuesday, August 13, 2013 5:48:27 AM UTC-4, lesssugar wrote:
Thanks, Joe, I'm getting some progress... When changed to ajax=False, the
feedback form displays correctly on all the pages. However, with ajax set
to False, the feedback is not being sent to my
UTC-4, lesssugar wrote:
If you view the network requests in the browser developer tools and
refresh the page, do you see a request to suggestions.load (...)?
Yes, there is the request to suggestions.load in the Network tab on the
pages where LOAD works. None suggestions.load in the same
Yep, the calendar WAS the issue here
I commented the calendar function in web2py.js and all works great. Didn't
expect it to be the problem at all. Thank you for the hint :)
On Wednesday, August 14, 2013 3:16:17 PM UTC+2, lesssugar wrote:
I get this in console:
Uncaught ReferenceError
?
If you can separate those and test them one at a time, you can make
progress on the problem.
-- Joe
On Sunday, August 11, 2013 7:04:36 AM UTC-7, lesssugar wrote:
Both web2py.js and jquery.js are loaded and accessible. There are no JS
errors shown in console, all looks normal - but there's
I'm getting *404 not found* error when I submit my registration form. After
submitting the registration form user should be redirected to his or her
profile. That's it.
1. I haven't changed a thing in the registration function
2. Registration worked fine until now
3. All I did today was add an
I'm not sure what to show, I mean, what would be useful as I don't know
what's going on totally. Let's say I want to register as a seafarer
registration function (default/register):
def register():
response.view = 'default/join.html'
auth.settings.formstyle = 'divs'
if not
You're right! I probably copied the piece of code from something else I
wrote. Thanks.
On Tuesday, August 13, 2013 2:54:49 PM UTC+2, Anthony wrote:
def add_group_and_permissions(form):
group_id = auth.id_group(role=request.args(0, cast=int))
If registration was working previously,
I'm using LOAD() for displaying a feedback form available on every page. I
placed the form in layout.html:
{{=LOAD('default','suggestions.load',ajax=True)}}
The form loads correctly on most of the pages. However there some where the
LOAD component does not work (no suggestions.load request is
Both web2py.js and jquery.js are loaded and accessible. There are no JS
errors shown in console, all looks normal - but there's none .load
request sent at all.
The few pages where LOAD doesn't work include a respective form and other
javascript. Commenting the javascript doesn't solve the
I need to create user profile URL based on user's name and last name,
replacing all special characters with the allowed ones. How do I achieve
this with routes.py? Can't find a straight answer on this subject in the
book nor on the forum.
--
---
You received this message because you are
form1 and form2 are just variables' names - they store the same HTML helper
code. Notice that *_name='name' *is just a general example. Maybe it would
be a little bit clearer if the _name values in the book were different:
form_one, form_two. But that's basically it. You need to distinguish the
Probably the most comfortable way to do it is to use *executesql:*
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#executesql
*
*
On Monday, July 29, 2013 12:00:20 PM UTC+2, Denis Rykov wrote:
Please help me to write the following SQL query using DAL:
SELECT
Take a look at the book:
http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=hidden+fields#Hidden-fields
So try defining your hidden field with *hidden *attribute:
SQLFORM(..., hidden=dict(hidden_field_name=hidden_field_value))
It should work.
On Monday, July 29, 2013
. This is not the case for the
reset_password form, hence the problem.
Anthony
On Friday, July 26, 2013 7:09:02 PM UTC-4, lesssugar wrote:
OK, I figured it out. I have a hidden feedback form on every page
(generated with LOAD), which appears onclick. So basically when I go to
default/user/reset_password I
app?
On Saturday, July 27, 2013 6:27:51 AM UTC-4, lesssugar wrote:
I was too quick with the No action needed marker. It apperars that the
new password I create in reset_password is not saved in the DB.
1. I type new password 2 times in the form
2. I submit the form. Password changed flash
didn't pass (the _formkey is stored in the
session, so often this is due to an issue with the session or cookies).
Anthony
On Thursday, July 25, 2013 1:50:09 PM UTC-4, lesssugar wrote:
No. Cookies are on. I'm not clearing the session explicitly anywhere in
the code neither. Just created dummy
if there is a _formkey[no_table/create] key in the session and confirm the
value stored there is the same as the value in the hidden _formkey field in
the form on the HTML page.
Anthony
On Friday, July 26, 2013 10:51:39 AM UTC-4, lesssugar wrote:
It could be something with the session
You could first create the list of links in the controller and then pass it
to views via LOAD.
Take a look at this (didn't test it but the idea should be clear):
def getTags():
#get row object
tags = db().select(db.entry.tag,distinct=True)
#incialize taglist variable, start with ul
:
Hmm, hard to say what's going on then, especially given that you can't
replicate the problem in a fresh app.
On Friday, July 26, 2013 11:23:01 AM UTC-4, lesssugar wrote:
Checked it.
After the form loads, session['_formkey[no_table/create]'] is the same as
the _formkey value in the form
I'm using default/user/*request_reset_password* and default/user/*
reset_password* in my app.
Neither request_reset_password, nor reset_password form performs validation
on user's input. Seems strange, as the form is a clear auth(). Code:
default/user:
def user():
auth.settings.formstyle =
Thanks, Anthony, I remofed the if statement and it worked for
request_reset_password.
However, after I click the link sent to e-mail address, the reset_password
form still doesn't process New password and Verify password fields. The
inputs can be empty, the passwords can be different - no
?
On Thursday, July 25, 2013 11:14:21 AM UTC-4, lesssugar wrote:
Thanks, Anthony, I removed the if statement and it worked for
request_reset_password.
However, after I click the link sent to e-mail address, the
reset_password form still doesn't process New password and Verify
password fields
, July 25, 2013 11:49:54 AM UTC-4, lesssugar wrote:
When submitting the form with different passwords - the page reloads and
that's it. No validation, no error response.flash, nothig. The same issue
occurs with the same passwords and with empty inputs.
web2py version: 2.4.7-stable
On Thursday
== 'B': del newfieldvalues['field_X']
record.update_record(**newfieldvalues)
if db.table[id].field_X == A:
#perform full update
elif db.table[id].field_X == B:
#update all fields except field_X
On Sunday, 21 July 2013 08:11:44 UTC-5, lesssugar wrote:
When going to update page I would
)
On Monday, 22 July 2013 05:26:41 UTC-5, lesssugar wrote:
Hi, Massimo,
thanks for the solution, it looks totally fine but I just wasn't clear
enough on this - my bad.
The thing is I'm using crud.update() to generate the form I described
earlier. How would I adapt your code to crud? In my
When going to update page I would like to check the value of field_X. Then,
depending on its current value, field_X should be updated along with the
other ones OR be excluded from upload:
if db.table[id].field_X == A:
#perform full update
elif db.table[id].field_X == B:
#update all fields
I'm using *the same* web2py_component() function in 3 different forms in my
application. In 2 cases the function gets the job done. In the third form
web2py_component() doesn't work - no request is being sent.
Do you guys know any reason why web2py_component() wouldn't get triggered?
CODE
I have a table with 8 fields. I need to create crud.update form only for
one of them.
There are at least two ways to do it:
1. setting readable / writable attributes of the rest 7 fields to False
(rather tedious)
2. or something like this:
for f in db.tablename.fields:
if f != 'myfield':
= record.fieldname)
On Thursday, 18 July 2013 09:19:17 UTC-5, lesssugar wrote:
I have a table with 8 fields. I need to create crud.update form only for
one of them.
There are at least two ways to do it:
1. setting readable / writable attributes of the rest 7 fields to False
(rather tedious)
2
= SQLFORM.factory(Field('fieldname',default = record.fieldname))
if form.process().accepted:
record.update_record(fieldname = record.fieldname)
On Thursday, 18 July 2013 09:19:17 UTC-5, lesssugar wrote:
I have a table with 8 fields. I need to create crud.update form only for
one of them
There's default/download function, usually used like this on files that
were uploaded:
a href={{=URL('default', 'download', args=[filename])}}Download/a
In this case, I do not want to keep the full download path in my a tag.
Instead, when the link is clicked, I would like to redirect to
Thanks Alan!
On Wednesday, July 17, 2013 10:05:14 PM UTC+2, Alan Etkin wrote:
def download_file():
file = db(db.files.user_id == int(request.args(0))).select()
for f in file:
name = f.name
return response.download(name,db)
I think that the call to download should be
thing is that if it's available on appadmin and no 'blob' field is
involved, it MUST be somewhere in your pc.
On Monday, July 15, 2013 6:51:28 PM UTC+2, lesssugar wrote:
I have the following upload field definition:
...
Field('application', 'upload', uploadfolder=request.application
I have the following upload field definition:
...
Field('application', 'upload', uploadfolder=request.application +
'/uploads/applications', autodelete=True)
...
db.mytable.application.requires = IS_UPLOAD_FILENAME(extension=
'(doc|DOC|docx|DOCX|pdf|PDF|odt|ODT|rtf|RTF)', error_message='Use
Not really a web2py thing. Check the liks below.
CSS3 font-face (general usage):
http://www.css3.info/preview/web-fonts-with-font-face/
Webfont generator (for the font you downloaded):
http://www.fontsquirrel.com/tools/webfont-generator
On Sunday, July 7, 2013 9:56:15 PM UTC+2, Hugo Costa
Here's what you look for:
http://web2py.com/books/default/chapter/29/06#Connection-strings
On Saturday, July 6, 2013 9:09:14 AM UTC+2, balpre...@gmail.com wrote:
i have install MySQL and now after creating a table ad its contents , I
want to connect it to sever through web2py. so what I need
Quick question: what's the proper way to combine *where *clauses in DAL?
1. When I use , I get doubled select results:
db((db.auth_user.registration_key == 'pending') (db.auth_membership.group_id
== 2)).select(db.auth_user.id, db.auth_user.email)
I get
3, examp...@example.com
3,
Suddenly, after another test registration, works fine. Not sure what's
changed... Anyway, should I use or and to combine the clauses?
On Monday, July 1, 2013 3:41:51 PM UTC+2, lesssugar wrote:
Quick question: what's the proper way to combine *where *clauses in DAL?
1. When I use , I get
1. What's the proper way to use [AND, OR] in DAL's where clauses? Do I use
[and / ], [or / ||] ?
2. Does using commas is the equivalent of AND? Like in:
row = db(db.table.field_1 == X, db.table.field_2 == Y, db.table.field_3 == Z
).select()
--
---
You received this message because you are
an inner
joinhttp://web2py.com/books/default/chapter/29/06#Inner-joinswhere you
needed one.
Anthony
On Monday, July 1, 2013 10:34:44 AM UTC-4, lesssugar wrote:
1. What's the proper way to use [AND, OR] in DAL's where clauses? Do I
use [and / ], [or / ||] ?
2. Does using commas
Really, no one? :] Could IS_MATCH help with checking the uploaded file
extension?
On Saturday, June 29, 2013 1:01:29 AM UTC+2, lesssugar wrote:
I need to validate extension of documents being uploaded in my app: doc,
pdf, odt, ... .
Image upload has its IS_IMAGE validator, which takes
:45:10 PM UTC+2, lesssugar wrote:
Really, no one? :] Could IS_MATCH help with checking the uploaded file
extension?
On Saturday, June 29, 2013 1:01:29 AM UTC+2, lesssugar wrote:
I need to validate extension of documents being uploaded in my app: doc,
pdf, odt, ... .
Image upload has its
I need to validate extension of documents being uploaded in my app: doc,
pdf, odt, ... .
Image upload has its IS_IMAGE validator, which takes extensions argument,
so list of accepted extensions can be provided.
The only validator I see for non-image uploads is IS_UPLOAD_FILENAME, which
takes
@Niphlod,
Thanks very much for your solution. Implemented it, it works -- no errors
when inserting/updating data.
However, one thing I don't fully get: the data I store using the encryption
are displayed as normal strings in the database. I'm not very familiar with
encryption specifics but
,
being transparent.
Try to inspect your database with an external tool instead.
On Wednesday, June 26, 2013 12:19:24 PM UTC+2, lesssugar wrote:
@Niphlod,
Thanks very much for your solution. Implemented it, it works -- no errors
when inserting/updating data.
However, one thing I don't fully
I have values I would like to store encrypted in my db after user inserts
them. When displayed, the data should get decrypted.
All I know about encryption in web2py is that it uses HMAC+SHA512 by
default to store password in auth_user table. The algorithm is of course
reversible but how do I
1 - 100 of 158 matches
Mail list logo