1

I am a newbie in python.I have created a web page using bottle and python .But the thing is i want to use authentication and session feature in it many suggested to use cork but cant understand it can anyone explain me how to use or is there any other way to do it

My code is like :

    @route('/ldlereport',method='GET')
    def new_item():

           return template('ui.tpl')

i need to verify the user who can view this site

Thanks all ,

  • Welcome to SO - you need to show some effort (code) and explain where specifically you are having trouble. Question is too broad as is. – paisanco Nov 09 '14 at 15:39
  • thanks @paisanco i have entered the code sample i need to verify the user –  Nov 10 '14 at 05:25

1 Answers1

1

There are two examples on the cork-website: with decorators and without decorators.

While bottle is a good micro framework to learn web programming in python, authentication is not a newbe topic as you see by the examples. Before implementing such an advanced feature I would strongly recommend to go through some more simple examples like the TODO-List App to learn routing, templating and database queries first.

If you still want to stick to authentication: Due to bottle's flexibility you are free to choose your webserver. The Cherrypy microframework has a webserver with builtin SSL-Support as you see here: bottle on cherrypy server + ssl. This might be easier for the beginning, but besides configuring Cherrypy's SSL-adapter, you still have to create your SSL-certificates.

Community
  • 1
  • 1
barrios
  • 1,104
  • 1
  • 12
  • 21