Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8493133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:55:22+00:00 2026-06-10T22:55:22+00:00

I had a working login form for my web2py app. I don’t know what

  • 0

I had a working login form for my web2py app.

I don’t know what I changed but after login is performed the app returns me the invalid function default/user msg.

I was using auth.settings.controller=”user” to be redirected to the right controler. Now it doesn’t work.

App should go back to the page it came from. only with logged in user

Right after solving this i am installing myself a SVN but until then.
I really don’t know what to do

I am alo using auth.navbar()

my auth in view is {{=’auth’ in globals() and
auth.navbar(separators=(‘ ‘,’ | ‘,”))}}

my user controler user.py is

def user():
form = auth()
return dict(form=form)

and my user.py model is

if (request.controller==’user’ or request.controller==’school’ or request.controller==’timetable’ and request.cookies.has_key(‘mycookie’)):
response.generic_patterns = [‘*’] if request.is_local else []
database = request.cookies[‘mycookie’].value
baza = DAL(‘postgres://postgres:postgres@localhost/’ + database, migrate=True)
from gluon.tools import Mail
auth = Auth(baza)

auth.settings.logout_next=URL('school','index?school=' + database)


auth.settings.registration_requires_approval = True
#auth.settings.reset_password_requires_verification = True
#auth.settings.login_after_registration = False
auth.settings.register_onaccept=lambda form: mail.send(to=['vid.ogris@algit.si'],
      subject='web2py registration',
      # If reply_to is omitted, then mail.settings.sender is used
      reply_to='us@example.com',
      message='Kreiral se je nov uporabnik, ki ga je potrebno potrditi') 

auth.settings.expiration = 3600
auth.define_tables()

mail=Mail()
auth.settings.mailer=mail
mail.settings.server='smtp.gmail.com:587'
mail.settings.sender='xxx@gmail.com'
mail.settings.login='xxx@gmail.com:xxx'

#auth.settings.registration_requires_verification = True

auth.messages.registration_pending = u'Registracija je v postopku odobritve. Ko bo vaš račun potrjen boste prejeli e-mail.'
auth.messages.invalid_login = 'Nepravilno geslo'
auth.messages.invalid_user = 'Uporabnik ne obstaja'



auth.settings.controller="user"



## if you need to use OpenID, Facebook, MySpace, Twitter, Linkedin, etc.
## register with janrain.com, write your domain:api_key in private/janrain.key
from gluon.contrib.login_methods.rpx_account import use_janrain
use_janrain(auth,filename='private/janrain.key')
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:55:24+00:00Added an answer on June 10, 2026 at 10:55 pm

    Sometimes comments in html are not only comments 🙂 I removed a line containing auth.register(), even though I though it was commented, and now it works

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had a working Active Admin app working on my local server, but after
I am trying to get my session login script working and I had the
I had the sample facebook login implementation, and just realized that it stopped working:
I have an Android app that I had working a few months ago which
I have a problem that I had working in a test but now in
I have this php login system, I had it working great on localhost, I
My app was working great and then client asked to put a login screen
I am working on a form layout for a Login Activity in my Android
I can't get this one. Had an app that was working great. Then I
I have a working login form in an asp.net application. Standard stuff with a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.