Skip to content

Commit

Permalink
fix: update urlparse doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pabepadu authored and pgjones committed Feb 27, 2024
1 parent d3dd65a commit 817aac4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ if they are not used right away, to keep it from being confusing::

import os
import redis
from werkzeug.urls import url_parse
from urllib.parse import urlparse
from werkzeug.wrappers import Request, Response
from werkzeug.routing import Map, Rule
from werkzeug.exceptions import HTTPException, NotFound
Expand Down Expand Up @@ -308,7 +308,7 @@ we need to write a function and a helper method. For URL validation this
is good enough::

def is_valid_url(url):
parts = url_parse(url)
parts = urlparse(url)
return parts.scheme in ('http', 'https')

For inserting the URL, all we need is this little method on our class::
Expand Down

0 comments on commit 817aac4

Please sign in to comment.