TemplateSyntaxError in Django at /admin/login (def

2019-03-06 20:27发布

I looked thoroughly into my files and I could not find one error. Staring and reading my files for 45 minutes was a pain. I now need someone's help, I can't do this

this is the path of the app:

website      
    music
    project1              #this is the main folder that includes settings.py
    db.sqlite3
    manage.py

urls.py from project1 (main) folder:

from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^music/', include('music.urls')),
]

urls.py from music folder:

from django.conf.urls import url
from . import views

urlpatterns = [
    url(r'^$', views.index, name='index'),
]

admin.py in music folder:

from django.contrib import admin

# Register your models here.

apps.py in music.py

from __future__ import unicode_literals

from django.apps import AppConfig


class MusicConfig(AppConfig):
    name = 'music'

And here is the error page im getting when I enter http://127.0.0.1:8000/admin

 TemplateSyntaxError at /admin/login/
default requires 2 arguments, 1 provided
Request Method: GET
Request URL:    http://127.0.0.1:8000/admin/login/?next=/admin/
Django Version: 1.10
Exception Type: TemplateSyntaxError
Exception Value:    
default requires 2 arguments, 1 provided
Exception Location: C:\Python27\lib\site-packages\django\template\base.py in parse, line 518
Python Executable:  C:\Python27\python.exe
Python Version: 2.7.12
Python Path:    
['C:\\Users\\Chris (Local acc)\\desktop\\website',
 'C:\\Windows\\SYSTEM32\\python27.zip',
 'C:\\Python27\\DLLs',
 'C:\\Python27\\lib',
 'C:\\Python27\\lib\\plat-win',
 'C:\\Python27\\lib\\lib-tk',
 'C:\\Python27',
 'C:\\Python27\\lib\\site-packages',
 'C:\\Python27\\lib\\site-packages\\setuptools-25.1.6-py2.7.egg']
Server time:    Sun, 14 Aug 2016 01:01:19 -0700
Error during template rendering

