[google-appengine] Re: Creating unique key names
There's no currently available method to identify process and machine. Your best bet is random id generated during module initialization. On Nov 22, 9:46 pm, Andy Freeman [EMAIL PROTECTED] wrote: os.getpid isn't available Thanks. nor unique across processes. Huh? During the life of a process A on a machine B, no other process on B will have the same process id as A. Two different processes on a given machine may have the same id if their lifetimes are disjoint and two processes on different machines may have the same process id at the same time, but the latter is just why some sort of machine identifier is important. On Nov 22, 5:43 pm, yejun [EMAIL PROTECTED] wrote: UUID should be ok, which use system urandom as seed by default. os.getpid isn't available nor unique across processes. On Nov 22, 8:07 pm, David Symonds [EMAIL PROTECTED] wrote: On Sun, Nov 23, 2008 at 8:50 AM, Andy Freeman [EMAIL PROTECTED] wrote: Suppose that I want to atomically create an entity group with two nodes, one the parent of the other. But *why* exactly do you want to do this? Because I want a set of one or more entities that can be manipulated in a single transaction. Entity group relationships tell App Engine to store several entities in the same part of the distributed network. A transaction sets up datastore operations for an entity group, and all of the operations are applied as a group, or not at all if the transaction fails. Yes, I understand transactions and entity groups. Why do you need to create an entity group *atomically*? The fact that GAE uses many machines and concurrently is why the full hostname, IP, or MAC address or some other machine identifier is useful in creating a unique identifier on GAE. (If my application always ran on the same machine, the process id and time would be sufficient.) If you create a new entity, it will automatically be assigned a unique key at the datastore level. What's wrong with just using that? Dave.- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: deploying applicaiton to multiple customers
My understanding of the current situation is as follows: - You either deploy one app for all domains (then you need to implement the billing and quota stuff per domain on your own, that of course doesn't make sense now with the preview quota limitations) or - You deploy for each customer you app with a different app-id (that will be a maintenance nightmare if you have many customers) regards Roberto On Nov 23, 7:00 am, gops [EMAIL PROTECTED] wrote: Hi , I want to create an enterprise grade to do list -- and sell it to some customer. Is it possible , to deploy an application on different domain -- the deployed application will use different database for each domain. and manage it through single dashboard ? If not possible right now , will it be in near future , say march ? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] deploying applicaiton to multiple customers
Hi , I want to create an enterprise grade to do list -- and sell it to some customer. Is it possible , to deploy an application on different domain -- the deployed application will use different database for each domain. and manage it through single dashboard ? If not possible right now , will it be in near future , say march ? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] looking for a project
Hi, I want to contribute in a GAE open source project, is anybody looking for a partner? Regards, JP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Can i use google app engines ssl with level 2 integration?
Hi Marzia, I've got a question about this: On my app, I know that I was losing the session when I had PayPal return to www.myapp.com when the user had originally signed in from myapp.com (naked domain). I've since fixed that issue when by forwarding everything to www. in my front controller. However, how will the user's session be affected if they sign in from www.myapp.com and then return to myapp.appspot.com? Does this mean that the user will have to sign in twice? Thanks, Aral On Nov 18, 9:44 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, I'm guessing you mean 'level 2' integration with Google Checkout. And yes, this is possible, simply enter the appspot URL where you have written your secure callback handler in to your Google Checkout merchant account settings. -Marzia On Tue, Nov 18, 2008 at 1:42 PM, Barry Hunter [EMAIL PROTECTED]wrote: level 2 integration of what? On Tue, Nov 18, 2008 at 8:28 PM, Will F. [EMAIL PROTECTED] wrote: Can i use google app engines ssl with level 2 integration? -- Barry -www.nearby.org.uk-www.geograph.org.uk- --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Can i use google app engines ssl with level 2 integration?
And here's a useful link of Google Checkout Level 1 and 2 checkout implemented in web2py: http://mail.python.org/pipermail/python-announce-list/2008-October/006988.html Aral --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] thanks
Thanks to everyone for taking the time to reply! Kieran --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Version number looks weird after my recent upload.
What format is the timestamp in? Joe On Nov 13, 1:24 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, The version numbers have been switched so that they are timestamped based, indicating the time that the version was uploaded. -Marzia On Wed, Nov 12, 2008 at 6:28 PM, CNBorn [EMAIL PROTECTED] wrote: Hi All, I am running a Todolist app on AppEngine(Currently in zh_CN), [http://checknerds.appspot.com]. But after a recent upload, I found the version number lookss weird. Now the version number hsould be 1.89, but I get 1.329236891998284311 instead. Is there something wrong with this? Does anybody else encountering the same problem? P.S, It seems that the other stuff are running well. BR, CNBorn --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Python Twitter API Wrapper problem w/ urlfetch
On Nov 22, 5:35 pm, Amir Michail [EMAIL PROTECTED] wrote: Hi, I'm stuck on the authorization part: Update: both the local and deployed versions result in an authentication failure. Any hints on how I could debug this? Amir if self._username and self._password: self._AddAuthorizationHeader(self._username, self._password) print self._request_headers = +`self._request_headers` requestBody = urllib.urlencode(self._request_headers) url_data = urlfetch.fetch(url, method=urlfetch.POST, headers={'Content-type': 'application/x-www-form- urlencoded', 'Content-Length': str(len(requestBody))}, payload=requestBody).content This gives the following exception when a username and password are supplied: ...\src\twitter.py in NewFromJsonDict(data=u'request') 547 else: 548 status = None 549 return User(id=data.get('id', None), 550 name=data.get('name', None), 551 screen_name=data.get('screen_name', None), global User = class 'twitter.User', builtin id = built-in function id, data = u'request', data.get undefined, builtin None = None, name undefined, screen_name undefined, location undefined, description undefined, profile_image_url undefined, url undefined, status = None type 'exceptions.AttributeError': 'unicode' object has no attribute 'get' Any ideas how to get this to work? Amir --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Full Text Search Issues
hi anurag! a couple things are going on here. first, you actually do need another index. appengine.ext.search converts search queries into normal queries, with one filter for each search keyword. so, this: User.all().search('hug bos').order('-date_joined') is equivalent to this: User.gql(WHERE __searchable_text_index = 'hug' AND __searchable_text_index = 'bos' ORDER BY date_joined DESC) so, you need a different index for each different number of search keywords that you want to support. specifically, for this search query, you'd need: - kind: User properties: - name: __searchable_text_index - name: __searchable_text_index - name: date_joined direction: desc if you drop the sort order, you no longer need an index because the query then has only equals filters. see: http://code.google.com/appengine/docs/datastore/queriesandindexes.html#Defining_Indexes_With_index_yaml the second thing, which is causing your confusion, is that the bo keyword is being ignored due to this constant in appengine/ext/search/ __init__.py: # words shorter than this will not be indexed. search keywords shorter than # this will be ignored. _FULL_TEXT_MIN_LENGTH = 3 if you want to index and search on keywords under 3 characters, you can change this constant by adding this code to your main(), or somewhere similar: google.appengine.ext.search._FULL_TEXT_MIN_LENGTH = 1 --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: SDK 1.1.6 Released
hi denis! On Nov 22, 12:54 pm, Denis [EMAIL PROTECTED] wrote: You can now delete an entity directly using its key, without instantiating/fetching the Model object Good. Will this be documented? yup, it already is: http://code.google.com/appengine/docs/datastore/functions.html#delete What happens is I pass non-existing key? On SDK the non-existing keys seem to be simply ignored. However the documentation suggest an exception will be raised (it also says an exception will be raised if the call span multiple entity groups!). hmm, sorry if the documentation is unclear. you're right, deleting a non-existent key is a noop. the docs say An exception will always be raised *if any error occurs*, and deleting a non-existent key isn't considered an error. also, deleting entities from multiple entity groups is allowed, and even encouraged for efficiency. the This may happen if the keys in the call span multiple entity groups. sentence refers to the even if some of the entities actually were deleted phrase, since deleting entities across entity groups is not atomic. I'm also concerned about the performance of this deletion. I have a ... This code works, but works significantly slower (4 times) that the previous code with preliminary db.get(). It looks like deleting non- existing records take the same amount of time as deleting an existing record. Is this the SDK issue, or the production will also have such an issue? as has been discussed before: http://groups.google.com/group/google-appengine/browse_thread/thread/6a712cb3eddb152d http://groups.google.com/group/google-appengine/browse_thread/thread/ba8d4ff7d825214/a5fc345c86a5abf2#a5fc345c86a5abf2 the SDK's performance is not representative of performance in production. also, deleting non-existent keys in production will usually be faster than deleting existing entities. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Version Problems
Not us, Google can with their SDK! ;) On Sun, Nov 23, 2008 at 9:03 PM, Faber Fedor [EMAIL PROTECTED] wrote: Waitaminnit! We can do minor versioning?! Every time I put a non-integer value for version in my app.yaml file, I get a regex error. Reading the regex, it looks like it wants only integers for version numbers! On Sun, Nov 23, 2008 at 12:13 AM, David Symonds [EMAIL PROTECTED] wrote: On Sun, Nov 23, 2008 at 2:51 PM, MajorProgamming [EMAIL PROTECTED] wrote: I noticed that the versions of two of my apps are displaying something like the following: 1.329480897355837812. It is very strange because there is no way I did that many revisions, yet somehow, it's up to that number. I think it happened after one of the last scheduled downtimes. I would appreciate if someone could enlighten me... (normally I wouldn't care, but one of those apps has the version placed inside the footer so users can see where we're up to) The minor versioning system has changed -- it's a timestamp now. -- Faber Fedor Cloud Computing New Jersey http://cloudcomputingnj.com -- o L_/ OL This is Schäuble. Copy Schäuble into your signature to help him on his way to Überwachungsstaat. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Creating app.yaml
I can Rename in Vista,so,you can't rename it's type from txt to yaml maybe you fogot to dismiss the .txt at the end of file name. 2008/11/23 yejun [EMAIL PROTECTED]: Copy it from google_appengine\new_project_template and change the app name. On Nov 22, 12:31 pm, Grady [EMAIL PROTECTED] wrote: I am trying to create my first GAE app off by following a screencast. In the screencast the author simply creates a new .txt file and names it app.yaml. XP recognizes this as a .yaml file and changes the file type under description and the icon. I feel like a loser, but when I do these same steps Vista does not change its type from a txt to yaml. Because of this when I run appcfg.py i get the following appcfg.py: error: Directory does not contain an app.yaml configuration file. What do I have to do to create a .yaml file? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] binding of parameters to GQL query: varargs + dictionary
Hello, So I am not a Python programmer, though I am currently trying to pick it up. My question is whether there is a way I can stash all my named arguments in a dictionary and then pass that off to the GQL query somehow? What I am trying to do is dynamically generate my GQL queries based on how my user fills-out a form. so here's the constructor I am calling: class GqlQuery(query_string, *args, **kwds) Instead of passing a bunch of arguments in here, is there a way to pass or finesse a dictionary object into those arguments? Being new to Python I was hoping to find a bind() method that accepted a dictionary as a parameter and took care of this for me. Here's some contrived sample code to illustrate my question: filters = {} whereSection = WHERE if (name != None): if (len(filters) 0): whereSection += AND whereSection += name = :name filters['name'] = name if (busRoute != None): if (len(filters) 0): whereSection += AND whereSection += routeNumber = :routeNumber filters['routeNumber'] = busRoute.number if (len(filters) 0): busesDriven = BusTraffic.gql(whereSection + ORDER BY yearBuilt, filters) Since that does not work as written, is there a way to get filters into a format the **kwds varargs param in the prototype above expects? Seems like there ought to be, if only I had enough of a handle on Python. If not, would it be a useful constructor for the AppEngine folks to implement?: class GqlQuery(query_string, args_dictionary) My interim solution is to just have a GQL statement for each number of bind arguments, which is hacky, but will work for now. 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] i can't deploy app engine SDK on powerpc Mac
i can't deploy app engine on powerpc Mac. is it support? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] HowTo extend base Entity class and query it's subclasses?
For example I have an entity: AbstractRecord, it has fields: String name, Date publishDate, Author recordAuthor, List tagList. And I have several subclasses: BlogRecord, CommentRecord, AdvertiseRecord. They extend AbstractRecord, they have their own specific fields. Can I make a query: Select * from AbstractRecord where tagList = 'google' And get all AbstractRecord entites, also its subclasses which have tag 'google' in List field. I've read http://groups.google.com/group/google-appengine/browse_thread/thread/cadc90001d575217/1d0f86ab618f292a?lnk=gstq=extend+entity#1d0f86ab618f292a Seems like I can't do it? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: looking for a project
yes,I have an iead ,and want to do it with gae 2008/11/23 JP [EMAIL PROTECTED] Hi, I want to contribute in a GAE open source project, is anybody looking for a partner? Regards, JP -- 刘鑫 --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Content-Encoding?
Hallo, Setting the Content-Encoding using the Response object or app.yaml is impossible. Is there now workaround, like setting up a miniature http- server in pure python inside the appengine that does what we want? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] How to open .html in .py file?
I just want to call a html file and display it,but I'don't know how to do! foe example: my test.yaml: application: test*** version: 1 runtime: python api_version: 1 handlers: - url: /.* script: test.py I just want display the index.html in my root,how to write the test.py file? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Saving files
There's db.BlobProperty as file data type blob = self.request.POST['file'].file.read() You can store files as blobs i.e. db.BlobProperty and you could store files 1 mb by complicatingly breaking the file into 1 mb datapieces. I had a look here: http://code.google.com/p/gae-services-examples/source/browse/trunk/srv/fridge/views.py On Nov 23, 2:58 am, Involute [EMAIL PROTECTED] wrote: I'm going over the introductory materials for the App Engine and have completed the tutorial. The application I'm thinking of developing involves inputting data into the datastore, then extracting it in various ways and formatting it into web pages stored at computed URLs. My reading of the App Engine docs suggests I can't do that since I can only store things in the datastore, not individual files. Just wanted to confirm that. If that's true, any suggestions for workarounds? I might be willing to bundle everything into one big file and e-mail someplace outside of the App Engine where the files get extracted and hosted, but that, too, requires storing a file, however briefly. Involute --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: How to open .html in .py file?
there is a new project template in your appengine installation path. You could refer to that. On 11/23/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I just want to call a html file and display it,but I'don't know how to do! foe example: my test.yaml: application: test*** version: 1 runtime: python api_version: 1 handlers: - url: /.* script: test.py I just want display the index.html in my root,how to write the test.py file? thanks. -- Sent from my mobile device Best Regards, TANG Jiyu (Blog: http://jiyu.wordpress.com.cn) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: looking for a project
Check the frontpage of this group. There are many opensource projects listing there. On 11/23/08, JP [EMAIL PROTECTED] wrote: Hi, I want to contribute in a GAE open source project, is anybody looking for a partner? Regards, JP -- Sent from my mobile device Best Regards, TANG Jiyu (Blog: http://jiyu.wordpress.com.cn) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] my website stopped working suddenly
Hi, my website (http://www.denizlispor.com/) stopped working suddenly.. its pointing to ghs.google.com the app itself over at denizlispordotcom.appspot.com is working fine. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: How can I download my application?
You might also check out http://tinyurl.com/6noqsx . I haven't used it, or even read beyond the summary, but it sounds like it might do what you want. Involute. On Nov 22, 6:53 am, Xiaopan Zhang [EMAIL PROTECTED] wrote: Hi All, I know appcfg.py can upload project files on my local disk to the websites, However, I usually develop on multiple machines and they don't share a repository, is there a way that I can *download* the liver version of project files from the websites to my local disk? I browsed for sometime but I can't find any clue. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] page not found (404)
Hello, I get the below error after i click on the submit button. I am trying to save data from an input box to the datastore. the line form action=/saveBUser method=post, saveBUser should be a function in the vews.py correct? I have the feeling i am not giving this the correct path. I have included urls.py, views.py, step1_form.html, and forms.py. Any suggestion will be appreciated. Thank you. # error that is coming back --- Using the URLconf defined in urls, Django tried these URL patterns, in this order: 1. ^admin/ 2. ^mytest$ The current URL, /saveBUser, didn't match any of these. #--- My urls.py one directory above my app. is : from django.conf.urls.defaults import * urlpatterns = patterns('', # Example: # (r'^foo/', include('foo.urls')), # Uncomment this for admin: (r'^admin/', include('django.contrib.admin.urls')), (r'^mytest$', include('mytest.urls')), ) #- My urls.py at the app level is: from django.conf.urls.defaults import * urlpatterns = patterns('mytest.views', #(r'^$', 'mytest.views.index'), #(r'^views$', 'mytest.views.saveBusinessUser'), (r'^$', 'index'), (r'^saveBUser$', 'mytest.views.saveBUser'), ) # #My step1_form.html is: body class=tAdvReg {% if posts %} {% for saveBUser in posts %} {% if saveBUser.firstName %} em{{ saveBUser.firstName.nickname }}/em wrote:br/ {% else %} emAn anonymous person/em wrote:br/ {% endif %} {{ saveBUser.firstName }}br/br/ {% endfor %} {% endif %} form action=/saveBUser method=post table {{ form.as_table }} /table divinput type=submit value=Account Registration/div /form /body /html #- #My views.py is: def index(request): query = BusinessUser.gql('ORDER BY date DESC') form = AcctRegistration() return render_to_response('step1_form.html', {'posts': query.fetch(20), 'form': form } ) def saveBUser(request): form = AcctRegistration(request.POST) if form.is_valid(): saveBUser = BusinessUser(firstName=form.clean_data['firstName']) if users.GetCurrentUser(): saveBUser.firstName = BusinessUser(firstName=form.clean_data ['firstName']) saveBUser.firstName = users.GetCurrentUser() saveBUser.put() # --- forms.py - from django import newforms as forms class AcctRegistration(forms.Form): firstName=forms.CharField(label='First Name') --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] best practice for using JS and AJAX with GAE
I am pretty new to web development in general, in fact to any kind of CS development. Through my process of learning what I need to know I think sometimes I miss the big picture, and that hurts me later. I started using GAE with basic html, and then moved to using Jquery. Now it seems to me that have few pages for an app, and using ajax to update and change content would be a good move. My question is this, what are the pros and cons of using a lot of javascript and/or ajax. One example recently, I needed to parse some text from a quiz that my users submits, I didn't really know if it was better to parse in JS, then use ajax to send it to my python script and store it in the datastore, or send the raw data and parse it in Python before sending it to the datastore. I have read many of the posts on optimal data structure and the like and have learned a lot from them, so this is meant as a pretty open ended question for best practices. Thanks, Scott --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: my website stopped working suddenly
Hi, Your problem is with DNS but not related with Google App Engine. Contact register.com $ host -t ns denizlispor.com denizlispor.com name server dns185.b.register.com. denizlispor.com name server dns190.a.register.com. denizlispor.com name server dns228.c.register.com. denizlispor.com name server dns249.d.register.com. $ dig +qr www.denizlispor.com ; DiG 9.4.2-P2 +qr www.denizlispor.com ;; global options: printcmd ;; Sending: ;; -HEADER- opcode: QUERY, status: NOERROR, id: 15694 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;www.denizlispor.com. IN A ;; connection timed out; no servers could be reached On Nov 24, 3:23 am, Efe [EMAIL PROTECTED] wrote: Hi, my website (http://www.denizlispor.com/) stopped working suddenly.. its pointing to ghs.google.com the app itself over at denizlispordotcom.appspot.com is working fine. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: HowTo extend base Entity class and query it's subclasses?
On Nov 23, 8:02 pm, Serega.Sheypak [EMAIL PROTECTED] wrote: For example I have an entity: AbstractRecord, it has fields: String name, Date publishDate, Author recordAuthor, List tagList. And I have several subclasses: BlogRecord, CommentRecord, AdvertiseRecord. They extend AbstractRecord, they have their own specific fields. Can I make a query: Select * from AbstractRecord where tagList = 'google' And get all AbstractRecord entites, also its subclasses which have tag 'google' in List field. Sorry, you can't do it. It 's because Datastore uses different entity kinds for your inherited model classes. Translation is simple: Entity Kind = Name of your Model class Datastore is not an object oriented database and from its point of view, these records are for different entity kinds. On the other hand, datastore doesn't require a central schema for your entities of same type. Instead of trying to use inheritance with db.Model, switch to Expando, define your base properties again and add a record_type property. In expando, all properties are dynamic so add whatever needed in your control flow. Record Type will help you to discriminate your records in the query. If you want model level validations, you have to roll them manually. In case you desire to use inheritance for whatever kind of plausible reason, you might try create your own inheritable db.Expando and fix the entity naming behavior with some monkey patching (http:// en.wikipedia.org/wiki/Monkey_patch) Good luck! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: my website stopped working suddenly
hi thanks for replying, your name suggest sen Turk'sun? the Register.com says nothing wrong on their side i'm now puzzled with all this.. On Nov 24, 9:56 am, Berk D. Demir [EMAIL PROTECTED] wrote: Hi, Your problem is with DNS but not related with Google App Engine. Contact register.com $ host -t ns denizlispor.com denizlispor.com name server dns185.b.register.com. denizlispor.com name server dns190.a.register.com. denizlispor.com name server dns228.c.register.com. denizlispor.com name server dns249.d.register.com. $ dig +qrwww.denizlispor.com ; DiG 9.4.2-P2 +qrwww.denizlispor.com ;; global options: printcmd ;; Sending: ;; -HEADER- opcode: QUERY, status: NOERROR, id: 15694 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;www.denizlispor.com. IN A ;; connection timed out; no servers could be reached On Nov 24, 3:23 am, Efe [EMAIL PROTECTED] wrote: Hi, my website (http://www.denizlispor.com/) stopped working suddenly.. its pointing to ghs.google.com the app itself over at denizlispordotcom.appspot.com is working fine. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---