title: create permenant unique links based on a user ID
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/11250728/create-unique-profile-page-for-each-user-python">create unique profile page for each user python</a>  </p>
  </blockquote>
  
  
  
  <p>I am using google appengine with python and jinja2 and trying to give each user in my app a unique URL to their profile page that can be visited by anyone without logging in.  Here is my code thus far:</p>
  
  <pre><code>class ProfilePage(webapp2.RequestHandler):
    def get(self, profile_id):
      user = User.get_by_id(profile_id)
      #profile_id = some unique field
      if user:
         #Get all posts for that user and render....
         theid = user.theid
         personalposts = db.GqlQuery("select * from Post where theid =:1 order by created desc limit 30", theid)
      else:
          personalposts = None
      global visits
      logout = users.create_logout_url(self.request.uri)
      currentuser = users.get_current_user()
      self.render('profile.html', user = currentuser, visits = visits, logout=logout, personalposts=personalposts)
  
  app = webapp2.WSGIApplication([('/', MainPage),
                                 ('/profile/([0-9]+)', ProfilePage),])
  </code></pre>
  
  <p>When I try and test it it just gives me a 404 error.  I suppose if the code is right I might be using the wrong testing URL.  For example if this is their OpenID ID:  How can I test it out I tried just entering www.url.com/profile/<a href="https://www.google.com/accounts/o8/id?id=AItOawlILoSKGNwU5RuTiRtXug1l8raLE45g-56" rel="nofollow noreferrer">https://www.google.com/accounts/o8/id?id=AItOawlILoSKGNwU5RuTiRtXug1l8raLE45g-56</a> would just the id="this part" be what I put so I would have:</p>
  
  <pre><code>url = www.url.com/profile/AItOawlILoSKGNwU5RuTiRtXug1l8raLE45g-56
  </code></pre>
  
  <p>That's what I tried and it didn't quite work.  Thanks in advance for the help!</p>