[google-appengine] Re: Null version

2011-10-04 Thread Pavel Byles
??

On Fri, Sep 30, 2011 at 10:06 AM, Pavel Byles pavelby...@gmail.com wrote:

 Anyone?
 On Sep 29, 2011 1:43 PM, Pavel Byles pavelby...@gmail.com wrote:
  I'm not sure if this is a GWT issue or a GAE issue.
  However, I have used the remote api to initialize my database. When I
 query
  via the remote api I get back all the data including the version just
 fine.
  The problem is when I am trying to get data from my entity all the fields
  are ok except the version field. I am using an entity proxy with request
  factory for GWT.
 
  @Version
  @Column(name = version)
  private Integer version;
 
  public Integer getVersion() {
  return this.version;
  }
 
  public void setVersion(Integer version) {
  this.version = version;
  }
 
  I also have this in my locator:
 
  @Override
  public Object getVersion(Country domainObject) {
  return domainObject.getVersion();
  }
 
 
  Regards,
  Pavel




-- 
--
Pav

-- 
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: Null version

2011-09-30 Thread Pavel Byles
Anyone?
On Sep 29, 2011 1:43 PM, Pavel Byles pavelby...@gmail.com wrote:
 I'm not sure if this is a GWT issue or a GAE issue.
 However, I have used the remote api to initialize my database. When I
query
 via the remote api I get back all the data including the version just
fine.
 The problem is when I am trying to get data from my entity all the fields
 are ok except the version field. I am using an entity proxy with request
 factory for GWT.

 @Version
 @Column(name = version)
 private Integer version;

 public Integer getVersion() {
 return this.version;
 }

 public void setVersion(Integer version) {
 this.version = version;
 }

 I also have this in my locator:

 @Override
 public Object getVersion(Country domainObject) {
 return domainObject.getVersion();
 }


 Regards,
 Pavel

-- 
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] Null version

2011-09-29 Thread Pavel Byles
I'm not sure if this is a GWT issue or a GAE issue.
However, I have used the remote api to initialize my database. When I query
via the remote api I get back all the data including the version just fine.
 The problem is when I am trying to get data from my entity all the fields
are ok except the version field.  I am using an entity proxy with request
factory for GWT.

@Version
@Column(name = version)
private Integer version;

public Integer getVersion() {
  return this.version;
}

public void setVersion(Integer version) {
  this.version = version;
}

I also have this in my locator:

@Override
public Object getVersion(Country domainObject) {
  return domainObject.getVersion();
}


Regards,
Pavel

-- 
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.



Re: [appengine-java] bulkloader dump and restore

2010-05-25 Thread Pavel Byles
bump

On Mon, May 24, 2010 at 10:20 AM, Pavel Byles pavelby...@gmail.com wrote:

 I'm having a problem w/ bulkloading entities for my Java app and specifying
 autogenerated id's in my python model.

 My Java class look similar to this:

 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class MyEntity implements Serializable {
   @PrimaryKey
   @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
   private Long id;


   @Persistent
   private String name;

   @Persistent
   private float otherFloat;
 .
 .
 .
 }

 And my python model (for bulkloading) looks similar to this:

 class CountryLoader(bulkloader.Loader):
   def __init__(self):
 bulkloader.Loader.__init__(self, 'MyEntity',
   [('name', str),
('otherFloat', float)
   ])

 *How do I specify the id in my python model?*




-- 
-Pav

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



Re: [appengine-java] bulkloader dump and restore

2010-05-24 Thread Pavel Byles
I'm having a problem w/ bulkloading entities for my Java app and specifying
autogenerated id's in my python model.

My Java class look similar to this:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class MyEntity implements Serializable {
  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  private Long id;

  @Persistent
  private String name;

  @Persistent
  private float otherFloat;
.
.
.
}

And my python model (for bulkloading) looks similar to this:

class CountryLoader(bulkloader.Loader):
  def __init__(self):
bulkloader.Loader.__init__(self, 'MyEntity',
  [('name', str),
   ('otherFloat', float)
  ])

*How do I specify the id in my python model?*

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



Re: [appengine-java] Re: Error when deleting entities - Id cannot be zero

