login box

5 views
Skip to first unread message

Florent Aide

unread,
Dec 16, 2008, 1:24:08 PM12/16/08
to turbogea...@googlegroups.com
We now have a styled login box... Please test.

And a big thanks to Jonathan Schemoul for this one!

Florent.

Daniel Fetchinson

unread,
Dec 16, 2008, 5:21:26 PM12/16/08
to turbogea...@googlegroups.com
> We now have a styled login box... Please test.
>
> And a big thanks to Jonathan Schemoul for this one!
>
> Florent.

Hi Florent, I wanted to take a look at it so 'svn up'-ed my tg-1.5
directory, then installed a virtualenv, tried to install tg from the
tg-1.5 directory using python from the virtualenv, but

/path/to/virtualenv/bin/python setup.py install

failed with

Searching for PEAK-Rules==0.5a1.dev-r2569
Reading http://pypi.python.org/simple/PEAK-Rules/
No local packages or download links found for PEAK-Rules==0.5a1.dev-r2569
error: Could not find suitable distribution for
Requirement.parse('PEAK-Rules==0.5a1.dev-r2569')

Anything I did wrong?

Cheers,
Daniel

--
Psss, psss, put it down! - http://www.cafepress.com/putitdown

Christopher Arndt

unread,
Dec 16, 2008, 5:54:42 PM12/16/08
to turbogea...@googlegroups.com
Daniel Fetchinson schrieb:

>> We now have a styled login box... Please test.
>
> Hi Florent, I wanted to take a look at it so 'svn up'-ed my tg-1.5
> directory, then installed a virtualenv, tried to install tg from the
> tg-1.5 directory using python from the virtualenv, but
>
> /path/to/virtualenv/bin/python setup.py install
>
> failed with
>
> Searching for PEAK-Rules==0.5a1.dev-r2569
> Reading http://pypi.python.org/simple/PEAK-Rules/
> No local packages or download links found for PEAK-Rules==0.5a1.dev-r2569
> error: Could not find suitable distribution for
> Requirement.parse('PEAK-Rules==0.5a1.dev-r2569')
>
> Anything I did wrong?

I think he was referring to the quickstart templates for tg2.

BTW, current trunk requires repoze.who 1.0.8, but there is not egg for
it on http://www.turbogears.org/2.0/downloads/current/index/. It should
be either mentioned in the docs for running the svn version, that you
need to checkout repoze.who and "setup.yp develop" it, or we should
upload a new egg to the index.

Chris

Daniel Fetchinson

unread,
Dec 16, 2008, 5:57:03 PM12/16/08
to turbogea...@googlegroups.com

Oh, I thought we are talking about a tg 1.5 feature since I thought
Florent is busy with the 1.x branch. I'm not (yet) familiar with tg2
so can't test that.....

Jorge Vargas

unread,
Dec 16, 2008, 6:27:22 PM12/16/08
to turbogea...@googlegroups.com
yes actually that is on pypi so if you delete the easy_install line
from setup.cfg it should pick up the real package. I think we should
bug Mark to add the package to the index, after all release will be
very shortly so the docs will probably be updated when the change is
no longer needed.

as for the [easy_install] section I think we should get rid of it, I
don't like it how it forces the index on you without knowing. I have
been reading up on pip lately because there has been a couple of blog
posts around maybe we should move there and be done with this issue,
although we'll need someone to make sure pip works on windows.

> Chris
>
> >
>

Lukasz Szybalski

unread,
Dec 16, 2008, 7:35:21 PM12/16/08
to turbogea...@googlegroups.com

When you add a "flash("this is a flash") into you root index. does it
get display somewhere in the template?

I guess cd ../../
easy_install repoze.who
will find the pypi package.

Also.
paster quickstart daa17
Do you need authentication and authorization in this project? [yes]

paster setup-app development.ini
paster serve --reload development.ini

