I am interested in having a callback or block of code that runs when I edit and save an entity in the datastore from the Google Console Admin.
Would anyone know how I can do that? Is it possible?
Related
This webpage appeared when I deployed my app on the App Engine and it seems anyone can access it and send messages to all the Android devices registered with my webapp. Although, there is an option to authenticate users before posting messages but I don't want even the users of my app to post messages to the registered devices. Is there a way to make this page accessible only to the app administrator?
Thanks in anticipation for taking the time to help me out!
I suggest that you use a feature available in App Engine console to provide Admin only pages. This feature allows you to define certain URLs/pages that will require an Administrator of your application to login. App Engine does all the heavy lifting for you and you would not really need to change your code too.
Check out the documentation : https://developers.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_Administration_console_custom_pages
Once you configure it, the pages will appear inside of the App Engine console.
Assuming you are using webapp2 handlers to output this page, and storing the current username in a session variable, here is what you can do to perform this check just before writing this page on the response stream:
class Settings(BaseHandler):
def get(self):
template = JINJA_ENVIRONMENT.get_template('settings.html')
user=self.session['user']
if user=='admin': #validate your admin user here.
self.response.write( template.render(values) )
else:
self.redirect('/404') #or anything of your choosing
BaseHandler is a special class I've derived from webapp2.RequestHandler and included session handling features in it. Read my complete artcile to know more about it.
I would like to create an entity in my datastore from the admin console on google app engine.
To do this, I read I must clicked on the tab "create" in the datastore viewer BUT I don't have this link.
I have just the "query" tab and as I have no data, nothing appears.
How can I create an entity from the admin console on google app engine?
App Engine will only let you create new entities for a Kind that has already been defined. If you haven't ever saved anything to the datastore, your datastore is a blank slate, and you won't be able to query or create in it.
If you don't want to deploy code in order to write your first entities to the datastore, you can enable the interactive console in production, and write code that generates a model, populates, and saves it. Once you've done that, your Create link should appear.
Check the permissions section maybe you only have the Viewer role which doesn't allow you to create entities.
BTW, the create link looks like this:
I recently created a new google account and registered a new domain for google app engine that i want to use now with a java gae project i wrote.
When i try to access
https://appengine.google.com/
or
https://appengine.google.com/a/my-domain.com
i always get redirected to a page
"Welcome to Google App Engine Before getting started, you want to
learn more about developing and deploying applications."..... Create
Application
When i push this button, and enter the phone number i used to create the account/domain this is refused with:
The phone number has been sent too many messages or has already been
used to confirm an account.
I am not able to deploy my GAE application as i simply dont know the Application ID. I can not create a new one and i can not find out if i already created one as there is no way to access the dashboard.
Any Hint?
Please help
You already used that number to validate a different Google account, you need to create the application with that account.
More information at the SMS Verification for App Creation FAQ
Google recommends to fill out the following form in this event to verify the account manually:
https://appengine.google.com/waitlist/sms_issues
I have made a simple script that retrieves a top 25 visited urls from our Google analytics account, and the data is outputted as I want it.
However I would like the output to be displayed eventhough the visitor hasn't logged in using a google account. Googling on the subject hasn't given me any pointers how to come about that task?
do not configure login in your app.yaml
How do I setup Account Registration, Login, etc in Grails when developing for the Google App Engine? Normally I would use the Acegi plugin but I've read that it doesn't work with Google App Engine.
For reference, I'm using the Grails app-engine and gorm-jpa plugins.
Google App Engine allows you to manage users through their Google Accounts Java API. The page provides example codes which you can easily implement with Groovy.
Hope it helps.
You should take a look at this patch: http://jira.codehaus.org/browse/GRAILSPLUGINS-1233. I haven't used it yet but might be what you are after.
In my opinion, it is essential to create custom authentication instead of using Google Account API to create any viable application run on GAE.
So, I created my own solution to tackle this problem which you may interested to have a look at URL:
http://grailsfuse.vobject.com/
(You will hit http 500 error for first request, please wait for 30 seconds and refresh)
The missing part is the self-registration page and remember me feature. Please contact us (hyperlink located below the page of URL above) if you are still interested.
Wish to heard from you soon!