{{if site.website is not None:}}
{{=A(T("Web Site"), _href=site.website)}}
<br>
<a href={{site.website}}>{{=site.website}}</a>
{{pass}}
Any help is much appreciated
<type 'exceptions.ValueError'> invalid literal for long() with base 10: 'www.huffingtonpost.com'
You can see that I'm using 'www.huffingtonpost.com' as my test case, which does resolve correctly if pasted strait into the browser.
r "welcome"
Ticket ID
127.0.0.1.2016-08-28.20-31-55.64675aeb-bf0a-4eb8-b97c-686363adb926
<type 'exceptions.ValueError'> invalid literal for long() with base 10: 'www.huffingtonpost.com'
Version
web2py™ |
Version 2.14.6-stable+timestamp.2016.05.10.00.21.47 |
Traceback
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. |
Traceback (most recent call last): File "/Users/zabgay/Documents/GitHub/maprac/web2py/gluon/restricted.py", line 227, in restricted exec ccode in environment File "/Users/zabgay/Documents/GitHub/maprac/web2py/applications/welcome/controllers/default.py", line 173, in <module> File "/Users/zabgay/Documents/GitHub/maprac/web2py/gluon/globals.py", line 417, in <lambda> self._caller = lambda f: f() File "/Users/zabgay/Documents/GitHub/maprac/web2py/applications/welcome/controllers/default.py", line 162, in view_a_site site = db(db.sites.id == request.args(0)).select().first() File "/Library/Python/2.7/site-packages/pydal/objects.py", line 2020, in select return adapter.select(self.query, fields, attributes) File "/Library/Python/2.7/site-packages/pydal/adapters/sqlite.py", line 123, in select return super(SQLiteAdapter, self).select(query, fields, attributes) File "/Library/Python/2.7/site-packages/pydal/adapters/base.py", line 1283, in select sql = self._select(query, fields, attributes) File "/Library/Python/2.7/site-packages/pydal/adapters/base.py", line 1170, in _select sql_w = ' WHERE ' + self.expand(query) if query else '' File "/Library/Python/2.7/site-packages/pydal/adapters/base.py", line 952, in expand rv = op(first, second, **optional_args) File "/Library/Python/2.7/site-packages/pydal/adapters/base.py", line 846, in EQ self.expand(second, first.type)) File "/Library/Python/2.7/site-packages/pydal/adapters/base.py", line 962, in expand rv = self.represent(expression, field_type) File "/Library/Python/2.7/site-packages/pydal/adapters/base.py", line 1435, in represent return str(long(obj)) ValueError: invalid literal for long() with base 10: 'www.huffingtonpost.com' |
{{=A(site.website, _title = T("Web site"), _target = "_blank", _href = "%s" % site.website) }}