Changeset 2900
- Timestamp:
- 12/14/07 20:11:48 (9 months ago)
- Files:
-
- addressplugin/0.11/address/macro.py (modified) (2 diffs)
- addressplugin/0.11/address/tests/simple_geocode_test.py (modified) (1 diff)
- addressplugin/0.11/address/tests/simple_wikiaddress_test.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
addressplugin/0.11/address/macro.py
r2897 r2900 1 # Implements the Moin-style IncludePages macro.2 #3 # This plugin base on WikiInclude macro By Vegard Eriksen zyp at jvnv dot net.4 # See: http://projects.edgewall.com/trac/wiki/MacroBazaar#WikiInclude5 # and on the variant written by yu-ji6 7 1 from genshi.builder import Element, tag 8 2 from genshi.core import Markup … … 19 13 __all__ = ['AddressMacro'] 20 14 21 _API_KEY = ' ABQIAAAA3VM3oU5dUaRzj4mZKrWenRR-aua9fIhr0mssyA66j0SiUW84BRT6dpcTl-e73A90avaJpS5TGZYrCQ'15 _API_KEY = 'PUT YOUR KEY HERE' 22 16 23 17 class AddressMacro(Component): 24 18 """ 25 19 Creates a Google map for the supplied address and optional location. 20 This map is stored in the trac database and associated with the page. 21 The rendered map shows other addresses in proximity. 22 {{{ 23 24 [[Address("123 Any Street, Anytown, NY 14450","Some Location"]] 25 26 [[Address("123 Any Street, Anytown, NY 14450"]] 27 28 }}} 26 29 """ 30 27 31 implements(IWikiMacroProvider) 28 32 addressplugin/0.11/address/tests/simple_geocode_test.py
r2897 r2900 3 3 import geocode 4 4 5 _API_KEY = ' ABQIAAAA3VM3oU5dUaRzj4mZKrWenRR-aua9fIhr0mssyA66j0SiUW84BRT6dpcTl-e73A90avaJpS5TGZYrCQ'5 _API_KEY = 'PUT YOUR KEY HERE' 6 6 7 7 place = geocode.geocode('1 Main St, Pittsford, NY 14534',_API_KEY) addressplugin/0.11/address/tests/simple_wikiaddress_test.py
r2897 r2900 3 3 import wikiaddress 4 4 5 _API_KEY = ' ABQIAAAA3VM3oU5dUaRzj4mZKrWenRR-aua9fIhr0mssyA66j0SiUW84BRT6dpcTl-e73A90avaJpS5TGZYrCQ'5 _API_KEY = 'PUT YOUR KEY HERE' 6 6 7 7 my_dbapi = __import__("MySQLdb") 8 8 mydb = my_dbapi.connect(host='localhost', 9 user=' rottentrac',10 passwd=' rottentrac',11 db=' rottentrac')9 user='userid', 10 passwd='password', 11 db='password') 12 12 13 13 w = wikiaddress.wikiaddress(mydb,'mundo grill',_API_KEY,'somebody','1.2.3.4','2833 Monroe Ave, Rochester NY 14618',None)