2010-03-13 Thread Pavel Byles
Got it to work.
Thanx

On Fri, Mar 12, 2010 at 3:19 PM, thierry LE CONNIAT thlec...@free.frwrote:

 HI,
 I have try your function deleteAllMyType
 it's functions well, the differenxces are in my class of object :

 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class Picture {
private static final Logger log =
 Logger.getLogger(Picture.class.getName());

@PrimaryKey
private String fileName;

...
 Picture doesn't extend Serializable and my key is not an id...



 On 12 mar, 14:41, Pavel Byles pavelby...@gmail.com wrote:
  I'm trying to delete all entities in my datastore but I receive the
  following error:
 
  javax.jdo.JDOUserException: One or more instances could not be deleted...
  NestedThrowablesStackTrace:
  java.lang.IllegalArgumentException: id cannot be zero...
 
  Caused by:java.lang.IllegalArgumentException: id cannot be zero
 
  For the following code:
 
public void deleteAllMyType() {
  PersistenceManager pm = PMF.get().getPersistenceManager();
  Query query = pm.newQuery(MyType.class);
  try {
query.deletePersistentAll();
//ListMyType clist = (ListMyType) query.execute();
//pm.deletePersistentAll(clist); // This doesn't work either
  } finally {
query.closeAll();
pm.close();
  }
}
 
  My entity class looks like this:
 
  @PersistenceCapable(identityType = IdentityType.APPLICATION)//,
 detachable =
  false)
  public class MyType implements Serializable {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
 
@Persistent
private String name;
.
.
.
 
  }
 
  --
  -Pav

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




-- 
-Pav

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



Re: [appengine-java] How to upload pics in appengine java

2010-03-13 Thread Pavel Byles
AFAIK almost any file can be apart of the docs that you upload (images, css,
html, js, jsp, ico). I haven't had any trouble uploading images.

Are you talking about accepting images from an input form? In that case you
can store them as a blob type in the datastore.

Hope this helps

On Sun, Mar 14, 2010 at 12:12 AM, nag nagarjuna...@gmail.com wrote:



 Hi
 I am trying to build online reg form
 can u help me how to upload image files to app engine.

 First: is there any way to upload images in app engine?

 thanks
 Nag

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




-- 
-Pav

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



[appengine-java] Error when deleting entities - Id cannot be zero

2010-03-12 Thread Pavel Byles
I'm trying to delete all entities in my datastore but I receive the
following error:

javax.jdo.JDOUserException: One or more instances could not be deleted...
NestedThrowablesStackTrace:
java.lang.IllegalArgumentException: id cannot be zero...

Caused by:java.lang.IllegalArgumentException: id cannot be zero


For the following code:

  public void deleteAllMyType() {
PersistenceManager pm = PMF.get().getPersistenceManager();
Query query = pm.newQuery(MyType.class);
try {
  query.deletePersistentAll();
  //ListMyType clist = (ListMyType) query.execute();
  //pm.deletePersistentAll(clist); // This doesn't work either
} finally {
  query.closeAll();
  pm.close();
}
  }

My entity class looks like this:

@PersistenceCapable(identityType = IdentityType.APPLICATION)//, detachable =
false)
public class MyType implements Serializable {
  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  private Long id;

  @Persistent
  private String name;
  .
  .
  .
}

-- 
-Pav

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



[appengine-java] Re: Error when deleting entities - Id cannot be zero

2010-03-12 Thread Pavel Byles
Anyone?

On Fri, Mar 12, 2010 at 8:41 AM, Pavel Byles pavelby...@gmail.com wrote:

 I'm trying to delete all entities in my datastore but I receive the
 following error:

 javax.jdo.JDOUserException: One or more instances could not be deleted...
 NestedThrowablesStackTrace:
 java.lang.IllegalArgumentException: id cannot be zero...

 Caused by:java.lang.IllegalArgumentException: id cannot be zero


 For the following code:

   public void deleteAllMyType() {
 PersistenceManager pm = PMF.get().getPersistenceManager();
 Query query = pm.newQuery(MyType.class);
 try {
   query.deletePersistentAll();
   //ListMyType clist = (ListMyType) query.execute();
   //pm.deletePersistentAll(clist); // This doesn't work either
 } finally {
   query.closeAll();
   pm.close();
 }
   }

 My entity class looks like this:

 @PersistenceCapable(identityType = IdentityType.APPLICATION)//, detachable
 = false)
 public class MyType implements Serializable {
   @PrimaryKey
   @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
   private Long id;

   @Persistent
   private String name;
   .
   .
   .
 }

 --
 -Pav




