Найти - Пользователи
Полная версия: NameError: global name 'webhelpers' is not defined
Начало » Pyramid / Pylons / TurboGears » NameError: global name 'webhelpers' is not defined
1
Deimos747
Pylons выдаёт ошибку NameError: global name ‘webhelpers’ is not defined
Андрей Светлов
А у меня иногда выдает “деление на ноль”. И что делать?
Сумеете решить мою проблему, основываясь на такой исчерпывающей диагностической информации?
Deimos747
def list(self):
c.employees = webhelpers.paginate.Page(
model.Session.query(model.Employee),
page = int(request.params),
items_per_page = 5)
return render('/employees/list.mako')


NameError: global name ‘webhelpers’ is not defined

Делал по примеру http://pylonshq.com/docs/en/1.0/helpers/
zheromo
import webhelpers

?
Deimos747
вставил в начало import webhelpers
Теперь выдаёт: AttributeError: ‘module’ object has no attribute ‘paginate’
Андрей Светлов
import webhelpers.paginate

__init__.py в webhelpers сам не импортирует все его части.

Зы. Берите Пирамиду: http://pylonsproject.org/
Deimos747
Спасибо)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB