Permalink
Browse files

fix stucture bug

  • Loading branch information...
1 parent af2129b commit 32abb040bf8654165fe3ab7bbedc1d1b10ad15a1 David Shieh committed Mar 22, 2010
View
@@ -1,7 +1,6 @@
#-*-coding=utf-8-*-
import web
from web import form
-from settings import db
__all__ = [
'commentForm', 'linkForm', 'entryForm', 'pageForm',
No changes.
View
@@ -4,7 +4,8 @@
import web
#import memcache
from web.contrib.template import render_jinja
-from libs.templatefilters import avatar, notnull, formnote, content
+from libs import templatefilters
+#import avatar, notnull, formnote, content
import os
__all__ = [
@@ -13,7 +14,7 @@
pageCount = 5
#数据库配置
-db = web.database(dbn = 'mysql', db = 'davidblog_new', user='root', pw = 'root')
+#db = web.database(dbn = 'mysql', db = 'davidblog_new', user='root', pw = 'root')
#memcache配置
#mc = memcache.Client(['127.0.0.1:11211'], debug=0)
@@ -24,8 +25,8 @@ def getRender():
os.getcwd() + '/templates',
encoding = 'utf-8',
)
- myFilters = {'avatar':avatar,'notnull':notnull,
- 'formnote':formnote, 'content':content}
+ myFilters = {'avatar':templatefilters.avatar,'notnull':templatefilters.notnull,
+ 'formnote':templatefilters.formnote, 'content':templatefilters.content}
render._lookup.filters.update(myFilters)
return render
render = getRender()
@@ -36,8 +37,8 @@ def getAdminRender():
os.getcwd() + '/templates/admin',
encoding = 'utf-8',
)
- myFilters = {'avatar':avatar,'notnull':notnull,
- 'formnote':formnote, 'content':content}
+ myFilters = {'avatar':templatefilters.avatar,'notnull':templatefilters.notnull,
+ 'formnote':templatefilters.formnote, 'content':templatefilters.content}
render._lookup.filters.update(myFilters)
return render
render_admin = getAdminRender()
@@ -6,6 +6,7 @@
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<meta name="author" content="davidx, 灰太狼大王" />
<meta name="keywords" content="davidx, 灰太狼大王, 泥泞的沼泽, python, linux, webpy, web, php, yii, gentoo" />
+ <meta name="google-site-verification" content="OC2uStcVKMKlEuEvdxe8LHqfNWfMIVG5uDFMSgRgafo" />
<link rel="stylesheet" type="text/css" href="/static/css/styles.css" />
<link rel="stylesheet" type="text/css" href="/static/css/syntax.css" />
<link rel="SHORTCUT ICON" href="/static/favicon.ico" />
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
@@ -5,13 +5,12 @@
import random
import web
from forms import commentForm
-from settings import db, render, pageCount
-from cache import mcache
+from settings import render, pageCount
from sqlalchemy.orm import scoped_session, sessionmaker
from models import *
from utils import Pagination, getCaptcha
from markdown import markdown
-import templatefilters
+#from libs import templatefilters
d = dict()

0 comments on commit 32abb04

Please sign in to comment.