Django

Code

Changeset 987

Show
Ignore:
Timestamp:
10/20/05 18:40:10 (3 years ago)
Author:
rjwittams
Message:

Merged to trunk r985

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/new-admin/django/core/management.py

    r982 r987  
    300300        for sql in get_sql_create(core) + get_sql_create(auth) + get_sql_initial_data(core) + get_sql_initial_data(auth): 
    301301            cursor.execute(sql) 
    302         cursor.execute("INSERT INTO %s (domain, name) VALUES ('mysite.com', 'My Django site')" % core.Site._meta.db_table) 
     302        cursor.execute("INSERT INTO %s (domain, name) VALUES ('example.com', 'Example site')" % core.Site._meta.db_table) 
    303303    except Exception, e: 
    304304        sys.stderr.write("Error: The database couldn't be initialized.\n%s\n" % e)  
  • django/branches/new-admin/django/core/template/loader.py

    r982 r987  
    5656    for loader in template_source_loaders: 
    5757        try: 
    58             source, display_name  = loader(name, dirs)  
    59              
    60              
    61              
     58            source, display_name  = loader(name, dirs) 
    6259            return (source, LoaderOrigin(display_name, loader, name, dirs)) 
    6360        except TemplateDoesNotExist: 
  • django/branches/new-admin/django/core/template/loaders/app_directories.py

    r986 r987  
    22 
    33from django.conf.settings import INSTALLED_APPS, TEMPLATE_FILE_EXTENSION 
     4from django.core.exceptions import ImproperlyConfigured 
    45from django.core.template import TemplateDoesNotExist 
    56import os 
     
    910for app in INSTALLED_APPS: 
    1011    i = app.rfind('.') 
    11     m, a = app[:i], app[i+1:] 
    12     mod = getattr(__import__(m, '', '', [a]), a) 
     12    if i == -1: 
     13        m, a = app, None 
     14    else: 
     15        m, a = app[:i], app[i+1:] 
     16    try: 
     17        if a is None: 
     18            mod = __import__(m, '', '', []) 
     19        else: 
     20            mod = getattr(__import__(m, '', '', [a]), a) 
     21    except ImportError, e: 
     22        raise ImproperlyConfigured, 'ImportError %s: %s' % (app, e.args[0]) 
    1323    template_dir = os.path.join(os.path.dirname(mod.__file__), 'templates') 
    1424    if os.path.isdir(template_dir): 
  • django/branches/new-admin/docs/templates.txt

    r975 r987  
    611611        {% ssi /home/html/ljworld.com/includes/right_generic.html parsed %} 
    612612 
     613    Note that if you use ``{% ssi %}``, you'll need to define 
     614    `ALLOWED_INCLUDE_ROOTS`_ in your Django settings, as a security measure. 
     615 
     616.. _ALLOWED_INCLUDE_ROOTS: http://www.djangoproject.com/documentation/settings/#allowed-include-roots 
     617 
    613618``templatetag`` 
    614619    Output one of the bits used to compose template tags.