-- 
-Pav

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



Re: [appengine-java] Re: Error when deleting entities - Id cannot be zero

2010-03-12 Thread Pavel Byles
GWT: 2.0.3

On Fri, Mar 12, 2010 at 4:38 PM, Max Ross (Google) 
maxr+appeng...@google.com maxr%2bappeng...@google.com wrote:

 What version of the sdk are you using?

 On Fri, Mar 12, 2010 at 1:36 PM, Pavel Byles pavelby...@gmail.com wrote:

 Anyone?


 On Fri, Mar 12, 2010 at 8:41 AM, Pavel Byles pavelby...@gmail.comwrote:

 I'm trying to delete all entities in my datastore but I receive the
 following error:

 javax.jdo.JDOUserException: One or more instances could not be deleted...
 NestedThrowablesStackTrace:
 java.lang.IllegalArgumentException: id cannot be zero...




 Caused by:java.lang.IllegalArgumentException: id cannot be zero


 For the following code:

   public void deleteAllMyType() {
 PersistenceManager pm = PMF.get().getPersistenceManager();
 Query query = pm.newQuery(MyType.class);
 try {
   query.deletePersistentAll();
   //ListMyType clist = (ListMyType) query.execute();
   //pm.deletePersistentAll(clist); // This doesn't work either
 } finally {
   query.closeAll();
   pm.close();
 }
   }

 My entity class looks like this:

 @PersistenceCapable(identityType = IdentityType.APPLICATION)//,
 detachable = false)
 public class MyType implements Serializable {
   @PrimaryKey
   @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
   private Long id;

   @Persistent
   private String name;
   .
   .
   .
 }

 --
 -Pav




 --
 -Pav

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


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




-- 
-Pav

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



Re: [appengine-java] Re: Error when deleting entities - Id cannot be zero

2010-03-12 Thread Pavel Byles
1.3.1

On Fri, Mar 12, 2010 at 4:51 PM, Max Ross (Google) 
maxr+appeng...@google.com maxr%2bappeng...@google.com wrote:

 Which version of the App Engine SDK?



 On Fri, Mar 12, 2010 at 1:43 PM, Pavel Byles pavelby...@gmail.com wrote:

 GWT: 2.0.3

 On Fri, Mar 12, 2010 at 4:38 PM, Max Ross (Google) 
 maxr+appeng...@google.com maxr%2bappeng...@google.com wrote:

 What version of the sdk are you using?

 On Fri, Mar 12, 2010 at 1:36 PM, Pavel Byles pavelby...@gmail.comwrote:

 Anyone?


 On Fri, Mar 12, 2010 at 8:41 AM, Pavel Byles pavelby...@gmail.comwrote:

 I'm trying to delete all entities in my datastore but I receive the
 following error:

 javax.jdo.JDOUserException: One or more instances could not be deleted...
 NestedThrowablesStackTrace:
 java.lang.IllegalArgumentException: id cannot be zero...







 Caused by:java.lang.IllegalArgumentException: id cannot be zero


 For the following code:

   public void deleteAllMyType() {
 PersistenceManager pm = PMF.get().getPersistenceManager();
 Query query = pm.newQuery(MyType.class);
 try {
   query.deletePersistentAll();
   //ListMyType clist = (ListMyType) query.execute();
   //pm.deletePersistentAll(clist); // This doesn't work either
 } finally {
   query.closeAll();
   pm.close();
 }
   }

 My entity class looks like this:

 @PersistenceCapable(identityType = IdentityType.APPLICATION)//,
 detachable = false)
 public class MyType implements Serializable {
   @PrimaryKey
   @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
   private Long id;

   @Persistent
   private String name;
   .
   .
   .
 }

 --
 -Pav




 --
 -Pav

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


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




 --
 -Pav

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


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




