Skip to content

Commit

Permalink
Merge pull request #1 from keitaroinc/unicode
Browse files Browse the repository at this point in the history
Support Unicode
  • Loading branch information
ZoranPandovski authored Dec 13, 2017
2 parents 24629e3 + 8bf599a commit efc1a8b
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ckanext/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

# this is a namespace package
try:
import pkg_resources
Expand Down
2 changes: 2 additions & 0 deletions ckanext/pages/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

# this is a namespace package
try:
import pkg_resources
Expand Down
2 changes: 2 additions & 0 deletions ckanext/pages/actions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

import datetime
import json

Expand Down
2 changes: 2 additions & 0 deletions ckanext/pages/auth.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

import ckan.plugins as p

try:
Expand Down
2 changes: 2 additions & 0 deletions ckanext/pages/controller.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

import ckan.plugins as p
import ckan.lib.helpers as helpers
from pylons import config
Expand Down
2 changes: 2 additions & 0 deletions ckanext/pages/db.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

import datetime
import uuid
import json
Expand Down
6 changes: 4 additions & 2 deletions ckanext/pages/plugin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

import logging
from pylons import config
import ckan.plugins.toolkit as toolkit
Expand Down Expand Up @@ -48,9 +50,9 @@ def build_pages_nav_main(*args):

for page in pages_list:
if page['page_type'] == 'blog':
link = h.literal('<a href="/blog/%s">%s</a>' % (str(page['name']), str(page['title'])))
link = h.literal('<a href="/blog/%s">%s</a>' % (page['name'], page['title']))
else:
link = h.literal('<a href="/pages/%s">%s</a>' % (str(page['name']), str(page['title'])))
link = h.literal('<a href="/pages/%s">%s</a>' % (page['name'], page['title']))

if page['name'] == page_name:
li = h.literal('<li class="active">') + link + h.literal('</li>')
Expand Down
2 changes: 2 additions & 0 deletions ckanext/pages/tests/test_logic.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

from ckan.plugins import toolkit
from nose.tools import assert_in, assert_not_in
import ckan.model as model
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

from setuptools import setup, find_packages
import os

Expand Down

0 comments on commit efc1a8b

Please sign in to comment.