I decided to implement a blog system on Google AppEngine. But:
- I don’t want to add a login button on my blog.
- I don’t want to provide a url to type in manually to login.
But I still want to do admin things ONLINE and only for myself, e.g. posting, editing, deleting and etc.
Any clever ways to implement this?
You can add a component to the web page template that is only rendered if you are an admin.
For example, in your HTML template if you have something like this it’ll only render the content if admin_bool is True. So you can put a form etc inside there and only you’ll see it.
So if you happen to be using the GAE users service you can do this:
and pass admin_bool to your template and it’ll render only if the current user is an admin.
https://developers.google.com/appengine/docs/python/users/adminusers
http://webapp-improved.appspot.com/tutorials/gettingstarted/usingusers.html#tutorials-gettingstarted-usingusers
http://webapp-improved.appspot.com/tutorials/gettingstarted/templates.html#tutorials-gettingstarted-templates