Hi David,
is the static context processor included in your settings? Something like:
TEMPLATE_CONTEXT_PROCESSORS = (
....
'django.core.context_processors.media',
'django.core.context_processors.static',
....
)
On Tuesday, November 27, 2012 4:12:44 AM UTC+1, David Hua wrote:
>
> Hi All,
>
> I am new to satchmo and django, but I have used python for a long time. I
> just followed the installation guide of satchmo and encounter the
> following problems when I am trying to access http://127.0.0.1:8000/admin/
> :
>
> TemplateSyntaxError at /admin/
>
> 'admin_static' is not a valid tag library: Template library admin_static not
> found, tried
> django.templatetags.admin_static,satchmo_store.shop.templatetags.admin_static,django.contrib.admin.templatetags.admin_static,django.contrib.comments.templatetags.admin_static,sorl.thumbnail.templatetags.admin_static,livesettings.templatetags.admin_static,satchmo_utils.thumbnail.templatetags.admin_static,satchmo_store.contact.templatetags.admin_static,tax.templatetags.admin_static,product.templatetags.admin_static,payment.templatetags.admin_static,satchmo_utils.templatetags.admin_static,app_plugins.templatetags.admin_static
>
>
> I did search online, but I cannot find a clear solution to this. Please
> help me if you know what's the problem. Thanks a lot.
>
> Below is the detailed error log:
>
> Environment:
>
>
> Request Method: GET
> Request URL: http://127.0.0.1:8000/admin/
>
> Django Version: 1.3.1
> Python Version: 2.7.3
> Installed Applications:
> ['django.contrib.sites',
> 'satchmo_store.shop',
> 'django.contrib.admin',
> 'django.contrib.admindocs',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.comments',
> 'django.contrib.sessions',
> 'django.contrib.sitemaps',
> 'django.contrib.staticfiles',
> 'django.contrib.messages',
> 'registration',
> 'sorl.thumbnail',
> 'keyedcache',
> 'livesettings',
> 'l10n',
> 'satchmo_utils.thumbnail',
> 'satchmo_store.contact',
> 'tax',
> 'tax.modules.no',
> 'tax.modules.area',
> 'tax.modules.percent',
> 'shipping',
> 'product',
> 'product.modules.configurable',
> 'product.modules.custom',
> 'payment',
> 'payment.modules.dummy',
> 'satchmo_ext.satchmo_toolbar',
> 'satchmo_utils',
> 'app_plugins',
> 'store.localsite']
> Installed Middleware:
> ('django.middleware.common.CommonMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.middleware.locale.LocaleMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.middleware.doc.XViewMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> 'threaded_multihost.middleware.ThreadLocalMiddleware',
> 'satchmo_store.shop.SSLMiddleware.SSLRedirect')
>
>
> Template error:
> In template
> /usr/local/lib/python2.7/dist-packages/Satchmo-0.9.3-py2.7.egg/satchmo_store/shop/templates/admin/base_site.html,
>
> error at line 28
> 'admin_static' is not a valid tag library: Template library
> admin_static not found, tried
> django.templatetags.admin_static,satchmo_store.shop.templatetags.admin_static,django.contrib.admin.templatetags.admin_static,django.contrib.comments.templatetags.admin_static,sorl.thumbnail.templatetags.admin_static,livesettings.templatetags.admin_static,satchmo_utils.thumbnail.templatetags.admin_static,satchmo_store.contact.templatetags.admin_static,tax.templatetags.admin_static,product.templatetags.admin_static,payment.templatetags.admin_static,satchmo_utils.templatetags.admin_static,app_plugins.templatetags.admin_static
> 18 : satchmo.select_if_one('#id_site', 'site');
>
>
> 19 : });
>
>
> 20 : -->
>
>
> 21 : </script>
>
>
> 22 : {% endblock %}
>
>
> 23 :
>
>
> 24 : {% block extrastyle %}
>
>
> 25 : {{ block.super }}
>
>
> 26 :
>
>
> 27 : {% if STATIC_URL %}
>
>
> 28 : {% load admin_static %}
>
>
> 29 : <link rel="stylesheet" type="text/css" href="{% static
> 'admin/css/base.css' %}" />
>
>
> 30 : {% else %}
>
>
> 31 : {% load adminmedia %}
>
>
> 32 : <link rel="stylesheet" type="text/css" href="{%
> admin_media_prefix %}css/base.css"/>
>
>
> 33 : {% endif %}
>
>
> 34 :
>
>
> 35 : <style type="text/css">
>
>
> 36 : #content-related { float:right; width:29em; position:relative;
> margin-right: -30em;}
>
>
> 37 : #content-related .module h2 { cursor: default; }
>
>
> 38 : #content-related .module h2 .status { font-style: italic; }
>
>
> Traceback:
> File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in
> get_response
> 111. response = callback(request,
> *callback_args, **callback_kwargs)
> File "/usr/lib/python2.7/dist-packages/django/contrib/admin/sites.py" in
> wrapper
> 214. return self.admin_view(view, cacheable)(*args,
> **kwargs)
> File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py" in
> _wrapped_view
> 93. response = view_func(request, *args, **kwargs)
> File "/usr/lib/python2.7/dist-packages/django/views/decorators/cache.py"
> in _wrapped_view_func
> 79. response = view_func(request, *args, **kwargs)
> File "/usr/lib/python2.7/dist-packages/django/contrib/admin/sites.py" in
> inner
> 196. return self.login(request)
> File "/usr/lib/python2.7/dist-packages/django/views/decorators/cache.py"
> in _wrapped_view_func
> 79. response = view_func(request, *args, **kwargs)
> File "/usr/lib/python2.7/dist-packages/django/contrib/admin/sites.py" in
> login
> 331. return login(request, **defaults)
> File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py" in
> _wrapped_view
> 93. response = view_func(request, *args, **kwargs)
> File "/usr/lib/python2.7/dist-packages/django/views/decorators/cache.py"
> in _wrapped_view_func
> 79. response = view_func(request, *args, **kwargs)
> File "/usr/lib/python2.7/dist-packages/django/contrib/auth/views.py" in
> login
> 69. context_instance=RequestContext(request,
> current_app=current_app))
> File "/usr/lib/python2.7/dist-packages/django/shortcuts/__init__.py" in
> render_to_response
> 20. return HttpResponse(loader.render_to_string(*args, **kwargs),
> **httpresponse_kwargs)
> File "/usr/lib/python2.7/dist-packages/django/template/loader.py" in
> render_to_string
> 188. return t.render(context_instance)
> File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render
> 123. return self._render(context)
> File "/usr/lib/python2.7/dist-packages/django/template/base.py" in _render
> 117. return self.nodelist.render(context)
> File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render
> 744. bits.append(self.render_node(node, context))
> File "/usr/lib/python2.7/dist-packages/django/template/debug.py" in
> render_node
> 73. result = node.render(context)
> File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in
> render
> 105. compiled_parent = self.get_parent(context)
> File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in
> get_parent
> 102. return get_template(parent)
> File "/usr/lib/python2.7/dist-packages/django/template/loader.py" in
> get_template
> 157. template, origin = find_template(template_name)
> File "/usr/lib/python2.7/dist-packages/django/template/loader.py" in
> find_template
> 134. source, display_name = loader(name, dirs)
> File "/usr/lib/python2.7/dist-packages/django/template/loader.py" in
> __call__
> 42. return self.load_template(template_name, template_dirs)
> File "/usr/lib/python2.7/dist-packages/django/template/loader.py" in
> load_template
> 48. template = get_template_from_string(source, origin,
> template_name)
> File "/usr/lib/python2.7/dist-packages/django/template/loader.py" in
> get_template_from_string
> 168. return Template(source, origin, name)
> File "/usr/lib/python2.7/dist-packages/django/template/base.py" in
> __init__
> 108. self.nodelist = compile_string(template_string, origin)
> File "/usr/lib/python2.7/dist-packages/django/template/base.py" in
> compile_string
> 136. return parser.parse()
> File "/usr/lib/python2.7/dist-packages/django/template/base.py" in parse
> 239. compiled_result = compile_func(self, token)
> File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in
> do_extends
> 214. nodelist = parser.parse()
> File "/usr/lib/python2.7/dist-packages/django/template/base.py" in parse
> 239. compiled_result = compile_func(self, token)
> File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in
> do_block
> 192. nodelist = parser.parse(('endblock', 'endblock %s' %
> block_name))
> File "/usr/lib/python2.7/dist-packages/django/template/base.py" in parse
> 239. compiled_result = compile_func(self, token)
> File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py" in
> do_if
> 922. nodelist_true = parser.parse(('else', 'endif'))
> File "/usr/lib/python2.7/dist-packages/django/template/base.py" in parse
> 239. compiled_result = compile_func(self, token)
> File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py" in
> load
> 1054. (taglib, e))
>
> Exception Type: TemplateSyntaxError at /admin/
> Exception Value: 'admin_static' is not a valid tag library: Template
> library admin_static not found, tried
> django.templatetags.admin_static,satchmo_store.shop.templatetags.admin_static,django.contrib.admin.templatetags.admin_static,django.contrib.comments.templatetags.admin_static,sorl.thumbnail.templatetags.admin_static,livesettings.templatetags.admin_static,satchmo_utils.thumbnail.templatetags.admin_static,satchmo_store.contact.templatetags.admin_static,tax.templatetags.admin_static,product.templatetags.admin_static,payment.templatetags.admin_static,satchmo_utils.templatetags.admin_static,app_plugins.templatetags.admin_static
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Satchmo users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/satchmo-users/-/Jpp1SnLgMuAJ.
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/satchmo-users?hl=en.