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

  • Home
  • SEARCH
  • 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 9054427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:41:19+00:00 2026-06-16T13:41:19+00:00

@app.route(/<requested_username>/<requested_team>, methods=[‘GET’, ‘POST’]) ^How do I make this so that no matter what is

  • 0
@app.route("/<requested_username>/<requested_team>", methods=['GET', 'POST'])

^How do I make this so that no matter what is entered – it still goes to the correct url

For example:

/jose/SWaGGer   #should work
/jOse/swagger   #should work
/josE/Swagger   #should work
etc.

Oh, and I am using Python/Flask by the way – and nope I did not find an explanation for this in the docs.

  • 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-16T13:41:20+00:00Added an answer on June 16, 2026 at 1:41 pm

    In your view method call lower() on your strings before working with them. If you do this, they will always be stored and used lower case.

    E.g.:

    @app.route('/user/<requested_username>/<requested_team>')
    def thing(requested_username, requested_team):
        requested_team = requested_team.lower()
        requested_username = requested_username.lower()
    
        ... then continue with the view
    

    You should then always store your strings in lower case in your database, so call lower before saving them.

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

Sidebar

Related Questions

I have this code: @app.route('/login/', methods=['GET', 'POST']) def login(): error = None if request.method
In my Flask app, I have a view which displays a post @post_blueprint.route('/post/<int:year>/<int:month>/<title>') def
I'm using Expressjs w/ node.js and I have a route like this: users.init(app.db, function()
In express, I have defined some routes app.post(/api/v1/client, Client.create); app.get(/api/v1/client, Client.get); ... I have
For my app I have two route set up, app.get('/', routes.index); app.get('/:name', routes.index); I
From this post, I am 99% there playframework, can you route on hostname/subdomains? Now,
Right now I'm opening a collection on every request: ie: app.get('/route', function (req, res)
I'm developing web app using Spring Integration to route my messages, but I have
I made a simple GPS. app. for android, storing the route coordinates into file.
Can I capture the following two routes in a single line? GET /game controllers.Main.app.gamelist

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.