Mercurial > kallithea
annotate rhodecode/lib/__init__.py @ 1067:717ccea6df18 beta
fixed some very strange issue with htmlfill import - don't know why but this needs to be imported as separate module
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 19 Feb 2011 07:39:01 +0100 |
parents | 110a00c181de |
children | 716911af91e1 93b980ebee55 |
rev | line source |
---|---|
914
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
1 # -*- coding: utf-8 -*- |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
2 """ |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
3 rhodecode.lib.__init__ |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
4 ~~~~~~~~~~~~~~~~~~~~~~~ |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
5 |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
6 Some simple helper functions |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
7 |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
8 :created_on: Jan 5, 2011 |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
9 :author: marcink |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
11 :license: GPLv3, see COPYING for more details. |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
12 """ |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
13 # This program is free software; you can redistribute it and/or |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
14 # modify it under the terms of the GNU General Public License |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
15 # as published by the Free Software Foundation; version 2 |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
16 # of the License or (at your opinion) any later version of the license. |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
17 # |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
18 # This program is distributed in the hope that it will be useful, |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
21 # GNU General Public License for more details. |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
22 # |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
23 # You should have received a copy of the GNU General Public License |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
24 # along with this program; if not, write to the Free Software |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
26 # MA 02110-1301, USA. |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
27 |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
28 def str2bool(v): |
110a00c181de
Added force https option into config files
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
29 return v.lower() in ["yes", "true", "t", "1"] if v else None |