-- 
-Pav

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



[google-appengine] Re: how to config gwt to work in app engine effective and productive

2009-03-20 Thread Pavel Byles

Hi indra,
yes. I could do this.

Thanks

On Mar 20, 6:23 am, indra b.indran...@gmail.com wrote:
 Hi Pavel,

 I too use a setup very similar to yours, with both GWT and appengine
 projects in same workspace.
 However I have also managed to setup my GWT environment so that I can
 debug!
 What I basically do is have GWT servlets which act as proxies to the
 actual appengine handlers.
 In these servlets I just forward the call to corresponding appengine
 handler and send back the response received.
 It works great and really saves a lot of time.

 Regards,
 Indraneel

 www.wikiaata.com

 On Mar 17, 6:50 pm, Pavel Byles pavelby...@gmail.com wrote:



  Coonay,
  I use GWT and GAE together and I think it's a pretty good setup.
  First, instead of using servlets you will use the request builder and
  pass data using JSON instead. 2nd I effectively just send my HTML
  output of my GWT project to my GAE project and configure my app.yaml
  accordingly.

  Using this method you will lose a really big part of GWT, which is the
  debugging feature since you will be running dev_appserver. Unless you
  can fix it such that u can get JSON responses from it.

  But I like my setup. I have pydev and cypal both in eclipse. I just
  wish i had debugging somehow.

  On Mar 17, 5:36 am, Coonay fla...@gmail.com wrote:

   Gwt featurs really attractive:quickly build and maintain complex yet
   highly performant JavaScript front-end applications in the Java
   programming language,and Test your code with JUnit.The example mail
   page is really awesome.

   As a many years java progammmer,it's not hard to get into gwt,but the
   app engine is a different web environment,the static page can be
   served to browser directly,
   the hype link in the geranated html are needed to change accordingly.

   could you give me some idea how to make they 2 work together
   effective and productive?thanks so much- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: Datastore newbie question

2009-03-20 Thread Pavel Byles

You can use the bulkloader to initialize your data:
http://code.google.com/appengine/docs/python/tools/uploadingdata.html

-Pavel

On Mar 19, 1:57 pm, Nora noorhanab...@yahoo.co.uk wrote:
 Hello,
 As I haven't used data stores before, I am unable to imagine how it is
 going to behave:)  I have some text files and I want to store its
 contents in datastores.  Do I load the datastore at the beginning and
 then upload my application and use the data in the datastore from
 there? Or do we fill the datastore up every time my applicaiton gets a
 request for it?  Is the data saved in a certain file so when the
 application is uploaded on the google server, this file is transfered
 on the server and I start to use it from there?

 Thank you very much,
 N.
--~--~-~--~~~---~--~~
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: how to config gwt to work in app engine effective and productive

2009-03-17 Thread Pavel Byles

Well, you can use django (or not) to convert your data from the
datastore to json format. Not _actually_ pass the objects themselves.

On Mar 17, 9:57 am, Amr Ellafi amrl...@gmail.com wrote:
 Pavel,
 that's a good idea, you mean you can pass objects from the datastore
 to GWT via JSON ?

 On Tue, Mar 17, 2009 at 3:50 PM, Pavel Byles pavelby...@gmail.com wrote:

  Coonay,
  I use GWT and GAE together and I think it's a pretty good setup.
  First, instead of using servlets you will use the request builder and
  pass data using JSON instead. 2nd I effectively just send my HTML
  output of my GWT project to my GAE project and configure my app.yaml
  accordingly.

  Using this method you will lose a really big part of GWT, which is the
  debugging feature since you will be running dev_appserver. Unless you
  can fix it such that u can get JSON responses from it.

  But I like my setup. I have pydev and cypal both in eclipse. I just
  wish i had debugging somehow.

  On Mar 17, 5:36 am, Coonay fla...@gmail.com wrote:
  Gwt featurs really attractive:quickly build and maintain complex yet
  highly performant JavaScript front-end applications in the Java
  programming language,and Test your code with JUnit.The example mail
  page is really awesome.

  As a many years java progammmer,it's not hard to get into gwt,but the
  app engine is a different web environment,the static page can be
  served to browser directly,
  the hype link in the geranated html are needed to change accordingly.

  could you give me some idea how to make they 2 work together
  effective and productive?thanks so much
