소스 검색

[core] Fix login tests

Jenny Kim 10 년 전
부모
커밋
5ee2bb1
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      desktop/core/src/desktop/templates/common_footer.mako

+ 4 - 1
desktop/core/src/desktop/templates/common_footer.mako

@@ -14,12 +14,15 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 <%!
+from django.http import HttpRequest
 from django.utils.translation import ugettext as _
 from django.template.defaultfilters import escape, escapejs
 from desktop.views import login_modal
 %>
 
-${ login_modal(request).content | n,unicode }
+%if request and isinstance(request, HttpRequest):
+  ${ login_modal(request).content | n,unicode }
+%endif
 
 <script type="text/javascript">
   $(document).ready(function () {