In template C:\Python27\lib\site-packages\django\contrib\admin\templates\admin\base_site.html, error at line 6
default requires 2 arguments, 1 provided
1   {% extends "admin/base.html" %}
2   
3   {% block title %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}
4   
5   {% block branding %}
6   <h1 id="site-name"><a href="{% url 'admin:index' %}">{{ site_header|default:('Kweli's webby') }}</a></h1>
7   {% endblock %}
8   
9   {% block nav-global %}{% endblock %}
10  
Traceback Switch to copy-and-paste view

C:\Python27\lib\site-packages\django\core\handlers\exception.py in inner
            response = get_response(request) ...
▶ Local vars
C:\Python27\lib\site-packages\django\core\handlers\base.py in _get_response
                response = self.process_exception_by_middleware(e, request) ...
▶ Local vars
C:\Python27\lib\site-packages\django\core\handlers\base.py in _get_response
                response = response.render() ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\response.py in render
            self.content = self.rendered_content ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\response.py in rendered_content
        content = template.render(context, self._request) ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\backends\django.py in render
            return self.template.render(context) ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\base.py in render
                    return self._render(context) ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\base.py in _render
        return self.nodelist.render(context) ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\base.py in render
                bit = node.render_annotated(context) ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\base.py in render_annotated
            return self.render(context) ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\loader_tags.py in render
        compiled_parent = self.get_parent(context) ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\loader_tags.py in get_parent
        return self.find_template(parent, context) ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\loader_tags.py in find_template
            template_name, skip=history, ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\engine.py in find_template
                        name, template_dirs=dirs, skip=skip, ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\loaders\base.py in get_template
                    contents, origin, origin.template_name, self.engine, ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\base.py in __init__
        self.nodelist = self.compile_nodelist() ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\base.py in compile_nodelist
            return parser.parse() ...
▶ Local vars
C:\Python27\lib\site-packages\django\template\base.py in parse
                    raise self.error(token, e) ...
▶ Local vars
Request information

USER
AnonymousUser
GET
Variable    Value
next    
u'/admin/'
POST
No POST data
FILES
No FILES data
COOKIES
Variable    Value
csrftoken   
'ttgNoBhEHMAfCPizp52kDZOIaa0xx93eZa84BfRiJkBsT1GWcQXRhzAHumyJHBIM'
META
Variable    Value
ALLUSERSPROFILE 
'C:\\ProgramData'
APPDATA 
'C:\\Users\\Chris (Local acc)\\AppData\\Roaming'
COMMONPROGRAMFILES  
'C:\\Program Files\\Common Files'
COMMONPROGRAMFILES(X86) 
'C:\\Program Files (x86)\\Common Files'
COMMONPROGRAMW6432  
'C:\\Program Files\\Common Files'
COMPUTERNAME    
'CHRIS'
COMSPEC 
'C:\\Windows\\system32\\cmd.exe'
CONTENT_LENGTH  
''
CONTENT_TYPE    
'text/plain'
CSRF_COOKIE 
'ttgNoBhEHMAfCPizp52kDZOIaa0xx93eZa84BfRiJkBsT1GWcQXRhzAHumyJHBIM'
DJANGO_SETTINGS_MODULE  
'project1.settings'
FP_NO_HOST_CHECK    
'NO'
GATEWAY_INTERFACE   
'CGI/1.1'
HOMEDRIVE   
'C:'
HOMEPATH    
'\\Users\\Chris (Local acc)'
HTTP_ACCEPT 
'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'
HTTP_ACCEPT_ENCODING    
'gzip, deflate, sdch'
HTTP_ACCEPT_LANGUAGE    
'en-US,en;q=0.8'
HTTP_CONNECTION 
'keep-alive'
HTTP_COOKIE 
'csrftoken=ttgNoBhEHMAfCPizp52kDZOIaa0xx93eZa84BfRiJkBsT1GWcQXRhzAHumyJHBIM'
HTTP_HOST   
'127.0.0.1:8000'
HTTP_UPGRADE_INSECURE_REQUESTS  
'1'
HTTP_USER_AGENT 
'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36'
LOCALAPPDATA    
'C:\\Users\\Chris (Local acc)\\AppData\\Local'
LOGONSERVER 
'\\\\MicrosoftAccount'
NUMBER_OF_PROCESSORS    
'8'
OS  
'Windows_NT'
PATH    
'C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\ATI Technologies\\ATI.ACE\\Core-Static;C:\\Windows\\system32\\config\\systemprofile\\.dnx\\bin;C:\\Python27;C:\\Python27\\Lib;C:\\Users\\Chris (Local acc)\\stuff\\;C:\\Python27\\Scripts\\;'
PATHEXT 
'.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL'
PATH_INFO   
u'/admin/login/'
PROCESSOR_ARCHITECTURE  
'AMD64'
PROCESSOR_IDENTIFIER    
'AMD64 Family 21 Model 2 Stepping 0, AuthenticAMD'
PROCESSOR_LEVEL 
'21'
PROCESSOR_REVISION  
'0200'
PROGRAMDATA 
'C:\\ProgramData'
PROGRAMFILES    
'C:\\Program Files'
PROGRAMFILES(X86)   
'C:\\Program Files (x86)'
PROGRAMW6432    
'C:\\Program Files'
PSMODULEPATH    
'C:\\Users\\Chris (Local acc)\\Documents\\WindowsPowerShell\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\'
PUBLIC  
'C:\\Users\\Public'
QUERY_STRING    
'next=/admin/'
REMOTE_ADDR 
'127.0.0.1'
REMOTE_HOST 
''
REQUEST_METHOD  
'GET'
RUN_MAIN    
'true'
SCRIPT_NAME 
u''
SERVER_NAME 
'activate.adobe.com'
SERVER_PORT 
'8000'
SERVER_PROTOCOL 
'HTTP/1.1'
SERVER_SOFTWARE 
'WSGIServer/0.1 Python/2.7.12'
SESSIONNAME 
'Console'
SYSTEMDRIVE 
'C:'
SYSTEMROOT  
'C:\\Windows'
TEMP    
'C:\\Users\\CHRIS(~1\\AppData\\Local\\Temp'
TMP 
'C:\\Users\\CHRIS(~1\\AppData\\Local\\Temp'
USERDOMAIN  
'CHRIS'
USERDOMAIN_ROAMINGPROFILE   
'CHRIS'
USERNAME    
'Chris (Local acc)'
USERPROFILE 
'C:\\Users\\Chris (Local acc)'
VS140COMNTOOLS  
'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\'
WINDIR  
'C:\\Windows'
wsgi.errors 
<open file '<stderr>', mode 'w' at 0x000000000244B150>
wsgi.file_wrapper   
''
wsgi.input  
<socket._fileobject object at 0x0000000004033480>
wsgi.multiprocess   
False
wsgi.multithread    
True
wsgi.run_once   
False
wsgi.url_scheme 
'http'
wsgi.version    
(1, 0)
Settings
Using settings module project1.settings
Setting Value
ABSOLUTE_URL_OVERRIDES  
{}
ADMINS  
[]
ALLOWED_HOSTS   
[]
APPEND_SLASH    
True
AUTHENTICATION_BACKENDS 
[u'django.contrib.auth.backends.ModelBackend']
AUTH_PASSWORD_VALIDATORS    
u'********************'
AUTH_USER_MODEL 
u'auth.User'
BASE_DIR    
'C:\\Users\\Chris (Local acc)\\desktop\\website'
CACHES  
{u'default': {u'BACKEND': u'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS  
u'default'
CACHE_MIDDLEWARE_KEY_PREFIX 
u'********************'
CACHE_MIDDLEWARE_SECONDS    
600
CSRF_COOKIE_AGE 
31449600
CSRF_COOKIE_DOMAIN  
None
CSRF_COOKIE_HTTPONLY    
False
CSRF_COOKIE_NAME    
u'csrftoken'
CSRF_COOKIE_PATH    
u'/'
CSRF_COOKIE_SECURE  
False
CSRF_FAILURE_VIEW   
u'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME    
u'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS    
[]
DATABASES   
{'default': {'ATOMIC_REQUESTS': False,
             'AUTOCOMMIT': True,
             'CONN_MAX_AGE': 0,
             'ENGINE': 'django.db.backends.sqlite3',
             'HOST': '',
             'NAME': 'C:\\Users\\Chris (Local acc)\\desktop\\website\\db.sqlite3',
             'OPTIONS': {},
             'PASSWORD': u'********************',
             'PORT': '',
             'TEST': {'CHARSET': None,
                      'COLLATION': None,
                      'MIRROR': None,
                      'NAME': None},
             'TIME_ZONE': None,
             'USER': ''}}
DATABASE_ROUTERS    
[]
DATA_UPLOAD_MAX_MEMORY_SIZE 
2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS   
1000
DATETIME_FORMAT 
u'N j, Y, P'
DATETIME_INPUT_FORMATS  
[u'%Y-%m-%d %H:%M:%S',
 u'%Y-%m-%d %H:%M:%S.%f',
 u'%Y-%m-%d %H:%M',
 u'%Y-%m-%d',
 u'%m/%d/%Y %H:%M:%S',
 u'%m/%d/%Y %H:%M:%S.%f',
 u'%m/%d/%Y %H:%M',
 u'%m/%d/%Y',
 u'%m/%d/%y %H:%M:%S',
 u'%m/%d/%y %H:%M:%S.%f',
 u'%m/%d/%y %H:%M',
 u'%m/%d/%y']
DATE_FORMAT 
u'N j, Y'
DATE_INPUT_FORMATS  
[u'%Y-%m-%d',
 u'%m/%d/%Y',
 u'%m/%d/%y',
 u'%b %d %Y',
 u'%b %d, %Y',
 u'%d %b %Y',
 u'%d %b, %Y',
 u'%B %d %Y',
 u'%B %d, %Y',
 u'%d %B %Y',
 u'%d %B, %Y']
DEBUG   
True
DEBUG_PROPAGATE_EXCEPTIONS  
False
DECIMAL_SEPARATOR   
u'.'
DEFAULT_CHARSET 
u'utf-8'
DEFAULT_CONTENT_TYPE    
u'text/html'
DEFAULT_EXCEPTION_REPORTER_FILTER   
u'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE    
u'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL  
u'webmaster@localhost'
DEFAULT_INDEX_TABLESPACE    
u''
DEFAULT_TABLESPACE  
u''
DISALLOWED_USER_AGENTS  
[]
EMAIL_BACKEND   
u'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST  
u'localhost'
EMAIL_HOST_PASSWORD 
u'********************'
EMAIL_HOST_USER 
u''
EMAIL_PORT  
25
EMAIL_SSL_CERTFILE  
None
EMAIL_SSL_KEYFILE   
u'********************'
EMAIL_SUBJECT_PREFIX    
u'[Django] '
EMAIL_TIMEOUT   
None
EMAIL_USE_SSL   
False
EMAIL_USE_TLS   
False
FILE_CHARSET    
u'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS   
None
FILE_UPLOAD_HANDLERS    
[u'django.core.files.uploadhandler.MemoryFileUploadHandler',
 u'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE 
2621440
FILE_UPLOAD_PERMISSIONS 
None
FILE_UPLOAD_TEMP_DIR    
None
FIRST_DAY_OF_WEEK   
0
FIXTURE_DIRS    
[]
FORCE_SCRIPT_NAME   
None
FORMAT_MODULE_PATH  
None
IGNORABLE_404_URLS  
[]
INSTALLED_APPS  
['music.apps.MusicConfig',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles']
INTERNAL_IPS    
[]
LANGUAGES   
[(u'af', u'Afrikaans'),
 (u'ar', u'Arabic'),
 (u'ast', u'Asturian'),
 (u'az', u'Azerbaijani'),
 (u'bg', u'Bulgarian'),
 (u'be', u'Belarusian'),
 (u'bn', u'Bengali'),
 (u'br', u'Breton'),
 (u'bs', u'Bosnian'),
 (u'ca', u'Catalan'),
 (u'cs', u'Czech'),
 (u'cy', u'Welsh'),
 (u'da', u'Danish'),
 (u'de', u'German'),
 (u'dsb', u'Lower Sorbian'),
 (u'el', u'Greek'),
 (u'en', u'English'),
 (u'en-au', u'Australian English'),
 (u'en-gb', u'British English'),
 (u'eo', u'Esperanto'),
 (u'es', u'Spanish'),
 (u'es-ar', u'Argentinian Spanish'),
 (u'es-co', u'Colombian Spanish'),
 (u'es-mx', u'Mexican Spanish'),
 (u'es-ni', u'Nicaraguan Spanish'),
 (u'es-ve', u'Venezuelan Spanish'),
 (u'et', u'Estonian'),
 (u'eu', u'Basque'),
 (u'fa', u'Persian'),
 (u'fi', u'Finnish'),
 (u'fr', u'French'),
 (u'fy', u'Frisian'),
 (u'ga', u'Irish'),
 (u'gd', u'Scottish Gaelic'),
 (u'gl', u'Galician'),
 (u'he', u'Hebrew'),
 (u'hi', u'Hindi'),
 (u'hr', u'Croatian'),
 (u'hsb', u'Upper Sorbian'),
 (u'hu', u'Hungarian'),
 (u'ia', u'Interlingua'),
 (u'id', u'Indonesian'),
 (u'io', u'Ido'),
 (u'is', u'Icelandic'),
 (u'it', u'Italian'),
 (u'ja', u'Japanese'),
 (u'ka', u'Georgian'),
 (u'kk', u'Kazakh'),
 (u'km', u'Khmer'),
 (u'kn', u'Kannada'),
 (u'ko', u'Korean'),
 (u'lb', u'Luxembourgish'),
 (u'lt', u'Lithuanian'),
 (u'lv', u'Latvian'),
 (u'mk', u'Macedonian'),
 (u'ml', u'Malayalam'),
 (u'mn', u'Mongolian'),
 (u'mr', u'Marathi'),
 (u'my', u'Burmese'),
 (u'nb', u'Norwegian Bokm\xe5l'),
 (u'ne', u'Nepali'),
 (u'nl', u'Dutch'),
 (u'nn', u'Norwegian Nynorsk'),
 (u'os', u'Ossetic'),
 (u'pa', u'Punjabi'),
 (u'pl', u'Polish'),
 (u'pt', u'Portuguese'),
 (u'pt-br', u'Brazilian Portuguese'),
 (u'ro', u'Romanian'),
 (u'ru', u'Russian'),
 (u'sk', u'Slovak'),
 (u'sl', u'Slovenian'),
 (u'sq', u'Albanian'),
 (u'sr', u'Serbian'),
 (u'sr-latn', u'Serbian Latin'),
 (u'sv', u'Swedish'),
 (u'sw', u'Swahili'),
 (u'ta', u'Tamil'),
 (u'te', u'Telugu'),
 (u'th', u'Thai'),
 (u'tr', u'Turkish'),
 (u'tt', u'Tatar'),
 (u'udm', u'Udmurt'),
 (u'uk', u'Ukrainian'),
 (u'ur', u'Urdu'),
 (u'vi', u'Vietnamese'),
 (u'zh-hans', u'Simplified Chinese'),
 (u'zh-hant', u'Traditional Chinese')]
LANGUAGES_BIDI  
[u'he', u'ar', u'fa', u'ur']
LANGUAGE_CODE   
'en-us'
LANGUAGE_COOKIE_AGE 
None
LANGUAGE_COOKIE_DOMAIN  
None
LANGUAGE_COOKIE_NAME    
u'django_language'
LANGUAGE_COOKIE_PATH    
u'/'
LOCALE_PATHS    
[]
LOGGING 
{}
LOGGING_CONFIG  
u'logging.config.dictConfig'
LOGIN_REDIRECT_URL  
u'/accounts/profile/'
LOGIN_URL   
u'/accounts/login/'
LOGOUT_REDIRECT_URL 
None
MANAGERS    
[]
MEDIA_ROOT  
u''
MEDIA_URL   
u''
MESSAGE_STORAGE 
u'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE  
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']
MIDDLEWARE_CLASSES  
[u'django.middleware.common.CommonMiddleware',
 u'django.middleware.csrf.CsrfViewMiddleware']
MIGRATION_MODULES   
{}
MONTH_DAY_FORMAT    
u'F j'
NUMBER_GROUPING 
0
PASSWORD_HASHERS    
u'********************'
PASSWORD_RESET_TIMEOUT_DAYS 
u'********************'
PREPEND_WWW 
False
ROOT_URLCONF    
'project1.urls'
SECRET_KEY  
u'********************'
SECURE_BROWSER_XSS_FILTER   
False
SECURE_CONTENT_TYPE_NOSNIFF 
False
SECURE_HSTS_INCLUDE_SUBDOMAINS  
False
SECURE_HSTS_SECONDS 
0
SECURE_PROXY_SSL_HEADER 
None
SECURE_REDIRECT_EXEMPT  
[]
SECURE_SSL_HOST 
None
SECURE_SSL_REDIRECT 
False
SERVER_EMAIL    
u'root@localhost'
SESSION_CACHE_ALIAS 
u'default'
SESSION_COOKIE_AGE  
1209600
SESSION_COOKIE_DOMAIN   
None
SESSION_COOKIE_HTTPONLY 
True
SESSION_COOKIE_NAME 
u'sessionid'
SESSION_COOKIE_PATH 
u'/'
SESSION_COOKIE_SECURE   
False
SESSION_ENGINE  
u'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE 
False
SESSION_FILE_PATH   
None
SESSION_SAVE_EVERY_REQUEST  
False
SESSION_SERIALIZER  
u'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE 
'project1.settings'
SHORT_DATETIME_FORMAT   
u'm/d/Y P'
SHORT_DATE_FORMAT   
u'm/d/Y'
SIGNING_BACKEND 
u'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS  
[]
STATICFILES_DIRS    
[]
STATICFILES_FINDERS 
[u'django.contrib.staticfiles.finders.FileSystemFinder',
 u'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE 
u'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT 
None
STATIC_URL  
'/static/'
TEMPLATES   
[{'APP_DIRS': True,
  'BACKEND': 'django.template.backends.django.DjangoTemplates',
  'DIRS': [],
  'OPTIONS': {'context_processors': ['django.template.context_processors.debug',
                                     'django.template.context_processors.request',
                                     'django.contrib.auth.context_processors.auth',
                                     'django.contrib.messages.context_processors.messages']}}]
TEST_NON_SERIALIZED_APPS    
[]
TEST_RUNNER 
u'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR  
u','
TIME_FORMAT 
u'P'
TIME_INPUT_FORMATS  
[u'%H:%M:%S', u'%H:%M:%S.%f', u'%H:%M']
TIME_ZONE   
'UTC'
USE_ETAGS   
False
USE_I18N    
True
USE_L10N    
True
USE_THOUSAND_SEPARATOR  
False
USE_TZ  
True
USE_X_FORWARDED_HOST    
False
USE_X_FORWARDED_PORT    
False
WSGI_APPLICATION    
'project1.wsgi.application'
X_FRAME_OPTIONS 
u'SAMEORIGIN'
YEAR_MONTH_FORMAT   
u'F Y'

Please help, thanks!

1条回答
干净又极端
2楼-- · 2019-03-06 20:48

Your login template has a syntax error as you did not escape the apostrophe (') in your string literal. Change the following

{{ site_header|default:('Kweli's webby') }}

to

{{ site_header|default:_("Kweli's webby") }}

Also note the underscore (_) before the string argument which is used for localization. If you don't need multiple languages, you can get rid of parantheses and simply write

{{ site_header|default:"Kweli's webby" }}
查看更多
登录 后发表回答