Code Monkey home page Code Monkey logo

django-simple-open-graph's Issues

Error when pip install django-simple-open-graph

Hi,

I just try to install this page, and found when I run "pip install django-simple-open-graph=0.1“
this error occurred.
ValueError: ('Expected version spec in', 'django-simple-open-graph=0.1', 'at', '=0.1')

Any help, Thanks

Direct unicode symbols in tag are not supported

{% opengraph_meta "url=/, title='Тут не поддерживается юникод', type='website'" %}
Request Method: GET
Request URL: http://project.coagulant/

Django Version: 1.4.9
Python Version: 2.7.5

Traceback:
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  136.                     response = response.render()
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/response.py" in render
  104.             self._set_content(self.rendered_content)
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/response.py" in rendered_content
  79.         template = self.resolve_template(self.template_name)
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/response.py" in resolve_template
  55.             return loader.select_template(template)
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/loader.py" in select_template
  187.             return get_template(template_name)
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/loader.py" in get_template
  145.     template, origin = find_template(template_name)
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/loader.py" in find_template
  134.             source, display_name = loader(name, dirs)
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/loader.py" in __call__
  42.         return self.load_template(template_name, template_dirs)
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/loader.py" in load_template
  48.             template = get_template_from_string(source, origin, template_name)
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/loader.py" in get_template_from_string
  156.     return Template(source, origin, name)
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/base.py" in __init__
  125.         self.nodelist = compile_string(template_string, origin)
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/base.py" in compile_string
  153.     return parser.parse()
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/base.py" in parse
  267.                     compiled_result = compile_func(self, token)
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/loader_tags.py" in do_extends
  214.     nodelist = parser.parse()
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/base.py" in parse
  267.                     compiled_result = compile_func(self, token)
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/loader_tags.py" in do_block
  189.     nodelist = parser.parse(('endblock',))
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/base.py" in parse
  267.                     compiled_result = compile_func(self, token)
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/defaulttags.py" in do_with
  1350.     nodelist = parser.parse(('endwith',))
File "/home/coagulant/envs/project/lib/python2.7/site-packages/django/template/base.py" in parse
  267.                     compiled_result = compile_func(self, token)
File "/home/coagulant/envs/project/lib/python2.7/site-packages/simple_open_graph/templatetags/simple_open_graph.py" in opengraph_meta
  18.     properties = string_to_dict(properties[1:-1])
File "/home/coagulant/envs/project/lib/python2.7/site-packages/simple_open_graph/utils.py" in string_to_dict
  4.         string = str(string)

Exception Type: UnicodeEncodeError at /
Exception Value: 'ascii' codec can't encode characters in position 25-28: ordinal not in range(128)

Workaround is to use {% with %} tag:

{% with title='Тут не поддерживается юникод' %}
    {% opengraph_meta "url=/, title=title, type='website'" %}
{% endwith %}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.