[google-appengine] Re: Python GAE version of Rails' validates_uniqueness_of

2009-08-17 Thread Daniel Rhoden
Thanks Nick.  Always appreciate the help!

Regarding the prefix you put in the key_name, on hunch it looks to  
have other benefits.  I suspect memcache.  Do you have any other  
pearls you can toss out about it, and ways that known key_name  
prefixes can be leveraged?

--Daniel Rhoden


On Aug 17, 2009, at 5:21 AM, Nick Johnson (Google) wrote:

> Hi Daniel,
>
> The best way to ensure uniqueness is to use key names. In this case,  
> the natural key name is the User's ID. For example:
>
> user_account = Account(key_name = 'user:%d' %  
> (current_user.user_id(),), ...)
>
> This also allows you to look up user accounts without a query:
>
> user_account = Account.get_by_key_name('user:%d' %  
> (current_user.user_id(),))
>
> -Nick Johnson
>
> On Mon, Aug 17, 2009 at 2:45 AM, Daniel Rhoden   
> wrote:
> I discovered that my 'Account' model happily created multiple  
> instances of user 't...@example.com' without complaint during  
> testing.  (I know, fix my code).
>
> Short question: What's the lightest way of ensuring value uniqueness  
> between entity values?
>
> I've read up on the Property class constructor argument "validator"  
> and got to wondering if there is a RoR-like library of prefab  
> validators.  It would be great if I could do something like this:
>
> from google.appengine.ext import validation
>
> class Account(db.Model):
>   user  = db.UserProperty(required=True,  
> validator=validation.unique(db.UserProperty) )
>   ...
>
> related resources:
> http://code.google.com/appengine/docs/python/datastore/propertyclass.html
> http://googleappengine.blogspot.com/2009/07/writing-custom-property-classes.html
>
> --Daniel Rhoden
>
>
>
>
>
>
>
>
> -- 
> Nick Johnson, Developer Programs Engineer, App Engine
>
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Python GAE version of Rails' validates_uniqueness_of

2009-08-16 Thread Daniel Rhoden
I discovered that my 'Account' model happily created multiple  
instances of user 't...@example.com' without complaint during  
testing.  (I know, fix my code).

Short question: What's the lightest way of ensuring value uniqueness  
between entity values?

I've read up on the Property class constructor argument "validator"  
and got to wondering if there is a RoR-like library of prefab  
validators.  It would be great if I could do something like this:

from google.appengine.ext import validation

class Account(db.Model):
   user  = db.UserProperty(required=True,  
validator=validation.unique(db.UserProperty) )
   ...

related resources:
http://code.google.com/appengine/docs/python/datastore/propertyclass.html
http://googleappengine.blogspot.com/2009/07/writing-custom-property-classes.html

--Daniel Rhoden




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: YUI widgets and GAE

2009-07-29 Thread Daniel Rhoden

If its not too far committed, you might entertain using jQuery instead  
of YUI.  There is a plugin for just about everything.

Here is a blog entry I found regarding a guy who evaluated YUI and  
then ended up with jQuery.
http://henritersteeg.wordpress.com/2009/03/11/user-interface-widgets-from-yui-to-jquery-ui/

In my limited use of jQuery I've found it incredibly easy to use.  I  
love how many options there are for any one widget.  The variety gives  
me a better chance of using the thing right out of the box.

On Jul 29, 2009, at 1:23 PM, Djaccb wrote:

>
> I have written a small program using the YUI data table widget and
> GAE. When I run the program locally the YUI data table widget works
> correctly. However when I load the program to GAE the scroll bars in
> the data table do not show.
>
> I am wondering if there are settings I can modify so my program works
> the same whether or not the program runs locally or hosted on the
> GAE.
>
> Are other people seeing some discrepancies between running the program
> locally and being hosted on GAE?
>
> Sincerely,
>
> Dave
>
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Unable to Deploy New Version

2009-07-29 Thread Daniel Rhoden

I did the same thing and learned that you can't do decimal version  
number, only integers.  (oh the waisted time)


On Jul 29, 2009, at 11:53 AM, Joshua Smith wrote:

>
> Figured it out.  There was a syntax error in my .py file, and I was
> getting this weird error, instead of the usual stack trace syntax
> errors usually produce.  That's what I get for deploying a "trivial"
> change without running it locally first! :)
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Registered app not showing

2009-07-29 Thread Daniel Rhoden
Dag-nabit.  I just discovered that I never registered the account 
cleanslateso...@gmail.com 
.  I did some Googling and found out that account was used at one  
point by a similar entity (what are the odds??)

So sorry for the confusion.  I hope this doesn't mess anything up by  
activating that gmail account for the app.


On Jul 29, 2009, at 11:39 AM, Nick Johnson (Google) wrote:

