Hmm may be we can add an "index=True" option?
Even better have something like:
db.add_index('table', 'name_index_as', ['field1','field2'],
unique=True)
It'll add an index with multiple fields, unique=True is obviously
optional. However, this may be to much work, and may be focusing ont
he actual
What website is it?
On May 19, 4:30 am, Yarko Tymciurak wrote:
> This is nonsense -
>
> None of the contact information or registry about the site or domains is
> true - all phone numbers, in registry and on the site itself are
> disconnected numbers; no name this is registered under is true; t
Massimo, what did you fix? Just the recaptcha? Also, Im using python
2.5 if that helps :)
On May 18, 10:57 am, mdipierro wrote:
> This is a problem. I fixed and posted 1.62.1. Thanks for letting me
> know.
>
> On May 18, 8:34 am, Vidul Petrov wrote:
>
> > Although the modules are imported (from
Why not define it as you would with any table? If it's already within
the database, add a migrate=False option :)
On May 18, 7:50 am, Tito Garrido wrote:
> Hi Folks! Thank you for yours answers!
>
> In fact what a really want is to get db data from a previously defined
> database on db.py.
> I h
the folder).
Hope this helps :)
On May 18, 6:22 am, TheDude wrote:
> Got this on initial startup:
> Traceback (most recent call last):
> File "web2py.py", line 20, in
> gluon.widget.start(cron=True)
> TypeError: start() takes no arguments (1 given)
>
> I re
Got this on initial startup:
Traceback (most recent call last):
File "web2py.py", line 20, in
gluon.widget.start(cron=True)
TypeError: start() takes no arguments (1 given)
I re tried, it worked the second time. So, if anyone gets this, well
just retry. ;) Im on ubuntu hardy.
As for testi
People are discussing this in the IRC chat already. Just needs a bit
of a push ;)
On May 18, 12:07 am, mdipierro wrote:
> I have a better idea. A web2py app that provides:
> - web pages for developers/contributors/users
> - a database of projects (could replace appliances)
> - a database of code
SQL after 20,000 records,
> that's why I suggest my clients to use Oracle after their database
> grows.
> If you are interested in my pager code I can post it here, although
> it might be written better.
>
> On May 16, 10:10 pm, TheDude wrote:
>
> > Do those examples us
Do those examples use the OFFSET paramter? I'm not sure how this
affects Oracle or PGSQL, but in MySQL this could be considered a slow
query after having 20,000+ rows and exponentially grows from there (I
know pgsql has some start-up cost performing this). May want to keep
in mind that a better al
with SELECT * FROM
> > pg_catalog.pg_tables, Oracle makes the same magic with SELECT TABLE_NAME
> > FROM USER_TABLES etc etc...
>
> > Michal
>
> > mdipierro wrote:
> > > hmmm. This may be a good idea. Is SHOW standard SQL? I am not sure all
> > > bac
Massimo, may I propose a solution here? It would require a lot of
work, but if it were done I think it'd destroy the competition of
other ORMs :P Anyways, have the ORM/DAL catch any errors presented
(not sure if this is possible with GAE). If it *does* catch an error,
see which number, have python
I'm going to bump this, it's fairly critical since a few peopl seem to
be affected by it.
On May 4, 11:26 am, TheDude wrote:
> Massimo,
> Just out of curiosity, how would appending "IF NOT EXIST" to the
> create table command for MySQL create more problems? This doe
ssimo
>
> > > On May 4, 7:02 am, Hans
> > > wrote:
>
> > > > I'm having a similar problem. Last time I solved it by deleting the
> > > > database and setting it up new. With more data it gets a pain. I read
> > > > about setting
Massimo, I know that we've talked about this in the past, but here we
go again...
I'm using the latest web2py, in my applications, I would define tables
as usual only to get an SQL error saying the table exists. I tried
clearing out my "databases" folder, and the only way to clear out
would be to
OperationalError: (1054, "Unknown column 'feed.to_player' in 'on
clause'")
mysql> show fields from feed;
+--+--+--+-+-++
| Field| Type | Null | Key | Default | Extra |
+--+--+--+-+-+--
Yes we should :) Also, another class/key that checks of the person is
impersonating or not. :D
@auth.is_impersonating() returns boolean
On Apr 23, 3:07 pm, mdipierro wrote:
> If you are using Auth you may want to be able to impersonate a
> different user without logout and without resetting all
Traceback (most recent call last):
File "/home/daniel/web2py/gluon/restricted.py", line 98, in
restricted
exec ccode in environment
File "/home/daniel/web2py/applications/tapthat/controllers/
default.py", line 13, in
File "/home/daniel/web2py/gluon/globals.py", line 75, in
self._ca
Yup here it is:
http://paste.pocoo.org/show/guKnBZMTv6AIOHzjz6zd/
On Apr 11, 3:30 pm, mdipierro wrote:
> can you show us the web2py model and the query?
>
> On Apr 11, 2:23 pm, TheDude wrote:
>
> > OK, so I had a migration issue with my DB some time ago, the easy fix
> &
OK, so I had a migration issue with my DB some time ago, the easy fix
was migrate=False on all of my tables. I knew this was a bad fix,
because it was a short-term solution. I get the error "Table feed
already exists" now this is true, so instead of trying to create the
table, skip the procedure o
Allow sub-queries to be performed within the DAL. How? This would be a
good example.
db(db.table.field1==db.tbl2.field2).select(db.tbl2.ALL, db
(db.hola.id==db.massimo.the_id)._select(db.hola.ALL))
The db() within a .select() should perform a subquery when selecting
like that. The system current
=mb_posts.posted_by LEFT JOIN mb_posts AS mb_posts2 ON
mb_posts2.reply_to=mb_posts.id WHERE (mb_posts.board_id=1 AND
mb_posts.reply_to IS NULL) GROUP BY mb_posts.id;
On Apr 5, 12:43 pm, TheDude wrote:
> Don't know if the google groups posted this already but lets try
> again..
&g
OperationalError: (1050, "Table 'users' already exists")
I know it already exists, but I want you to just know about it rather
than try to create it all the time. I tried clearing out my /databases
folder as well. Any other ideas?
--~--~-~--~~~---~--~~
You received
;
> > Is the querly below in SQL the one that "you are trying to perform" or
> > the one that you are actually performing and does not work?
> > Is it the output of db(...)._select()?
>
> > Massimo
>
> > On Apr 5, 10:47 am, TheDude wrote:
> >> T
his without having a
> > copy of the model and without understanding what this is supposed to
> > do. Could you explain what you are trying to do?
>
> > Is the querly below in SQL the one that "you are trying to perform" or
> > the one that you are actually performin
Thanks guys :) It's been really bogging down my productivity within
the website, but here is the query that I am trying to perform..
SELECT mb_posts.id, mb_posts.title, mb_posts.message,
mb_posts.posted_by, mb_posts.date_posted, mb_posts.locked,
mb_posts.sticky, mb_posts.last_edited, mb_posts.boa
Steve, can you explain this more please? And the ~ means "DESC" :)
On Apr 5, 12:33 am, Steve Shepherd wrote:
> Whats the ~ tilde doing in your code?
> The other way to do this is return the rows you want and use an object count
> and then use a command to return the last object from the list.
>
Would really like a response to this. =/
On Apr 4, 11:58 am, TheDude wrote:
> Tried using this as logging
> tool:http://mdp.cti.depaul.edu/AlterEgo/default/show/194
>
> But it didn't record where I have the problem at all (even after my
> patches).
>
> The controller
Vidul.
Take a look at this page:
http://mdp.cti.depaul.edu/examples/default/tools
Under "Custom Authentication"
On Apr 4, 12:06 pm, Vidul Petrov wrote:
> The problem is that the following two lines work fine (are copied in
> response.flash),
>
> auth.messages.logged_out = 'You have been logged
Tried using this as logging tool:
http://mdp.cti.depaul.edu/AlterEgo/default/show/194
But it didn't record where I have the problem at all (even after my
patches).
The controller:
def view():
#try:
board = db(db.mb_boards.id==request.args[0]).select()[0]
rows = (db.auth_user.
_posts2.id.count()}} should be
> 'COUNT(mb_posts2.id)'.
>
> The rationale is that rows=db(...).select
> (table.field,table.field.aggregate())
>
> table field goes in rows[i].table.field
> while aggregates are not fields so they go in rows[i]._extra
> [table.field
e to do things this way (it doesn't seem like a
framework way more like a quick hack). Will there be any modifications
within this area in 1.6?
On Apr 3, 11:55 am, mdipierro wrote:
> {{=board._extra[mb_posts2.id.count()]}} ?
>
> On Apr 3, 10:01 am, TheDude wrote:
>
> > RIg
0 0
4 Off-Topic Not everythin...0 0
On Apr 3, 10:34 am, mdipierro wrote:
> try:
> {{=board.mb_boards.keys()}}
> {{=board._extra}}
>
> On Apr 2, 5:20 pm, TheDude wrote:
>
> > SQL Works! However...
>
> > {{=board.mb_boards.keys()}
ind that applying a solution helps my understanding of
> the programming concept, which comes later.
>
> One thing I've noticed is that the programming community assumes I
> know much more about programming concepts than I actually do. Having
> examples with links to elaborat
So, any suggestions?
On Apr 2, 6:42 pm, TheDude wrote:
> Sorry, it's in my views :)
>
> {{extend 'layout.html'}}
> Message Boards
> class="data">
>
> Board
> Threads
> Posts
> Last Topic
>
> {{for board in query:}}
>
.mb_boards.mb_posts.count()}}
{{=board.mb_boards.keys()}}
{{pass}}
On Apr 2, 6:38 pm, mdipierro wrote:
> what is "board"?
>
> On Apr 2, 5:20 pm, TheDude wrote:
>
> > SQL Works! However...
>
> > {{=board.mb_boards.keys()}}
> > brings up:
> > ['update_recor
uery = db().select(db.mb_boards.ALL, db.mb_posts.id.count(),
> > db.mb_posts2.id.count(), left=(db.mb_posts.on(rows),db.mb_posts2.on
> > (rows2)), groupby=db.mb_boards.id)
> > return dict(query=query)
>
> > On Apr 1, 11:13 pm, TheDude wrote:
>
> > > def ind
posts.id.count(),
> db.mb_posts2.id.count(), left=(db.mb_posts.on(rows),db.mb_posts2.on
> (rows2)), groupby=db.mb_boards.id)
> return dict(query=query)
>
> On Apr 1, 11:13 pm, TheDude wrote:
>
> > def index():
> > rows = (db.mb_posts.board_id==db.mb_boards
def index():
rows = (db.mb_posts.board_id==db.mb_boards.id)&
(db.mb_posts.reply_to==0)
rows2 = (db.mb_posts.board_id==db.mb_boards.id)
mb_posts2 = db.mb_posts.with_alias("mb_posts2")
query = db().select(db.mb_boards.ALL, db.mb_posts.id.count(),
db.mb_posts2.id.count(), left=(db.mb_
Nevermind, I just did Yarko's method and that worked out fine.
On Apr 1, 11:44 pm, TheDude wrote:
> 3)
> def login(): return auth.login()
> # create view "default/login.html"
> def register(): return auth.register()
> # create view "default/register.html"
auth.login()
> > # create view "default/login.html"
> > def register(): return auth.register()
> > # create view "default/register.html"
> > etc etc
>
> by the way, if you are going to do special stuff, your code will probably be
> more explic
turn auth.register()
> > # create view "default/register.html"
> > etc etc
>
> by the way, if you are going to do special stuff, your code will probably be
> more explicit / readable w/ (3).
>
>
>
> > Massimo
>
> > On Apr 1, 9:26 pm, The
I've tried using Web2Py's auth system and then tried creating the
following views:
user/register.html
user/create.html
default/user/register.html
default/user/create.html
auth/create.html
auth/register.html
None of them worked, how do you allow views for /default/user/
register ?
--~--~-~
oding wise from 1.59) please let me know.
On Apr 1, 3:27 pm, g-man wrote:
> Nice!
>
> One 'role model' you might want to study is Obie Fernandez' "The Rails
> Way", which goes deeply into each element of that complex framework...
>
> On Apr 1, 11:28 am, T
27;s home footage?
>
> Boring!
>
> :-D
>
>
>
> ceej wrote:
> > Someone needs to take a video cam and record it :)
>
> > On Apr 1, 1:16 pm, TheDude wrote:
>
> >> So who's going to it? It's in about 4 hours from now in Boston. I
> >&
(This isn't an April Fool's Joke)
So, I've been writing a book for Web2Py, but recently came towards a
new direction...we already have a great in-depth book writeen by
Massimo so I was wondering...
Would you guys be interested in a book for web2py like 250 pages long
that goes in-depth? Or, a ni
So who's going to it? It's in about 4 hours from now in Boston. I
can't believe I drove all the way from South Georgia just for it! For
some of those interested/near the area...
We will be talking about:
* How to develop nearly every single kind of application there is
* How to clone Facebook in
Yarko,
Does that injection still exist? And, we need a web2py 1.6 soon :P
On Apr 1, 1:00 am, Vidul Petrov wrote:
> Thank you, Massimo.
>
> One more question - a role can have many groups and vice versa, an
> user can belong to many groups and vice versa?
>
> On Apr 1, 7:16 am, mdipierro wrote:
Pagination would be excellent and is a must, I may write a small
function that does this exact thing. :)
One thing I would like to see, is a nice tutorial on how to provide a
search function within your website. Bonus points for using sphinx as
the backend :)
On Mar 31, 11:29 pm, Yarko Tymciurak
As of right now, we're trying to get some screen shots for the Dojo as
of right now and then Massimo will put them up on the website. I plan
on doing the screen shots fairly soon, may be even tonight. :)
On Mar 31, 11:30 pm, David Niergarth wrote:
> Hello,
>
> I was at the PyCon dojo and got to
Massimo,
I tried the Dojo everything worked out fine. I didn't take screen
shots, but if no one else is up for it I'll do it :P Only one question
aboutit though. Why do you use db.Field() for declaring SQL Fields
rather than SQLField() within the documentation? This may cause
confusion for newbies
Yes! I was disapointed to find out this wasn't the case and had to go
back into my db.py models and change it. +1 :)
On Mar 30, 11:11 am, AchipA wrote:
> +1
>
> On Mar 30, 4:37 pm, Kacper Krupa wrote:
>
> > i also agree
>
> > On Mar 30, 4:23 pm, Timothy Farrell wrote:
>
> > > +1
>
> > > johann
Excellent! I wish there was a video, but I'm sure someone has it
somewhere on the internet. Good work on the dojo, the only thing I was
worried about is..
item = db.news_item[request.args[0]]
If the request.args[0] tries to call from a non existant SQLRow then
it'll throw an error :) Best to app
This certainly breaks the MVC architecture, but it is valuable. I
think web2py should be about being able to expand as much as possible
without interfering the people who just want a small and easy
framework (it can be a small plant or a big tree). I do like the idea
of everything going into the s
e the return
> > value from insert:
>
> > last_id =db.table.insert(item="some item")
>
> > On Mar 30, 2:00 am, TheDude wrote:
>
> > > Wouldn't last = db().select(db.table.ALL, orderby=~db.table.id, limit=
> > > (1,))[0] be better? Since this way on
Wouldn't last = db().select(db.table.ALL, orderby=~db.table.id, limit=
(1,))[0] be better? Since this way only one row is being retrieved and
less overhead?
On Mar 29, 5:26 pm, mdipierro wrote:
> last = db().select(db.table.ALL).as_list()[-1]
>
> On Mar 29, 3:42 pm, Michael wrote:
>
> > I wasn'
alidator()
>
> In the page you may also need this:
>
> $(document).ready(function() { $('#mailbox_account_id').attr
> ('class','string'); });
>
>
> Hope it makes sense.
>
> Massimo
>
> On Mar 29, 2:19 pm, TheDude wrote:
>
> > Her
I also would like to avoid running a query within the controller/
function of db(db.account.name==request.post.account_id) because I
need this function in several places. :)
On Mar 29, 3:19 pm, TheDude wrote:
> Here's the code:http://pastie.org/private/wmow1xkoaov5ium6cgf8w
>
&
Here's the code:
http://pastie.org/private/wmow1xkoaov5ium6cgf8w
Here's the problem:
ok now a new problem let's say im building a mailbox application (not
like email like a private messaging system) and int he table mailbox I
have account_id (which account its tied to)
On the SQLFORM it shows Acc
Let us know how it goes! :) Will there be a summary follow up? :D
On Mar 28, 9:27 am, mdipierro wrote:
> See you at the web2py booth after Guido's talk today. (free hats)
>
> Please attend the web2py Dojo tonight at 6pm in the Open Space.
>
> Massimo
>
> On Mar 28, 12:00 am, Steve Shepherd wrot
erro wrote:
> > > class IS_GIF:
> > > def __init__(self,em): self.em=em
> > > def __call__(self,value):
> > > if value and value.filename[-4:].lower()!='.gif':
> > > return (value,self.em)
> > > re
How would I only allow gif, png or jpeg images to be uploaded?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe
61 matches
Mail list logo