Changeset 987
- Timestamp:
- 10/20/05 18:40:10 (3 years ago)
- Files:
-
- django/branches/new-admin/django/core/management.py (modified) (1 diff)
- django/branches/new-admin/django/core/template/loader.py (modified) (1 diff)
- django/branches/new-admin/django/core/template/loaders/app_directories.py (modified) (2 diffs)
- django/branches/new-admin/docs/templates.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/new-admin/django/core/management.py
r982 r987 300 300 for sql in get_sql_create(core) + get_sql_create(auth) + get_sql_initial_data(core) + get_sql_initial_data(auth): 301 301 cursor.execute(sql) 302 cursor.execute("INSERT INTO %s (domain, name) VALUES (' mysite.com', 'My Djangosite')" % core.Site._meta.db_table)302 cursor.execute("INSERT INTO %s (domain, name) VALUES ('example.com', 'Example site')" % core.Site._meta.db_table) 303 303 except Exception, e: 304 304 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 56 56 for loader in template_source_loaders: 57 57 try: 58 source, display_name = loader(name, dirs) 59 60 61 58 source, display_name = loader(name, dirs) 62 59 return (source, LoaderOrigin(display_name, loader, name, dirs)) 63 60 except TemplateDoesNotExist: django/branches/new-admin/django/core/template/loaders/app_directories.py
r986 r987 2 2 3 3 from django.conf.settings import INSTALLED_APPS, TEMPLATE_FILE_EXTENSION 4 from django.core.exceptions import ImproperlyConfigured 4 5 from django.core.template import TemplateDoesNotExist 5 6 import os … … 9 10 for app in INSTALLED_APPS: 10 11 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]) 13 23 template_dir = os.path.join(os.path.dirname(mod.__file__), 'templates') 14 24 if os.path.isdir(template_dir): django/branches/new-admin/docs/templates.txt
r975 r987 611 611 {% ssi /home/html/ljworld.com/includes/right_generic.html parsed %} 612 612 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 613 618 ``templatetag`` 614 619 Output one of the bits used to compose template tags.
