Title: Authorization of own account for django app · Issue #338 · 1ap/google-api-python-client · GitHub
Open Graph Title: Authorization of own account for django app · Issue #338 · 1ap/google-api-python-client
X Title: Authorization of own account for django app · Issue #338 · 1ap/google-api-python-client
Description: I want to access my own google calendar as part of a web application deployed in django. To do this I got the credentials for my google account stored in a file (called calendar.dat) which is in the same directory as as the views.py file...
Open Graph Description: I want to access my own google calendar as part of a web application deployed in django. To do this I got the credentials for my google account stored in a file (called calendar.dat) which is in th...
X Description: I want to access my own google calendar as part of a web application deployed in django. To do this I got the credentials for my google account stored in a file (called calendar.dat) which is in th...
Opengraph URL: https://github.com/1ap/google-api-python-client/issues/338
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Authorization of own account for django app","articleBody":"```\nI want to access my own google calendar as part of a web application deployed \nin django. To do this I got the credentials for my google account stored in a \nfile (called calendar.dat) which is in the same directory as as the views.py \nfile being used for the application. Is there a way to use this file to get my \ncredentials. Currently the code is:\n\nfrom oauth2client.file import Storage\n\nimport os.path\nimport httplib2\n\nmodule_dir = os.path.dirname(__file__)\nfile_path = os.path.join(module_dir, calendar.dat)\nstorage = Storage(file_path)\ncredentials = storage.get\n\nhttp = httplib2.Http()\nhttp = credentials.authorize(http)\n\nHowever, this code returns credentials as None, so it doesn't work in views.py. \nIt does work however if I put it in a normal python file and just run it in the \nterminal, as opposed to someone visiting the page in a web browser. Is there a \nway to fix this?\n```\n\nOriginal issue reported on code.google.com by `graylcpu...@gmail.com` on 15 Oct 2014 at 7:28\n","author":{"url":"https://github.com/GoogleCodeExporter","@type":"Person","name":"GoogleCodeExporter"},"datePublished":"2016-03-28T19:47:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/338/google-api-python-client/issues/338"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:18981980-650a-db37-529e-51264b77aa81 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C330:9FEF5:1F57D8D:29A46F9:697D390E |
| html-safe-nonce | c31cf702668e83344a01963d4ce5a7ce2b6685896bf6b73ffdc0cd7decacd496 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzMwOjlGRUY1OjFGNTdEOEQ6MjlBNDZGOTo2OTdEMzkwRSIsInZpc2l0b3JfaWQiOiI1NDIzODUyNjcwNzM5NjI2MjU0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e9e70b3dbef8955515406a9545c2058a6be1a7e924f3da404001e2dec74aae96 |
| hovercard-subject-tag | issue:144065909 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/1ap/google-api-python-client/338/issue_layout |
| twitter:image | https://opengraph.githubassets.com/52184d78c66843b39a6b97243022b1419bbdf87f9dd710e07f838f5e8a7326eb/1ap/google-api-python-client/issues/338 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/52184d78c66843b39a6b97243022b1419bbdf87f9dd710e07f838f5e8a7326eb/1ap/google-api-python-client/issues/338 |
| og:image:alt | I want to access my own google calendar as part of a web application deployed in django. To do this I got the credentials for my google account stored in a file (called calendar.dat) which is in th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | GoogleCodeExporter |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9a3c7e308524eda8bf7076517aaba4e7e7984217dc521d1404369c0c497afdde |
| turbo-cache-control | no-preview |
| go-import | github.com/1ap/google-api-python-client git https://github.com/1ap/google-api-python-client.git |
| octolytics-dimension-user_id | 12863663 |
| octolytics-dimension-user_login | 1ap |
| octolytics-dimension-repository_id | 54918735 |
| octolytics-dimension-repository_nwo | 1ap/google-api-python-client |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 54918735 |
| octolytics-dimension-repository_network_root_nwo | 1ap/google-api-python-client |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b41f2aeb2bdce4f2f8278e78f7fe2b38a9cd441 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width