Show
Ignore:
Timestamp:
06/16/09 12:23:37 (14 months ago)
Author:
JensDiemer
Message:

ajax login!

  • needs tests
  • "{{ login_link }}" -> "{% lucidTag auth %}"
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/0.9/pylucid_project/apps/pylucid_update/views.py

    r2030 r2034  
    267267        content = template.content 
    268268 
    269         new_head_file_tag = ( 
     269 
     270        SCRIPT_TAG = ( 
    270271            '<script src="%(url)s"' 
    271272            ' onerror="JavaScript:alert(\'Error loading file [%(url)s] !\');"' 
    272273            ' type="text/javascript" /></script>\n' 
    273             '<!-- ContextMiddleware extrahead -->\n' 
    274         ) % { 
     274        ) 
     275 
     276        new_head_file_tag = "" 
     277        new_head_file_tag += SCRIPT_TAG % { 
    275278            "url": posixpath.join(settings.MEDIA_URL, settings.PYLUCID.PYLUCID_MEDIA_DIR, "jquery.js") 
    276279        } 
     280        new_head_file_tag += SCRIPT_TAG % { 
     281            "url": posixpath.join( 
     282                settings.MEDIA_URL, settings.PYLUCID.PYLUCID_MEDIA_DIR, "pylucid_js_tools.js" 
     283            ) 
     284        } 
     285        new_head_file_tag += '<!-- ContextMiddleware extrahead -->\n'       
    277286         
    278287        content = replace(content, out,"{% lucidTag page_style %}", new_head_file_tag) 
     
    280289        content = replace(content, out,"{% lucidTag head_files %}", new_head_file_tag) 
    281290        content = replace(content, out,"<!-- ContextMiddleware head_files -->", new_head_file_tag) 
     291         
     292        content = replace(content, out,"{{ login_link }}", "{% lucidTag auth %}") 
    282293         
    283294        content = replace(content, out,"{% lucidTag back_links %}", "<!-- ContextMiddleware breadcrumb -->")