> Hi Daniel,
>
> Signing up with an additional account is fine, as long as you don't  
> use it to create apps that attempt to evade the free quota limits by  
> distributing your traffic across multiple apps. I'll activate your  
> gmail account so you can use it to create the app. Once you've done  
> so, you can add your other address as an administrator on the app,  
> so you don't have to manage two separate accounts.
>
> -Nick Johnson
>
> On Wed, Jul 29, 2009 at 5:31 PM, Daniel Rhoden   
> wrote:
> Thanks so much!  I DO have that account.
>
> If I sign up with that account as well, wouldn't I be in violation  
> of having more than one App Engine Account?  Is that ok now?
>
>
> On Jul 29, 2009, at 11:10 AM, Nick Johnson (Google) wrote:
>
>> Hi Daniel,
>>
>> The app id you mention doesn't exist. It will show up as in use if  
>> a gmail account exists with that username. If that's your gmail  
>> account, you can sign in with it and use it to create the app.
>>
>> -Nick Johnson
>>
>> On Wed, Jul 29, 2009 at 3:46 AM, Daniel Rhoden   
>> wrote:
>> What can I do about an app name I registered but doesn't appear in  
>> my app list, nor can I register for it now because App Engine  
>> thinks it's taken.
>>
>> Who else would really want 'cleanslatesoaps'?
>>
>> Thanks,
>>
>> Daniel
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Registered app not showing

2009-07-29 Thread Daniel Rhoden
Thanks so much!  I DO have that account.

If I sign up with that account as well, wouldn't I be in violation of  
having more than one App Engine Account?  Is that ok now?


On Jul 29, 2009, at 11:10 AM, Nick Johnson (Google) wrote:

> Hi Daniel,
>
> The app id you mention doesn't exist. It will show up as in use if a  
> gmail account exists with that username. If that's your gmail  
> account, you can sign in with it and use it to create the app.
>
> -Nick Johnson
>
> On Wed, Jul 29, 2009 at 3:46 AM, Daniel Rhoden   
> wrote:
> What can I do about an app name I registered but doesn't appear in  
> my app list, nor can I register for it now because App Engine thinks  
> it's taken.
>
> Who else would really want 'cleanslatesoaps'?
>
> Thanks,
>
> Daniel
>
>
>
>
>
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Anything better than naked domains?

2009-07-29 Thread Daniel Rhoden

At any of the paid levels or free, is there any better support of  
private domains than just naked domains, mapping  to http:// 
.yourdomain.com ?

For example, lets say I have domain 'mydomain.com' and I registered  
'mydomain' on App Engine.  It would be pretty silly having people go  
to 'http://mydomain.mydomain.com/'

So I'm wanting to know, is there a way I can have 'mydomain.com' BE my  
domain for my app?

Thanks.

Also, will there be any DNS offerings?

--Daniel Rhoden
Guntersville, Alabama

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Registered app not showing

2009-07-29 Thread Daniel Rhoden
What can I do about an app name I registered but doesn't appear in my  
app list, nor can I register for it now because App Engine thinks it's  
taken.

Who else would really want 'cleanslatesoaps'?

Thanks,

Daniel


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Type for any types of proprety?

2009-07-29 Thread Daniel Rhoden

A String can go a long way as well.  Hopefully your property table has  
some sane restrictions as to what can go in it.

On Jul 29, 2009, at 3:00 AM, Tobias wrote:

>
> You may want to use an expando as described here
> http://code.google.com/appengine/docs/python/datastore/expandoclass.html
>
> On Jul 29, 5:03 am, Juguang XIAO  wrote:
>> Hello.
>>
>> In datastore, I want to create a misc "table" to store dynamic  
>> properties
>> which is not in the defined model. For example
>>
>> class Account_base(db.Model):
>>   account_id =  db.StringProperty()
>>   password   = db.StringProperty()
>>
>> class Account_extension(db.Model):
>>   base_key = db.StringProperty() # refer to base's key
>>   prop_name = db.StringProperty() # property name
>>   prop_value = db.StringProperty() # property value - this is where  
>> I want
>> to want make it dymanic typed, often TextProperty or  
>> IntegerProperty!!
>>
>> What should I define the type of Account_extension.prop_value, so  
>> that I can
>> possibly assign it any type of values?
>>
>> Many thanks.
>>
>> Juguang
>>
>> --
>> =
>> Juguang XIAO
>> Beijing, China
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Registered app not showing

2009-07-29 Thread Daniel Rhoden
What can I do about an app name I registered but doesn't appear in my  
app list, nor can I register for it now because App Engine thinks it's  
taken.

Who else would really want 'cleanslatesoaps'?

Thanks,

Daniel


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---