Add templates folder to setup.py #1

Closed
franckbret opened this Issue Aug 1, 2011 · 2 comments

Projects

None yet

2 participants

@franckbret

Hi, thanks for your module, will used it until django 1.4 is out.
Actually it had been installed through "pip install django-i18nurls" so it's django-i18nurls 0.6

I encounter errors when running tests suite in a project cause it can't find the templates requested by tests case. So add them to a package_data into your setup.py definition. Optionaly move them into the test directory as the dummy template is only needed for tests...

Here is one part of the errors

======================================================================
ERROR: test_en_redirect (i18nurls.tests.url_tests.RedirectTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/brett/.virtualenvs/django1.3-001/lib/python2.7/site-packages/i18nurls/tests/url_tests.py", line 48, in test_en_redirect
    response = self.client.get(response['location'])
  File "/home/brett/.virtualenvs/django1.3-001/lib/python2.7/site-packages/django/test/client.py", line 445, in get
    response = super(Client, self).get(path, data=data, **extra)
  File "/home/brett/.virtualenvs/django1.3-001/lib/python2.7/site-packages/django/test/client.py", line 229, in get
    return self.request(**r)
  File "/home/brett/.virtualenvs/django1.3-001/lib/python2.7/site-packages/django/core/handlers/base.py", line 136, in get_response
    response.render()
  File "/home/brett/.virtualenvs/django1.3-001/lib/python2.7/site-packages/django/template/response.py", line 96, in render
    self._set_content(self.rendered_content)
  File "/home/brett/.virtualenvs/django1.3-001/lib/python2.7/site-packages/django/template/response.py", line 73, in rendered_content
    template = self.resolve_template(self.template_name)
  File "/home/brett/.virtualenvs/django1.3-001/lib/python2.7/site-packages/django/template/response.py", line 49, in resolve_template
    return loader.select_template(template)
  File "/home/brett/.virtualenvs/django1.3-001/lib/python2.7/site-packages/django/template/loader.py", line 203, in select_template
    raise TemplateDoesNotExist(', '.join(not_found))
TemplateDoesNotExist: i18nurls/dummy.html
@brocaar brocaar closed this Aug 2, 2011
@brocaar
Owner
brocaar commented Aug 2, 2011

Thanks for your feedback :) I have fixed the problem. Version 0.6.1 should resolve your problem.

@franckbret

Thanks for that, just updated the module, no more issues with tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment