Thanks Annet.
This is the exact plan i was having.. Since i am new to python and web2py
both. Was little stuck..
I also tried checking out code of conf2py.. for registration details...
*Also, are you able to edit details of the user profile.*
Since when i used different tables i was not able t
Thanks Annet, that's what I currently have, but it doesn't allow for
CRUD of anything but the outer table, it won't allow for CRUD of any
of the inner tables.
I would like—either in the drop down or as an "Add/modify" link next
to it—the ability to CRUD entries in that referenced table.
If there
> Right now you can't have one model apply to two different controllers with
> conditional models. Copy/pasting should work but I would rarely advise
> that. Are you running into performance problems?
No, but I read the posts in the group, and thought I'd better prevent
running into performa
When I asked this question, pbreit, provided me with the following solution:
'''
I'd probably use a function or virtual field for that, not store it in DB.
And it could be cleaned up a bit. Something like:
def trunc_desc(s)
if len(s) > 128:
return s[:128] + '...'
return s
'''
Y
Vibhor What have you put inside the div
To my understanding use a label. and if you are having something
descriptive use .
CSS Control is always better...
Please correct me if I'm wrong, but as far as I understand tornado cannot
be used with free hosting?
(or can it?)
omg, that is so totally working. cool.
i am almost there. i added this at the top of my function
if ((request.vars._formname<>None) and
(request.vars._formname.rfind('opinion_')>-1)):
f = SQLFORM(db.lecture_item_opinions)
f.vars.lecture_id=lecture.id
f.vars.lecture_
put you table definitions on modules and use conditional models to
instantiate them.
http://zerp.ly/rochacbruno
Em 15/05/2012 05:44, "Annet" escreveu:
>
> Right now you can't have one model apply to two different controllers with
>> conditional models. Copy/pasting should work but I would rarely
That problem is simply due to the fact that in facebook the
application has been registered with a domain name and a base url that
differ from the one where your web2py application is published.
Sometimes even changing the domain name in facebook form does not
correct the problem. In that case you
Hello. I'm now trying to use redhat openshift.
I am struggling access database - mysql-5.1 - which is set via openshift
cartridge.
I got admin user(admin), password and database name(we2py).
So I modified database setting in models/db.py
as
db = DAL('mysql://admin:passw...@web2py-codingday.rhc
You haven't actually stated your business rule, nor have you mentioned any
need to preserve a history of addresses, but the correct structure from a
db design point of view is likely to be that the table storing the owner of
the addresses has a one-to-many relation with the address table. i.e.
Hi,
I am just starting to use smartgrid and have a question on the query
builder (the GUI under 'Query').
With
def test():
db.define_table('A', Field('type'))
db.define_table('B',
Field('type', db.A),
Field('other', 'integer'))
form = SQLFORM.smartgrid(
Hello All,
I am a newbie to web2py. I have edited the User Profile to add fields like
this:
auth=Auth(db)
auth.settings.extra_fields['auth_user']=
[Field('Pic','upload'),Field('About_Me','text')]
This if fine for the Profile view. However, I do not want these fields to
be available in the regi
You must be very careful about multiple copies of table definitions.
Only one copy can be allowed to migrate the table.
Upgrading the tables in a production environment is tedious. First you
must upgrade the models independent of the controllers, then use the admin
app to ensure all the migrat
I don't know anything about openshift, but I would think the normal MySQL
troubleshooting steps apply:
1. Make sure MySQL is listening on all interfaces
2. Make sure your MySQL account accepts connections from the '%' host.
On Tuesday, May 15, 2012 3:55:07 AM UTC-4, JungHyun Kim wrote:
>
I guess you can disable those fields if the user is not logged in. Perhaps
adding this to the end of the model:
if not auth.is_logged_in():
db.auth_user.upload.readable = False
db.auth_user.About_Me.readable = False
On Monday, May 14, 2012 8:18:05 PM UTC-3, dundee wrote:
>
> Hello All,
Oops, sorry. I meant db.auth_user..writable = False
On Tuesday, May 15, 2012 8:53:07 AM UTC-3, Alan Etkin wrote:
>
> I guess you can disable those fields if the user is not logged in. Perhaps
> adding this to the end of the model:
>
> if not auth.is_logged_in():
> db.auth_user.upload.readable
>
> if ((request.vars._formname<>None) and
> (request.vars._formname.rfind('opinion_')>-1)):
>
You don't have to explicitly check for not equal to None -- if it is None,
it will evaluate to false. Also, does the formname start with "opinion_" --
if so, use .startswith():
if request.vars._
Thank you very much for your reply Alan. I had to add
db.auth_user.About_me.writable=False and
db.auth_user.About_Me.writable=False for it to work.
On Tue, May 15, 2012 at 6:53 AM, Alan Etkin wrote:
> I guess you can disable those fields if the user is not logged in. Perhaps
> adding this to the
ok I see you corrected it. Thanks again.
On Tue, May 15, 2012 at 7:10 AM, Kevin Miller wrote:
> Thank you very much for your reply Alan. I had to add
> db.auth_user.About_me.writable=False and
> db.auth_user.About_Me.writable=False for it to work.
>
> On Tue, May 15, 2012 at 6:53 AM, Alan Etkin
Hi luc,
Following is what i am looking for:::
- Candidate Applies for posted vacancy using the registration form.
(Release 1)
- Email-id is the username.
- Registration Form 1 (First Name, Last Name, Email, Password, Confirm
Password)
- Email Sent for activation. Pop-up to activ
Thank you! Ross!
The problem was mysql URL. It was different from application URL(=
web2py-codingday.rhcloud.com).
Now connection to mysql is OK. But still there is HTTP 500 error with
default welcome application...
I should spend more to know why.
2012년 5월 15일 화요일 오후 8시 51분 26초 UTC+9, Ross
>
> Sure I can change one of that manually. But wouldn't it be better if
> {{super}} can simply work no matter the parent block exists or not?
>
Not sure it should fail silently by default, but maybe it would be worth
adding an optional keyword to tell it to do so.
Anthony
Earlier in this mailing list the suggestion was made that one can use the
sql search path to include/exclude schemas from web2py.
In a setup like this it becomes tricky:
Schema: Public
Table(s): auth-related tables
Schema: wbank:
Tables related to w
Hi Richard,
Thanks for your answer.
I think you`re right. If you, or someone else, knows where to get an
example application that uses most part of this features please let me know.
In a mean while I'll keep trying to get this to work. If i find something
or get this to work I'll try to make a
fellows! almost 2 years later, this is not yet updated in the book (also,
login is temporarily disabled)
personally, I'd really like to-have-more-documentation-about-this™
regards
Not sure, but SQLFORM.smartgrid don't do what you want?
Richard
On Tue, May 15, 2012 at 4:43 AM, Alec Taylor wrote:
> Thanks Annet, that's what I currently have, but it doesn't allow for
> CRUD of anything but the outer table, it won't allow for CRUD of any
> of the inner tables.
>
> I would li
Dear all,
I'm new to web2py, but I tried to search for an answer befor posting, I
assure you.
I've got datable, use SQLFORM.grid to display it, I have a "view" button
which I can click and ge3t redirected to single record view.
Question is: where can I define the template for the single record
With what happen with pyjamas recently (see thread on python-list) I doubt
that there will more work involve documenting pyjamas into web2py until the
survive of pyjamas will be granted.
Richard
On Tue, May 15, 2012 at 9:37 AM, Daniel Aguayo wrote:
> fellows! almost 2 years later, this is not ye
I am working through the tutorial on the web2py site, checking web2py out
and I keep getting errors for things I can't see. Like
type 'exceptions.SyntaxError'> non-keyword arg after keyword arg
(default.py, line 14)
That code does not exist on the page. The prior code is:
*def index():**ses
Not sure, but I think you don't need to return session and if you need it,
it should be like this :
dict(var=VAR, var1=VAR1, etc.)
dict() is python dictionnary constructor function, so you need a key and a
value : var is the key VAR is the value.
Richard
On Tue, May 15, 2012 at 8:56 AM, Gerald
It is not really a comment:
http://lachy.id.au/log/2005/05/script-comments
On Monday, 14 May 2012 14:25:07 UTC-5, Larry Wapnitsky wrote:
>
> Here's what it's generating:
>
> Whitelisted Addresses "jqgrid_ips_pager">> counter=...before the second arg
you're passing:
Your statement:
return dict(message="hello", session.counter)
should be
return dict(message="hello", counter=session.counter)
-Jim
On 5/15/2012 1:16 PM, Gerald Klein wrote:
outside of the string passed t
>
> outside of the string passed to the message variable in the call to dict
> my code is exactly the same, I didn't have any luck with the version above
> this so I coded this instead. As far as the syntax error, I would be happy
> to know where it is as I can't see it. And yes the trace is po
In controller :
def index():
session.counter = (session.counter or 0) + 1
return dict(message="Hello from MyApp", counter=session.counter)
View :
{{=message}}
Number of visits: {{=counter}}
>From the book and it should work...
On Tue, May 15, 2012 at 2:16 PM
yes, let me explain better.
Having a task queue that updates heavily a sqlite database while a web
application needs to read it is not a good idea. Sqlite is a wonderful
database and supports some syntax that others "big databases" dream about,
has transactions, is flexible, multiplatform,
> I am working exclusively with web2py, over 2 years (8-24 hours a day *7)
> plus holydays. And I never used an IDE. I use Sublime-text-2 and VIM, I
> have Python code completion and I have set some web2py completions for
> common code snippets both in VIM and Sublime-text.
> But, If I wanted
+1
On Sun, Feb 12, 2012 at 5:41 PM, Francisco Costa wrote:
> at tymr we use gEdit + plugins
>
> On Feb 12, 4:17 pm, Anthony wrote:
> > > I am also comfortable with the web based IDE. However even with
> youadworld
> > > there was over 5000 files to port over. (Most didn't have to be ported
> > >
+1 to Francisco
gEdit + plugins
Richard
On Tue, May 15, 2012 at 2:54 PM, Richard Vézina wrote:
> +1
>
>
> On Sun, Feb 12, 2012 at 5:41 PM, Francisco Costa
> wrote:
>
>> at tymr we use gEdit + plugins
>>
>> On Feb 12, 4:17 pm, Anthony wrote:
>> > > I am also comfortable with the web based IDE
> I strongly advicee the use of the scheduler because your requirements will
> be fullfilled best from that than a homemade task queue, at least, if not
> trying to use celery.anyway, just my 2 cents:
> SQLITE write operations are locking the entire database. one of 2
> controllers
Is there any progress? Are you able to use it?
2012. április 27., péntek 23:06:40 UTC+2 időpontban szimszon a következőt
írta:
>
> What distrib is this?
> What is the content of GPGKEY?
>
> The list is from python shell or from web2py?
>
> 2012. április 27., péntek 17:34:06 UTC+2 időpontban weheh
"I'd better prevent running into performance problems"
I generally advise against premature optimization.
Il 15/05/2012 14:56, Gerald Klein ha scritto:
*def index():*
*session.counter = (session.counter or 0) + 1*
*return dict(message="hello", session.counter)*
the right code for building a dictionary is the one suggested by
Richard, in
Not sure using conditional models is "premature optimization" it is just
better design.
On Tue, May 15, 2012 at 12:14 PM, pbreit wrote:
> "I'd better prevent running into performance problems"
>
> I generally advise against premature optimization.
>
--
--
Regards,
Bruce Wade
http://ca.linke
*# models/db.py*
...
db = DAL(".")
...
*# modules/datamodels/myobject.py*
from gluon import current
from gluon.dal import Field
class MyObject(object):
def __init__(seld, db):
self.db = db
self.T = current.T
self.request = current.request
self.fields = [
postgresql definetely scales also with write intensive operations without
blocking.
homemade task queues are real funny to code but gets messy really
soon.blocking operations, tasks that fail and need (or don't) to be
requeued, priorities, timeouts, newtork splits, and so on.
I think I'm not
In order to avoid "NameError: name 'task_function' is not defined":
from gluon.scheduler import Scheduler
myscheduler = Scheduler(db, dict(task_name=None))
On Wednesday, December 28, 2011 7:36:04 PM UTC-8, Brian M wrote:
>
> This is simply a note for anybody else who may come across this error w
Bruno mentioned modules, not conditional models.
Better example:
*# models/db.py*
...
db = DAL(".")
...
*# modules/datamodels/base.py*
class BaseModel(object):
def define_table(self):
self.db.define_table(self.tablename, *self.fields, **self.params)
*# modules/datamodels/dog.py*
from gluon import current
from gluon.dal import
These examples are only good if you have 1 model per class. I prefer the
design used in Auth with a define_tables method.
On Tue, May 15, 2012 at 12:41 PM, Bruno Rocha wrote:
> Better example:
>
>
> *# models/db.py*
> ...
> db = DAL(".")
> ...
>
> *# modules/datamodels/base.py*
>
> class Bas
Hi
I'm trying to use the plugin_lazy_options_widget to build a dependent
select list. I have to fields on the screen, both with the IS_IN_DB
validator and values available in the second depend on what is selected
in the first. This widget from s-cubism seems like just the thing, but
I can't
Hi!
I have it on my only file at models folder, at first line.
from gluon.custom_import import track_changes; track_changes(True)
When using GAE SDK, this option does NOTE reloads modules!
The tickets shows erros on wrong line numbers... and changes made on module
files are only displayed when
Bruce,
Maybe I'm a little simple minded today ...
Could you give an example where you would have more than one model per
class?
On Tuesday, May 15, 2012 3:43:33 PM UTC-4, Bruce Wade wrote:
>
> These examples are only good if you have 1 model per class. I prefer the
> design used in Auth with a
I am looking in to it, and realized that there ia a better, simple and more
elegant way.
In Django models, it is very commom to use a subclass named Meta, so I will
try to run something like.
class Dog(BaseModel):
self.name = Field("name")
self.guardian = Field("guardian", "reference g
Well one example is my location class, which contains countries, provinces,
and cities models. Having one class allows me to write a single API that is
self contained and very modular to handle any location related task.
On Tue, May 15, 2012 at 1:35 PM, Bruno Rocha wrote:
> I am looking in to it
For example see attached, it isn't complete but will give a better example.
On Tue, May 15, 2012 at 1:43 PM, Bruce Wade wrote:
> Well one example is my location class, which contains countries,
> provinces, and cities models. Having one class allows me to write a single
> API that is self conta
Thanks for responding
no, not possible.
would have to be able to specify a dns PTR type, and I have that option
CAS system not work for me, I retornava error "infinite redirect"
I had several customers excited about the idea of being able to log into
facebook ... pity it does not work ..
El
And just to be clear, defining models in modules and defining modules using
classes are two independent design decisions -- you can use classes even in
regular model files, and you can use modules without using classes. If you
want, you can just use regular functions in modules:
*/modules/mymod
1 - 100 of 118 matches
Mail list logo