Reputation: 27
I am trying to use this webapp2-user-accounts project for custom user authentication for my project files using the Google Analytics Embed API project. Essentially I want to combine the working functions of each project into a single project - I can get each project to work individually but can't get them to work together!
I have updated handlers on my app.yaml to combine both projects (possibly where I might be going wrong). This is below:
# For production:
application: ga-dev-tools
# For staging:
# application: google.com:ga-dev-tools
version: v9-1-3
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
secure: always
- url: /public
static_dir: public
secure: always
#my webapp2-user-accounts-handlers.
- url: /signup
script: main.app
secure: always
- url: /login
script: main.app
secure: always
- url: /forgot
script: main.app
secure: always
#my ga-dev-tools-handlers.
- url: /server-side-authorization/
script: lib.app.router
secure: always
- url: .*
script: main.app
libraries:
- name: webapp2
version: "2.5.2"
- name: jinja2
version: "2.6"
- name: yaml
version: "3.10"
- name: pycrypto
version: "2.6"
skip_files:
- ^node_modules
I have also got my main.py file to point to a new location for the authenticated file.
However, after deploying to appspot my login page works as expected but after logging-in. My 'secured' page throws the following Internal Server Error message:
Traceback (most recent call last):
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__
rv = self.handle_exception(request, response, e)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__
rv = self.router.dispatch(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__
return handler.dispatch()
File "/base/data/home/apps/s~abdash-1087/v9-1-3.387821826733681198/main.py", line 96, in dispatch
webapp2.RequestHandler.dispatch(self)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/s~abdash-1087/v9-1-3.387821826733681198/main.py", line 26, in check_login
return handler(self, *args, **kwargs)
File "/base/data/home/apps/s~abdash-1087/v9-1-3.387821826733681198/main.py", line 266, in get
self.render_template('/server-side-authorization')
File "/base/data/home/apps/s~abdash-1087/v9-1-3.387821826733681198/main.py", line 80, in render_template
self.response.out.write(template.render(path, params))
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/webapp/template.py", line 91, in render
t = _load_internal_django(template_path, debug)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/webapp/template.py", line 165, in _load_internal_django
template = django.template.loader.get_template(file_name)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/_internal/django/template/loader.py", line 157, in get_template
template, origin = find_template(template_name)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/_internal/django/template/loader.py", line 138, in find_template
raise TemplateDoesNotExist(name)
TemplateDoesNotExist: server-side-authorization
If anyone can point me in the general direction of where I might be going wrong I would be very grateful.
Thank you in advance.
Upvotes: 1
Views: 51
Reputation: 27
This was resolved by changing the config settings for the django templates as suggested by Tim Hoffman. It was not a app.yaml issue (as I had previously thought).
Upvotes: 1