Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugs.wiki error "global name 'function' is not defined" #19

Closed
tkliuxing opened this issue Nov 26, 2014 · 1 comment
Closed

plugs.wiki error "global name 'function' is not defined" #19

tkliuxing opened this issue Nov 26, 2014 · 1 comment

Comments

@tkliuxing
Copy link

global name 'function' is not defined
/Users/bhr/.virtualenvs/web/lib/python2.7/site-packages/plugs/wiki/views.py in _wiki_view, line 389

        if wiki:
            #check read permission
            self._check_permission('read', wiki, page=wiki)

            #处理阅读次数
            key = '__wikivisited__:%s:%d' % (request.remote_addr, wiki.id)
            cache = function('get_cache')() #<-----This line!
            v = cache.get(key, None)
            if not v:
                self.model.filter(self.model.c.id==int(wiki.id)).update(hits=self.model.c.hits+1)
                cache.set(key, 1, settings.get_var('WIKI/WIKI_VISITED_TIMEOUT'))

            rev = int(request.GET.get('rev', 0))
            rev_time = None

应该是functions.get_cache()吧?

@limodou
Copy link
Owner

limodou commented Nov 26, 2014

用git中的最新版本。

@limodou limodou closed this as completed Nov 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants