using ssh for connecting to admin panel is slow, if it was possible to use
something like connecting to application folder for retrieving
models/controller/view.. files and using local admin panel could boost the
speed.
my question:
is this possible to use uwsgi and pass password to it?
--
to do exactly?
Il giorno lunedì 20 maggio 2013 10:51:00 UTC+2, yashar ha scritto:
using ssh for connecting to admin panel is slow, if it was possible to
use something like connecting to application folder for retrieving
models/controller/view.. files and using local admin panel could boost
yes , if i want to run it from uwsgi.
On Monday, May 20, 2013 2:44:53 PM UTC+4:30, Niphlod wrote:
so the problem is that you can't reach the
https://yourhost/appname/appadmin page ?
Il giorno lunedì 20 maggio 2013 11:58:48 UTC+2, yashar ha scritto:
thanks for the fast reply, yes
lunedì 20 maggio 2013 12:31:31 UTC+2, yashar ha scritto:
yes , if i want to run it from uwsgi.
On Monday, May 20, 2013 2:44:53 PM UTC+4:30, Niphlod wrote:
so the problem is that you can't reach the
https://yourhost/appname/appadmin page ?
Il giorno lunedì 20 maggio 2013 11:58:48 UTC+2, yashar
hi,
i want to change connection string user from postgres to another_user but
it said relation auth_user already exist, i thought that i set fake_migrate
= True to solve it but i'm not sure.
any idea to how to solve it?
--
---
You received this message because you are subscribed to the
i set form.errors = dict() at the end of controller but i still get errors,
is this a bug or i'm doing a wrong way?
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an
, April 25, 2013 3:02:46 AM UTC-4, yashar wrote:
i set form.errors = dict() at the end of controller but i still get
errors, is this a bug or i'm doing a wrong way?
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe from
is this true that SQLFORMs redirected to _next value when SQLFORM is
accepted? so i did this:
def lost_password():
from gluon.serializers import json
try:
form = auth.retrieve_password()
except: ### i assume that form redirected only if email send to user
return
manually change the query string
part of the URL and still have the request verified). See
http://web2py.com/books/default/chapter/29/04#Digitally-signed-urls for
more details.
Anthony
On Wednesday, March 27, 2013 6:55:21 AM UTC-4, yashar wrote:
here is the link :
script
here is the link :
script
window.location.href =
'{{=URL('CS','close_inqueries',user_signature=True)}}' + '' + data;
/script
and here is the controler:
def close_inqueries():
print request.vars
print '-'*20
print session
and here is the result:
Storage {'_signature':
here is the link :
script
window.location.href =
'{{=URL('CS','close_inqueries',user_signature=True)}}' + '' + data;
/script
and here is the controler:
def close_inqueries():
print request.vars
print '-'*20
print session
and here is the result:
Storage {'_signature':
thank you, very helpful.
On Thursday, March 21, 2013 11:57:40 PM UTC+3:30, Niphlod wrote:
just to clear out doubts.
a field 'reference sometable' gets:
- a foreign key to the id of sometable
- a validator that by default builds up on the format argument of
sometable
you CAN'T have
db.define_table('countries',
Field('country_name')
)
db.define_table('testing',
Field('origin','reference
countries',requires=IS_IN_DB(db,'countries.country_name',error_message='Choose
origin country'))
)
when i try to input testing from database administration, i get this
the form is created by the admin app, no validation error, just i get this
error for any insert with relation.
i dont understand.
On Thursday, March 21, 2013 10:06:54 PM UTC+3:30, Alan Etkin wrote:
class 'psycopg2.IntegrityError' insert or update on table testing
violates foreign key
there is no string validator, i just use IS_IN_DB to create drop down widget
On Thursday, March 21, 2013 10:26:38 PM UTC+3:30, Alan Etkin wrote:
the form is created by the admin app, no validation error, just i get this
error for any insert with relation.
Wait, your model has something odd
, yashar wrote:
def ajax_login_bare(self, username, password):
check user login and
return tuple of (boolean,msg) which first field is successfull login or
not
and second is failure massage
request = current.request
session = current.session
def ajax_login_bare(self, username, password):
check user login and
return tuple of (boolean,msg) which first field is successfull login or not
and second is failure massage
request = current.request
session = current.session
table_user =
this is what i added in tools.py inside auth class, this is just
modification of login() function and difference from main login_bare is
this one also check, creates and logs in users which authenticated with
other authentication methods.
def ajax_login_bare(self, username, password):
i think login_bare needs to write again, in login() function, it first
checks the login_methods and then local database and also
create_or_get_user and update session.auth, but in login_bare it just check
the database if user is there add it to session but not doing any of the
login() steps
login form is modal form inside index, and send login form via ajax to
login() function, but i can not login.
def login():
form=auth.login()
if form.accepts(request,session=None):
return 'logged'
else: return 'failed'
below section is in index page view:
form action=''
thank you, i solve the problem like this:
def index():
form = auth.login()
form.elements('input',_type='submit')[0]['_Onclick']='login();return
false;'
return dict(form=form)
def login():
if not auth.login_bare(request.vars.email,request.vars.password):
return 'login
is there any way that i log in user by code?
for example after checking username and password with login_bare, i push
the user into the session as logged in user? in this case there is no need
to write ajax/login directly, and the programmer has a better control.
if i write :
def login():
--
i have two different set of users to register, employees and employers.
their common fields are , username, email, active, password but the rest of
the fields are different, how should i create register form for each one?
is this possible to do something like this somewhere in registration
thanks, i think that i should use auth.register.on_success and
auth.register.on_validation methods for your first advice.
--
i get syntax error for the first 'elif', i tried if pass, if pass... but i
wasnt able to escape error, what is wrong?
{{
def populate_row(value):
currency_map={'U':'USD','E':'Euro','P':'Pound'}
if value:
currency = value[-1:].upper()
value = int(value[:-1])
pass
if (value 0 and currency == 'B')
insert like this:
{{form.insert(0,my_extra_element)}}
return like this:
{{=form[0]}}
if this solve your problem.
--
it works, thank you.
--
this is my form:
form =
SQLFORM(db.records,record_id,showid=False,deletable=True,hidden=dict(DN=DN))
but i cannot access form.vars.DN in controler nither in validator function,
in controller in returns error ( DN is not in table ) and in validator it
returns None.
--
On Tuesday, October 9, 2012 8:14:54 PM UTC+3:30, Annet wrote:
In a function I have the following code:
validate(form):
organization=db((db.
organization.cocNumber==form.vars.cocNumber)\
, yashar wrote:
this is my form:
form =
SQLFORM(db.records,record_id,showid=False,deletable=True,hidden=dict(DN=DN))
but i cannot access form.vars.DN in controler nither in validator
function, in controller in returns error ( DN is not in table ) and in
validator it returns None.
--
last):
File /home/yashar/Documents/web2py/gluon/rocket.py, line 1302, in run
self.run_app(conn)
File /home/yashar/Documents/web2py/gluon/rocket.py, line 2003, in
run_app
output = self.app(environ, self.start_response)
File /home/yashar/Documents/web2py/gluon/main.py, line 693
solved
redirect url is wrong
--
my database is postgres and i'm using this:
Field('name',required=IS_LENGTH(255));
but it creates a varchar(512) in database,
, how could i fix it?
--
thanks
On Tuesday, September 25, 2012 3:22:54 PM UTC+3:30, Marin Pranjić wrote:
Field(..., length=255, ...)
Marin
On Tue, Sep 25, 2012 at 1:28 PM, yashar yva...@gmail.com javascript:wrote:
my database is postgres and i'm using this:
Field('name',required=IS_LENGTH(255
check this:
http://stackoverflow.com/questions/8307809/save-email-attachment-python3-pop3-ssl-gmail
On Tuesday, September 18, 2012 2:53:35 AM UTC+4:30, visuallinux wrote:
Dear All.
Every day i did received a email (gmail) with a file attached (text) as
rar.
My question is how i can
below solution not working, because when you open form1 then form2, web2py
will look for joe for field, and not saving form1, so how could i solve it?
db.define_table('test',
Field('name'))
def form1():
db.test.name.requires=IS_IN_SET(['yashar'])
form = SQLFORM(db.test
i used this:
db.define_table('test',
Field('service_type'))
def form1():
db.test.service_type.requires=IS_IN_SET(['Trial'])
form = SQLFORM(db.test)
if form.process().accepted:
pass
return dict(form=form)
def form2():
(..., formname='form1')
Anthony
On Sunday, September 16, 2012 7:12:52 AM UTC-4, yashar wrote:
below solution not working, because when you open form1 then form2,
web2py will look for joe for field, and not saving form1, so how could i
solve it?
db.define_table('test',
Field('name
38 matches
Mail list logo