#914: [patch] Behavior of META js option
---------------------------------+------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |        Owner:  adrian       
     Type:  defect               |       Status:  new          
 Priority:  high                 |    Milestone:               
Component:  Admin interface      |      Version:  magic-removal
 Severity:  normal               |   Resolution:               
 Keywords:  patch                |  
---------------------------------+------------------------------------------
Changes (by nesh <nesh [at] studioquattro [dot] co [dot] yu>):

 * cc: [EMAIL PROTECTED] (added)

Comment:

 What is the status of this patch? I really need this because I don't put
 admin media within my media folder and I hate to use patched django
 source.
 
 I'm definitely against prepending {{{ADMIN_MEDIA_PREFIX}}} to custom JS.
 
 IMHO this patch is OK.
 
 Just a suggestion, remove regexp from the function like this (small
 optimization).
 {{{
 #!python
 _URL_PATTERN = re.compile(r'''(?x)((http|https|ftp)://(\w+[:.]?){2,}(/?|[^
 \n\r"']+[\w/!?.=#])(?=[\s\.,>)"'\]]))''')
 def include_admin_script(script_path):
    if _URL_PATTERN.match(script_path) or script_path[0] == '/':
        return '<script type="text/javascript" src="%s"></script>' %
 (script_path)
    else:
        return '<script type="text/javascript" src="%s%s"></script>' %
 (settings.ADMIN_MEDIA_PREFIX, script_path)
 include_admin_script = register.simple_tag(include_admin_script)
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/914>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to