--~--~-~--~~~---~--~~
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: Initializing datastore with binary data

2009-03-08 Thread Pavel Byles

When I follow the article from: 
http://code.google.com/appengine/articles/bulkload.html
I get this error:

INFO 2009-03-08 11:22:39,197 bulkload_client.py] Starting import;
maximum 10 entities per post
INFO 2009-03-08 11:22:39,210 bulkload_client.py] Importing 2
entities in 28 bytes
ERROR2009-03-08 11:22:42,421 bulkload_client.py] An error occurred
while importing: Received code 404: Not Found

htmlhead
meta http-equiv=content-type content=text/html;charset=utf-8
title404 Not Found/title
/head
body text=#00 bgcolor=#ff
h1Error: Not Found/h1
h2The requested URL code/load/code was not found on this
server./h2
h2/h2
/body/html

ERROR2009-03-08 11:22:42,421 bulkload_client.py] Import failed

And dev_appserver.py gives this error:
INFO 2009-03-08 16:27:22,004 dev_appserver.py] POST /load HTTP/
1.1 404 -

Any help would be appreciated.

On Mar 6, 3:54 pm, Pavel Byles pavelby...@gmail.com wrote:
 I have no idea why I'm getting errors when I do:

  import helloworld
  from google.appengine.ext import db
  entries = helloworld.Greeting.all().order(-date).fetch(10)

 and my app.yaml contains:
 - url: /remote_api
   script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
   login: admin

 The dev_appserver gives this error:
 INFO     2009-03-06 20:51:38,287 dev_appserver_index.py] Updating /
 home/wikid/Code/google_appengine_v2/caribbeanvisit/index.yaml
 INFO     2009-03-06 20:51:50,570 dev_appserver.py] POST /remote_api?
 HTTP/1.1 404 -

 Here's the error:
 Traceback (most recent call last):
   File console, line 1, in module
   File /home/wikid/Code/google_appengine_v2/google/appengine/ext/db/
 __init__.py, line 1390, in fetch
     raw = self._get_query().Get(limit, offset)
   File /home/wikid/Code/google_appengine_v2/google/appengine/api/
 datastore.py, line 942, in Get
     return self._Run(limit, offset)._Next(limit)
   File /home/wikid/Code/google_appengine_v2/google/appengine/api/
 datastore.py, line 1536, in _Next
     apiproxy_stub_map.MakeSyncCall('datastore_v3', 'Next', req,
 result)
   File /home/wikid/Code/google_appengine_v2/google/appengine/api/
 apiproxy_stub_map.py, line 68, in MakeSyncCall
     apiproxy.MakeSyncCall(service, call, request, response)
   File /home/wikid/Code/google_appengine_v2/google/appengine/api/
 apiproxy_stub_map.py, line 240, in MakeSyncCall
     stub.MakeSyncCall(service, call, request, response)
   File /home/wikid/Code/google_appengine_v2/google/appengine/ext/
 remote_api/remote_api_stub.py, line 169, in MakeSyncCall
     handler(request, response)
   File /home/wikid/Code/google_appengine_v2/google/appengine/ext/
 remote_api/remote_api_stub.py, line 207, in _Dynamic_Next
     'remote_datastore', 'RunQuery', request, query_result)
   File /home/wikid/Code/google_appengine_v2/google/appengine/ext/
 remote_api/remote_api_stub.py, line 135, in MakeSyncCall
     request_pb.Encode()))
   File /home/wikid/Code/google_appengine_v2/google/appengine/tools/
 appengine_rpc.py, line 303, in Send
     f = self.opener.open(req)
   File /usr/lib/python2.5/urllib2.py, line 387, in open
     response = meth(req, response)
   File /usr/lib/python2.5/urllib2.py, line 498, in http_response
     'http', request, response, code, msg, hdrs)
   File /usr/lib/python2.5/urllib2.py, line 425, in error
     return self._call_chain(*args)
   File /usr/lib/python2.5/urllib2.py, line 360, in _call_chain
     result = func(*args)
   File /usr/lib/python2.5/urllib2.py, line 506, in
 http_error_default
     raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
 HTTPError: HTTP Error 404: Not Found

 On Mar 4, 9:18 am, Nick Johnson arach...@notdot.net wrote:

  You can do what you want with remote_api and a little custom code. See
  the article here:http://code.google.com/appengine/articles/remote_api.html

  -Nick Johnson

  On Mar 4, 3:04 am, Pavel Byles pavelby...@gmail.com wrote:

   Is there a way to initialize thedatastorewith binary data to be stored in
   a blob field (without using a form)?

   I have tried putting the data into a CSV file and uploading it using
   bulkloader, but that didn't seem to work.

   Any help would be appreciated.
   --
   -Pav


