Django

Code

Changeset 1382

Show
Ignore:
Timestamp:
11/23/05 17:23:20 (3 years ago)
Author:
rjwittams
Message:

Merge to trunk r1381

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/new-admin/django/bin/make-messages.py

    r1125 r1382  
    1515    localedir = os.path.abspath('locale') 
    1616else: 
    17     print "this script should be run from the django svn tree or your project or app tree" 
     17    print "This script should be run from the django svn tree or your project or app tree." 
     18    print "If you did indeed run it from the svn checkout or your project or application," 
     19    print "maybe you are just missing the conf/locale (in the django tree) or locale (for project" 
     20    print "and application) directory?" 
     21    print "make-messages.py doesn't create it automatically, you have to create it by hand if" 
     22    print "you want to enable i18n for your project or application." 
    1823    sys.exit(1) 
    1924 
  • django/branches/new-admin/django/conf/locale/de/LC_MESSAGES/django.po

    r1365 r1382  
    11721172msgid "hour" 
    11731173msgid_plural "hours" 
    1174 msgstr[0] "
    1175 msgstr[1] "
     1174msgstr[0] "Stunde
     1175msgstr[1] "Stunden
    11761176 
    11771177#: utils/timesince.py:16 
  • django/branches/new-admin/django/conf/locale/sk/LC_MESSAGES/django.po

    r1362 r1382  
    11921192 
    11931193#: utils/timesince.py:14 
    1194 #, fuzzy 
    11951194msgid "day" 
    11961195msgid_plural "days" 
     
    12011200msgid "hour" 
    12021201msgid_plural "hours" 
    1203 msgstr[0] "
    1204 msgstr[1] "
     1202msgstr[0] "hodina
     1203msgstr[1] "hodín
    12051204 
    12061205#: utils/timesince.py:16 
    1207 #, fuzzy 
    12081206msgid "minute" 
    12091207msgid_plural "minutes" 
    1210 msgstr[0] "web
    1211 msgstr[1] "web
     1208msgstr[0] "minúta
     1209msgstr[1] "minút
    12121210 
    12131211#: models/core.py:7 
     
    13801378 
    13811379#: conf/global_settings.py:40 
    1382 #, fuzzy 
    13831380msgid "Danish" 
    1384 msgstr "Španielsky" 
     1381msgstr "Dánsky" 
    13851382 
    13861383#: conf/global_settings.py:41 
  • django/branches/new-admin/django/contrib/admin/templates/admin/index.html

    r1154 r1382  
    2323                <th>{{ model.name }}</th> 
    2424            {% endif %} 
    25  
     25                        {{}} 
    2626            {% if model.perms.add %} 
    2727                <td class="x50"><a href="{{ model.admin_url }}add/" class="addlink">{% trans 'Add' %}</a></td> 
  • django/branches/new-admin/django/contrib/comments/templatetags/comments.py

    r1268 r1382  
    4545 
    4646FREE_COMMENT_FORM = ''' 
     47{% load i18n %} 
    4748{% if display_form %} 
    4849<form action="/comments/postfree/" method="post"> 
  • django/branches/new-admin/django/core/urlresolvers.py

    r719 r1382  
    88""" 
    99 
    10 from django.core.exceptions import Http404, ViewDoesNotExist 
     10from django.core.exceptions import Http404, ImproperlyConfigured, ViewDoesNotExist 
    1111import re 
    1212 
     
    7575            return self._urlconf_module 
    7676        except AttributeError: 
    77             self._urlconf_module = __import__(self.urlconf_name, '', '', ['']) 
     77            try: 
     78                self._urlconf_module = __import__(self.urlconf_name, '', '', ['']) 
     79            except ValueError, e: 
     80                # Invalid urlconf_name, such as "foo.bar." (note trailing period) 
     81                raise ImproperlyConfigured, "Error while importing URLconf %r: %s" % (self.urlconf_name, e) 
    7882            return self._urlconf_module 
    7983    urlconf_module = property(_get_urlconf_module) 
  • django/branches/new-admin/django/utils/timesince.py

    r1361 r1382  
    1 import datetime, time 
     1import datetime, math, time 
    22from django.utils.tzinfo import LocalTimezone 
    33from django.utils.translation import ngettext 
     
    3131        if count != 0: 
    3232            break 
     33    if count < 0: 
     34        return '%d milliseconds' % math.floor(delta.microseconds / 1000) 
    3335    s = '%d %s' % (count, name(count)) 
    3436    if i + 1 < len(chunks): 
  • django/branches/new-admin/django/views/debug.py

    r1373 r1382  
     1 
    12from django.conf import settings 
    23from django.core.template import Template, Context 
     
    173174    table td.code { width:100%; } 
    174175    table td.code div { overflow:hidden; } 
     176    table.source th { color:#666; } 
     177    table.source td { font-family:monospace; white-space:pre; border-bottom:1px solid #eee; } 
    175178    ul.traceback { list-style-type:none; } 
    176179    ul.traceback li.frame { margin-bottom:1em; } 
     
    185188    #summary h2 { font-weight: normal; color: #666; } 
    186189    #explanation { background:#eee; } 
     190    #template { background:#f6f6f6; } 
    187191    #traceback { background:#eee; } 
    188192    #requestinfo { background:#f6f6f6; padding-left:120px; } 
     
    190194    #requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; } 
    191195    #requestinfo h3 { margin-bottom:-1em; } 
    192     table.source td { font-family: monospace; white-space: pre; } 
    193     span.specific { background:#ffcab7; } 
    194196    .error { background: #ffc; } 
     197    .specific { color:#cc3300; font-weight:bold; } 
    195198  </style> 
    196199  <script type="text/javascript"> 
     
    272275{% if template_info %} 
    273276<div id="template"> 
    274    <h2>Template</h2> 
    275    In template {{ template_info.name }}, error at line {{ template_info.line }} 
    276    <div>{{ template_info.message|escape }}</div
     277   <h2>Template error</h2> 
     278   <p>In template <code>{{ template_info.name }}</code>, error at line <strong>{{ template_info.line }}</strong></p> 
     279   <h3>{{ template_info.message|escape }}</h3
    277280   <table class="source{% if template_info.top %} cut-top{% endif %}{% ifnotequal template_info.bottom template_info.total %} cut-bottom{% endifnotequal %}"> 
    278281   {% for source_line in template_info.source_lines %} 
    279282   {% ifequal source_line.0 template_info.line %} 
    280        <tr class="error"><td>{{ source_line.0 }}</td
     283       <tr class="error"><th>{{ source_line.0 }}</th
    281284       <td>{{ template_info.before }}<span class="specific">{{ template_info.during }}</span>{{ template_info.after }}</td></tr> 
    282285   {% else %} 
    283       <tr><td>{{ source_line.0 }}</td
     286      <tr><th>{{ source_line.0 }}</th
    284287      <td> {{ source_line.1 }}</td></tr> 
    285288   {% endifequal %} 
  • django/branches/new-admin/tests/othertests/templates.py

    r1361 r1382  
    100100    'basic-syntax29': ('{{ var|removetags:"b i"|upper|lower }}', {"var": "<b><i>Yes</i></b>"}, "yes"), 
    101101 
    102     #Escaped string as argument  
     102    #Escaped string as argument 
    103103    'basic-syntax30': (r"""{{ var|default_if_none:" endquote\" hah" }}""", {"var": None}, ' endquote" hah'), 
    104      
     104 
    105105     
    106106    ### IF TAG ################################################################ 
     
    233233                    Hello, 
    234234                    boys. 
    235                     How  
    236                     are  
     235                    How 
     236                    are 
    237237                    you 
    238                     gentlemen.  
    239                     """,  
    240                     {},  
     238                    gentlemen. 
     239                    """, 
     240                    {}, 
    241241                    """ 
    242242                    Hello, 
    243243                    boys. 
    244                     How  
    245                     are  
     244                    How 
     245                    are 
    246246                    you 
    247                     gentlemen.  
     247                    gentlemen. 
    248248                    """  ), 
    249249    # simple translation of a string delimited by '