Starting subprocess with file monitor
Traceback (most recent call last):
File "/home/lucas/tmp/tg2b2ENV/bin/paster", line 8, in <module>
load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')()
File "/home/lucas/tmp/tg2b2ENV/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/command.py",
line 84, in run
invoke(command, command_name, options, args[1:])
File "/home/lucas/tmp/tg2b2ENV/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/command.py",
line 123, in invoke
exit_code = runner.run(args)
File "/home/lucas/tmp/tg2b2ENV/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/command.py",
line 218, in run
result = self.command()
File "/home/lucas/tmp/tg2b2ENV/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/serve.py",
line 276, in command
relative_to=base, global_conf=vars)
File "/home/lucas/tmp/tg2b2ENV/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/serve.py",
line 313, in loadapp
**kw)
File "/home/lucas/tmp/tg2b2ENV/lib/python2.5/site-packages/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py",
line 204, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "/home/lucas/tmp/tg2b2ENV/lib/python2.5/site-packages/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py",
line 225, in loadobj
return context.create()
File "/home/lucas/tmp/tg2b2ENV/lib/python2.5/site-packages/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py",
line 625, in create
return self.object_type.invoke(self)
File "/home/lucas/tmp/tg2b2ENV/lib/python2.5/site-packages/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py",
line 110, in invoke
return fix_call(context.object, context.global_conf, **context.local_conf)
File "/home/lucas/tmp/tg2b2ENV/lib/python2.5/site-packages/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/util/fixtypeerror.py",
line 57, in fix_call
val = callable(*args, **kw)
File "/home/lucas/tmp/daa17/daa17/config/middleware.py", line 10, in make_app
app = make_base_app(global_conf, full_stack=True, **app_conf)
File "/home/lucas/tmp/tg2/trunk/tg/configuration.py", line 535, in
make_base_app
app = self.add_auth_middleware(app)
File "/home/lucas/tmp/tg2/trunk/tg/configuration.py", line 422, in
add_auth_middleware
app = setup_sql_auth(app, **auth_args)
TypeError: setup_sql_auth() got an unexpected keyword argument 'dbsession'

Am I missing something here?

Thanks,
Lucas

Jorge Vargas

unread,
Dec 16, 2008, 7:42:50 PM12/16/08
to turbogea...@googlegroups.com
I think that is something Jon and Florent haven't worked on yet.

>
> I guess cd ../../
> easy_install repoze.who
> will find the pypi package.
>
true but mark just fixed the index.
you need trunk of repoze.what, did you follow the running from SVN instructions?

>
> Thanks,
> Lucas
>
> >
>

Gustavo Narea

unread,
Dec 17, 2008, 5:40:41 AM12/17/08
to turbogea...@googlegroups.com
On Wednesday December 17, 2008 01:42:50 Jorge Vargas wrote:
> > app = setup_sql_auth(app, **auth_args)
> > TypeError: setup_sql_auth() got an unexpected keyword argument
> > 'dbsession'
> >
> >
> >
> > Am I missing something here?

easy_install -U repoze.what repoze.what.plugins.sql

That was fixed last week in the latest releases of these packages.

Cheers.
--
Gustavo Narea <http://gustavonarea.net/>.

Get rid of unethical constraints! Get freedomware:
http://www.getgnulinux.org/

Lukasz Szybalski

unread,
Dec 20, 2008, 12:02:09 AM12/20/08
to turbogea...@googlegroups.com
I've reopened 2033,
http://trac.turbogears.org/attachment/ticket/2033/login_handler.diff

The new template in tg.devtools is missing few tg.url.

I'm attaching a patch to fixes it in templates but after a user logs
in the page gets redirected to '/' instead of tg.url('/'). I cannot
find where in the code the process gets redirected. The logout button
seem to redirect at the end to /login?came_from instead of
tg.url('/login')?came_from .


Also,
Is there a way to make the actual widget that asks for password have a
"white or light gray" background wher you type in the user/password
instead of black/dark gray.

Thanks,
Lucas

Florent Aide

unread,
Dec 20, 2008, 5:48:58 AM12/20/08
to turbogea...@googlegroups.com
On Sat, Dec 20, 2008 at 6:02 AM, Lukasz Szybalski <szyb...@gmail.com> wrote:
>
> I've reopened 2033,
> http://trac.turbogears.org/attachment/ticket/2033/login_handler.diff

please link to tickets, not diffs. Please open a new ticket for this
do not reopen old ones.

>
> The new template in tg.devtools is missing few tg.url.

a new ticket would be fine.

>
> I'm attaching a patch to fixes it in templates but after a user logs
> in the page gets redirected to '/' instead of tg.url('/'). I cannot
> find where in the code the process gets redirected. The logout button
> seem to redirect at the end to /login?came_from instead of
> tg.url('/login')?came_from .
>
>
> Also,
> Is there a way to make the actual widget that asks for password have a
> "white or light gray" background wher you type in the user/password
> instead of black/dark gray.

everything is possible. Nobody answered my call for comment when this
was introduced. You're the first one! Thanks for trying it and
commenting.

Florent.

Jorge Godoy

unread,
Dec 21, 2008, 11:58:25 AM12/21/08
to turbogea...@googlegroups.com
Not related to this, directly, but is it possible to abstract the login screen to make it like a "modal" window?  The idea is to require authentication, but allow the user to fill it in a modal window.

The way it works now, a redirect happens to the login screen and then back to the application and this causes dynamic values to be cleared from the interface.

--
Jorge Godoy     <jgo...@gmail.com>

Lukasz Szybalski