--~--~-~--~~~---~--~~
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: Initializing datastore with binary data

2009-03-06 Thread Pavel Byles

I have no idea why I'm getting errors when I do:
 import helloworld
 from google.appengine.ext import db
 entries = helloworld.Greeting.all().order(-date).fetch(10)

and my app.yaml contains:
- url: /remote_api
  script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
  login: admin

The dev_appserver gives this error:
INFO 2009-03-06 20:51:38,287 dev_appserver_index.py] Updating /
home/wikid/Code/google_appengine_v2/caribbeanvisit/index.yaml
INFO 2009-03-06 20:51:50,570 dev_appserver.py] POST /remote_api?
HTTP/1.1 404 -

Here's the error:
Traceback (most recent call last):
  File console, line 1, in module
  File /home/wikid/Code/google_appengine_v2/google/appengine/ext/db/
__init__.py, line 1390, in fetch
raw = self._get_query().Get(limit, offset)
  File /home/wikid/Code/google_appengine_v2/google/appengine/api/
datastore.py, line 942, in Get
return self._Run(limit, offset)._Next(limit)
  File /home/wikid/Code/google_appengine_v2/google/appengine/api/
datastore.py, line 1536, in _Next
apiproxy_stub_map.MakeSyncCall('datastore_v3', 'Next', req,
result)
  File /home/wikid/Code/google_appengine_v2/google/appengine/api/
apiproxy_stub_map.py, line 68, in MakeSyncCall
apiproxy.MakeSyncCall(service, call, request, response)
  File /home/wikid/Code/google_appengine_v2/google/appengine/api/
apiproxy_stub_map.py, line 240, in MakeSyncCall
stub.MakeSyncCall(service, call, request, response)
  File /home/wikid/Code/google_appengine_v2/google/appengine/ext/
remote_api/remote_api_stub.py, line 169, in MakeSyncCall
handler(request, response)
  File /home/wikid/Code/google_appengine_v2/google/appengine/ext/
remote_api/remote_api_stub.py, line 207, in _Dynamic_Next
'remote_datastore', 'RunQuery', request, query_result)
  File /home/wikid/Code/google_appengine_v2/google/appengine/ext/
remote_api/remote_api_stub.py, line 135, in MakeSyncCall
request_pb.Encode()))
  File /home/wikid/Code/google_appengine_v2/google/appengine/tools/
appengine_rpc.py, line 303, in Send
f = self.opener.open(req)
  File /usr/lib/python2.5/urllib2.py, line 387, in open
response = meth(req, response)
  File /usr/lib/python2.5/urllib2.py, line 498, in http_response
'http', request, response, code, msg, hdrs)
  File /usr/lib/python2.5/urllib2.py, line 425, in error
return self._call_chain(*args)
  File /usr/lib/python2.5/urllib2.py, line 360, in _call_chain
result = func(*args)
  File /usr/lib/python2.5/urllib2.py, line 506, in
http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found

