I am trying to display a 'Log Out' link on a page that only is
displayed when a user is logged in.
When I try this link will not display when its inside the if
statement.
Anyone know how do?
Thanks in advance,
Matt
--
class ItemController(BaseController):
def index(self):
Hi Matt,
You mixed up True and False in your controller.
should be
class ItemController(BaseController):
def index(self):
identity = request.environ.get('repoze.who.identity')
if identity is not None:
c.name = identity['user'].username
c.logout_button = T
Hi,
i have problem with MySQL (like many others on groups and google). I
have tried everything that i found, but nothing helped.
This is my SQLAlchemy config:
sqlalchemy.convert_unicode = true
sqlalchemy.pool_size = 100
sqlalchemy.pool_recycle = 3600
sqlalchemy.url = mysql://user:passw...@127.0.
There are a few things which might cause this issue. Have a look at the
following:
*wait_timeout*
*connect_timeout*
*max_allowed_packet*
I have no idea what your apps are trying to do in order to cause this so I'm
not able to speak about that. Have a look at them to determine if any of the
above
This worked for me (using engine_from_config):
from pylons import config
from sqlalchemy import engine_from_config
from foo.model import init_model
engine = engine_from_config(config, 'sqlalchemy.')
init_model(engine)
Otherwise (using create_engine), make
More caffeine required tomorrow evening!
Thanks Marcel.
On Jan 20, 10:15 pm, Marcel Sander
wrote:
> Hi Matt,
>
> You mixed up True and False in your controller.
>
> should be
>
> class ItemController(BaseController):
> def index(self):
> identity = request.environ.get('repoze.who.
I've been experimenting with ways of handling multiple domains inside
a single Pylons app (as opposed to an app for each domain). Routes has
subdomain support built-in, but mapping domains to subdomains just
leads to problems with generating URLs.
So I wrote a bit of alpha code today to implement