unread,
Dec 21, 2008, 2:26:40 PM12/21/08
to turbogea...@googlegroups.com
On Sat, Dec 20, 2008 at 4:48 AM, Florent Aide <floren...@gmail.com> wrote:
>
> On Sat, Dec 20, 2008 at 6:02 AM, Lukasz Szybalski <szyb...@gmail.com> wrote:
>>
>> I've reopened 2033,
>> http://trac.turbogears.org/attachment/ticket/2033/login_handler.diff
>
> please link to tickets, not diffs. Please open a new ticket for this
> do not reopen old ones.
>
>>
>> The new template in tg.devtools is missing few tg.url.
>
> a new ticket would be fine.
>
>>
>> I'm attaching a patch to fixes it in templates but after a user logs
>> in the page gets redirected to '/' instead of tg.url('/'). I cannot
>> find where in the code the process gets redirected. The logout button
>> seem to redirect at the end to /login?came_from instead of
>> tg.url('/login')?came_from .
>>

any idea where in a code this redirection is? I doesn't seem to be in
a template and not in root.py? Let me know so we can fix this,
otherwise the modwsgi deployment doesn't work properly.


>>
>> Also,
>> Is there a way to make the actual widget that asks for password have a
>> "white or light gray" background wher you type in the user/password
>> instead of black/dark gray.
>
> everything is possible. Nobody answered my call for comment when this
> was introduced. You're the first one! Thanks for trying it and
> commenting.


No problem, I just got a chance to install it. For those that didn't
see it yet, here is how it looks:
http://lucasmanual.com/mywiki/TurboGears2?action=AttachFile&do=get&target=tg2welcome2.png

Lucas

Lukasz Szybalski

unread,
Dec 21, 2008, 9:47:44 PM12/21/08
to turbogea...@googlegroups.com
On Sun, Dec 21, 2008 at 1:26 PM, Lukasz Szybalski <szyb...@gmail.com> wrote:
> On Sat, Dec 20, 2008 at 4:48 AM, Florent Aide <floren...@gmail.com> wrote:
>>
>> On Sat, Dec 20, 2008 at 6:02 AM, Lukasz Szybalski <szyb...@gmail.com> wrote:
>>>
>>> I've reopened 2033,
>>> http://trac.turbogears.org/attachment/ticket/2033/login_handler.diff
>>
>> please link to tickets, not diffs. Please open a new ticket for this
>> do not reopen old ones.
>>
>>>
>>> The new template in tg.devtools is missing few tg.url.
>>
>> a new ticket would be fine.
>>
>>>
>>> I'm attaching a patch to fixes it in templates but after a user logs
>>> in the page gets redirected to '/' instead of tg.url('/'). I cannot
>>> find where in the code the process gets redirected. The logout button
>>> seem to redirect at the end to /login?came_from instead of
>>> tg.url('/login')?came_from .
>>>
>
> any idea where in a code this redirection is? I doesn't seem to be in
> a template and not in root.py? Let me know so we can fix this,
> otherwise the modwsgi deployment doesn't work properly.

Anybody know where this happens in a code? After I log in how do I
redirect to page xyz, instead of what is currently redirected as
default?

>
>
>>>
>>> Also,
>>> Is there a way to make the actual widget that asks for password have a
>>> "white or light gray" background wher you type in the user/password
>>> instead of black/dark gray.
>>
>> everything is possible. Nobody answered my call for comment when this
>> was introduced. You're the first one! Thanks for trying it and
>> commenting.
>
>
> No problem, I just got a chance to install it. For those that didn't
> see it yet, here is how it looks:
> http://lucasmanual.com/mywiki/TurboGears2?action=AttachFile&do=get&target=tg2welcome2.png
>

Also,
I wasn't able to get flash working. Could you add it to the tempalate
somewehere...

Thanks,

Jorge Vargas

unread,
Dec 22, 2008, 12:59:34 AM12/22/08
to turbogea...@googlegroups.com
On Sun, Dec 21, 2008 at 8:47 PM, Lukasz Szybalski <szyb...@gmail.com> wrote:
>
> On Sun, Dec 21, 2008 at 1:26 PM, Lukasz Szybalski <szyb...@gmail.com> wrote:
>> On Sat, Dec 20, 2008 at 4:48 AM, Florent Aide <floren...@gmail.com> wrote:
>>>
>>> On Sat, Dec 20, 2008 at 6:02 AM, Lukasz Szybalski <szyb...@gmail.com> wrote:
>>>>
>>>> I've reopened 2033,
>>>> http://trac.turbogears.org/attachment/ticket/2033/login_handler.diff
>>>
>>> please link to tickets, not diffs. Please open a new ticket for this
>>> do not reopen old ones.
>>>
>>>>
>>>> The new template in tg.devtools is missing few tg.url.
>>>
>>> a new ticket would be fine.
>>>
>>>>
>>>> I'm attaching a patch to fixes it in templates but after a user logs
>>>> in the page gets redirected to '/' instead of tg.url('/'). I cannot
>>>> find where in the code the process gets redirected. The logout button
>>>> seem to redirect at the end to /login?came_from instead of
>>>> tg.url('/login')?came_from .
>>>>
>>
>> any idea where in a code this redirection is? I doesn't seem to be in
>> a template and not in root.py? Let me know so we can fix this,
>> otherwise the modwsgi deployment doesn't work properly.
>
> Anybody know where this happens in a code? After I log in how do I
> redirect to page xyz, instead of what is currently redirected as
> default?
>
This is part of repoze.who's RedirectingFormPlugin, which is
configured by default in repoze.what's quickstart for TG,