On Mar 4, 9:18 am, Nick Johnson arach...@notdot.net wrote:
 You can do what you want with remote_api and a little custom code. See
 the article here:http://code.google.com/appengine/articles/remote_api.html

 -Nick Johnson

 On Mar 4, 3:04 am, Pavel Byles pavelby...@gmail.com wrote:

  Is there a way to initialize thedatastorewith binary data to be stored in
  a blob field (without using a form)?

  I have tried putting the data into a CSV file and uploading it using
  bulkloader, but that didn't seem to work.

  Any help would be appreciated.
  --
  -Pav
--~--~-~--~~~---~--~~
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: How to do this?

2009-03-04 Thread Pavel Byles

Sure,
you can store anything in your datastore. I don't see why not.

I am also using the django framework.
Just set up your models and you should be good to go.

On Mar 4, 2:07 am, arnie parvez...@rediffmail.com wrote:
 Sorry for some lack in complete explanation.
 Basically I do not want to store the user session in my user datastore
 table. The user table simply contains user info like first name, last
 name, userid etc and user validation will be using this table. Also I
 am using django framework.
--~--~-~--~~~---~--~~
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: Initializing datastore with binary data

2009-03-04 Thread Pavel Byles

Thanks Nick.

I will definitely try this.

-Pavel

On Mar 4, 9:18 am, Nick Johnson arach...@notdot.net wrote:
 You can do what you want with remote_api and a little custom code. See
 the article here:http://code.google.com/appengine/articles/remote_api.html

 -Nick Johnson

 On Mar 4, 3:04 am, Pavel Byles pavelby...@gmail.com wrote:

  Is there a way to initialize the datastore with binary data to be stored in
  a blob field (without using a form)?

  I have tried putting the data into a CSV file and uploading it using
  bulkloader, but that didn't seem to work.

  Any help would be appreciated.
  --
  -Pav
--~--~-~--~~~---~--~~
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] Initializing datastore with binary data

2009-03-03 Thread Pavel Byles
Is there a way to initialize the datastore with binary data to be stored in
a blob field (without using a form)?

I have tried putting the data into a CSV file and uploading it using
bulkloader, but that didn't seem to work.

Any help would be appreciated.
-- 
-Pav

--~--~-~--~~~---~--~~
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: How to do this?

2009-03-03 Thread Pavel Byles

arnie,
Specifically, if you want your users to use Google's account
credendials you can use the google.appengine.api module and check the
users class.

You can send non-logged in users to the Google Account login for your
application like this
users.create_login_url(self.request.uri))
This will create a cookie in the users' browser that will allow them
to stay logged in

Sow wrt your question, i am not sure that you need to store the users
session information in your datastore for this purpose.

This is all explained in the Getting Started guide:
http://code.google.com/appengine/docs/python/gettingstarted/usingusers.html

Hope this helps.

On Mar 3, 9:29 pm, arnie parvez...@rediffmail.com wrote:
 In my web app there is a user table [datastore] containing the details
 for the users. I want to know that how can we use sessions to maintain
 the session for a signed in user. Does Google Users service [thugh it
 deals with Google Accounts] will be of any help here ?
 Any idea?
 Thanks
--~--~-~--~~~---~--~~
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] GqlQuery to JSON

2009-02-18 Thread Pavel Byles
Hello all,
I would like to get JSON from the result of a GqlQuery.
I've already seen this post  GqlQuery *object* and
JSONhttp://groups.google.com/group/google-appengine/browse_thread/thread/634e7b9a2e584dd3/2d89b9e9db7aba56?lnk=gstq=GqlQuery+object+and+JSON+#2d89b9e9db7aba56
 but it doesn't really help.

I understand that I cannot use serializers.serialize.

Is there another easy way to do this without using simplejson?

--~--~-~--~~~---~--~~
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: GqlQuery to JSON

2009-02-18 Thread Pavel Byles

It's ok. Got it.
Used django.utils.simplejson rather than the regular simplejson module


On Feb 18, 12:16 am, Pavel Byles pavelby...@gmail.com wrote:
 Hello all,
 I would like to get JSON from the result of a GqlQuery.
 I've already seen this post  GqlQuery *object* and
 JSONhttp://groups.google.com/group/google-appengine/browse_thread/thread/...
  but it doesn't really help.

 I understand that I cannot use serializers.serialize.

 Is there another easy way to do this without using simplejson?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---