Title: Authorization of own account for django app · Issue #338 · ryanpraski/google-api-python-client · GitHub
Open Graph Title: Authorization of own account for django app · Issue #338 · ryanpraski/google-api-python-client
X Title: Authorization of own account for django app · Issue #338 · ryanpraski/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/ryanpraski/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":"2015-09-09T16:42:27.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:bdc0a17c-5c55-7d91-3b9d-823f7a3c2548 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D1CE:1F80F:F13F71:1322B4F:6991655F |
| html-safe-nonce | 7420a11ac9d7f316ccb21b18287dd5613ae91b141c6849c4adb19fc0f5b5b31c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUNFOjFGODBGOkYxM0Y3MToxMzIyQjRGOjY5OTE2NTVGIiwidmlzaXRvcl9pZCI6IjIxNDkzMjc3Nzk4NzkwMTk4NzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 13e1feeb29945e5a29876b5fb67f8651948568e63d0b0e192594086ed0f948aa |
| hovercard-subject-tag | issue:105636482 |
| 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/ryanpraski/google-api-python-client/338/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4b4fc2084130dbd38a5c368f75fd39a89485e25547bd9e4e45b77eac6abdad5a/ryanpraski/google-api-python-client/issues/338 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4b4fc2084130dbd38a5c368f75fd39a89485e25547bd9e4e45b77eac6abdad5a/ryanpraski/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 | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/ryanpraski/google-api-python-client git https://github.com/ryanpraski/google-api-python-client.git |
| octolytics-dimension-user_id | 2982734 |
| octolytics-dimension-user_login | ryanpraski |
| octolytics-dimension-repository_id | 42191160 |
| octolytics-dimension-repository_nwo | ryanpraski/google-api-python-client |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 42191160 |
| octolytics-dimension-repository_network_root_nwo | ryanpraski/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 | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width