>>
>>
>>>>
>>>> Also,
>>>> Is there a way to make the actual widget that asks for password have a
>>>> "white or light gray" background wher you type in the user/password
>>>> instead of black/dark gray.
>>>
>>> everything is possible. Nobody answered my call for comment when this
>>> was introduced. You're the first one! Thanks for trying it and
>>> commenting.
>>
>>
>> No problem, I just got a chance to install it. For those that didn't
>> see it yet, here is how it looks:
>> http://lucasmanual.com/mywiki/TurboGears2?action=AttachFile&do=get&target=tg2welcome2.png
>>
>
> Also,
> I wasn't able to get flash working. Could you add it to the tempalate
> somewehere...
>
It is there already, see master.html maybe your trunk is outdated,
because Florent readded this a couple of days ago.

> Thanks,
>
> >
>

Lukasz Szybalski

unread,
Dec 22, 2008, 9:29:28 AM12/22/08
to turbogea...@googlegroups.com
On Sun, Dec 21, 2008 at 11:59 PM, Jorge Vargas <jorge....@gmail.com> wrote:
>
> On Sun, Dec 21, 2008 at 8:47 PM, Lukasz Szybalski <szyb...@gmail.com> wrote:
>>
>> On Sun, Dec 21, 2008 at 1:26 PM, Lukasz Szybalski <szyb...@gmail.com> wrote:
>>> On Sat, Dec 20, 2008 at 4:48 AM, Florent Aide <floren...@gmail.com> wrote:
>>>>
>>>> On Sat, Dec 20, 2008 at 6:02 AM, Lukasz Szybalski <szyb...@gmail.com> wrote:
>>>>>
>>>>> I've reopened 2033,
>>>>> http://trac.turbogears.org/attachment/ticket/2033/login_handler.diff
>>>>
>>>> please link to tickets, not diffs. Please open a new ticket for this
>>>> do not reopen old ones.
>>>>
>>>>>
>>>>> The new template in tg.devtools is missing few tg.url.
>>>>
>>>> a new ticket would be fine.
>>>>
>>>>>
>>>>> I'm attaching a patch to fixes it in templates but after a user logs
>>>>> in the page gets redirected to '/' instead of tg.url('/'). I cannot
>>>>> find where in the code the process gets redirected. The logout button
>>>>> seem to redirect at the end to /login?came_from instead of
>>>>> tg.url('/login')?came_from .
>>>>>
>>>
>>> any idea where in a code this redirection is? I doesn't seem to be in
>>> a template and not in root.py? Let me know so we can fix this,
>>> otherwise the modwsgi deployment doesn't work properly.
>>
>> Anybody know where this happens in a code? After I log in how do I
>> redirect to page xyz, instead of what is currently redirected as
>> default?
>>
> This is part of repoze.who's RedirectingFormPlugin, which is
> configured by default in repoze.what's quickstart for TG,

Which file, it seems as it is not redirecting properly then. Is tg.url used?

Lucas

>
>>>
>>>
>>>>>
>>>>> Also,
>>>>> Is there a way to make the actual widget that asks for password have a
>>>>> "white or light gray" background wher you type in the user/password
>>>>> instead of black/dark gray.
>>>>
>>>> everything is possible. Nobody answered my call for comment when this
>>>> was introduced. You're the first one! Thanks for trying it and
>>>> commenting.
>>>
>>>
>>> No problem, I just got a chance to install it. For those that didn't
>>> see it yet, here is how it looks:
>>> http://lucasmanual.com/mywiki/TurboGears2?action=AttachFile&do=get&target=tg2welcome2.png
>>>
>>
>> Also,
>> I wasn't able to get flash working. Could you add it to the tempalate
>> somewehere...
>>
> It is there already, see master.html maybe your trunk is outdated,
> because Florent readded this a couple of days ago.
>

I'll check again.


>> Thanks,
>>
>> >
>>
>
> >
>



--
How to create python package?
http://lucasmanual.com/mywiki/PythonPaste
Bazaar and Launchpad
http://lucasmanual.com/mywiki/Bazaar
Reply all
Reply to author
Forward
0 new messages