saippuakauppias / django-simple-open-graph Goto Github PK
View Code? Open in Web Editor NEWDjango package for simplicity embed open graph (og:) layout in templates for different objects
License: ISC License
Django package for simplicity embed open graph (og:) layout in templates for different objects
License: ISC License
{% 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 %}
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.