Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1939: webpath.patch

File webpath.patch, 1.6 KB (added by chrisz, 3 years ago)

Fixes two problems with server.webpath

  • controllers.py

     
    33import logging 
    44import re 
    55import urllib 
     6import urlparse 
    67import types 
    78from itertools import izip 
    89from dispatch import generic, strategy, functions 
     
    586587    users to both call it as a function or to raise it as an exception. 
    587588 
    588589    """ 
     590    if not redirect_path.startswith('/') and config.get('server.webpath'): 
     591        redirect_path = urlparse.urljoin(request.object_path, redirect_path) 
    589592    raise cherrypy.HTTPRedirect(url(tgpath=redirect_path, 
    590593        tgparams=redirect_params, **kw)) 
    591594 
  • qstemplates/quickstart/+package+/templates/login.kid

     
    7676    <div id="loginBox"> 
    7777        <h1>Login</h1> 
    7878        <p>${message}</p> 
    79         <form action="${previous_url}" method="POST"> 
     79        <form action="${tg.url(previous_url)}" method="POST"> 
    8080            <table> 
    8181                <tr> 
    8282                    <td class="label"> 
     
    103103 
    104104            <input py:if="forward_url" type="hidden" name="forward_url" 
    105105                value="${forward_url}"/> 
    106  
     106 
    107107            <div py:for="name,values in original_parameters.items()" py:strip="1"> 
    108108            <input py:for="value in isinstance(values, list) and values or [values]" 
    109109                type="hidden" name="${name}" value="${value}"/>