You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to incorporate a url block in a embedded anchor tag's href:
p Test and #[a.thing(href="{% url 'stuff' %}") lorem ipsum]
What I Did
Traceback:
Internal Server Error: /news/subscribe
Traceback (most recent call last):
File "/home/ewen/.local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/ewen/.local/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/ewen/.local/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/ewen/Coding/projects/mx3creations/newsletter/views.py", line 27, in subscribe
return render(request, 'subscribe.pug', locals())
File "/home/ewen/.local/lib/python3.6/site-packages/django/shortcuts.py", line 36, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "/home/ewen/.local/lib/python3.6/site-packages/django/template/loader.py", line 61, in render_to_string
template = get_template(template_name, using=using)
File "/home/ewen/.local/lib/python3.6/site-packages/django/template/loader.py", line 15, in get_template
return engine.get_template(template_name)
File "/home/ewen/.local/lib/python3.6/site-packages/django/template/backends/django.py", line 34, in get_template
return Template(self.engine.get_template(template_name), self)
File "/home/ewen/.local/lib/python3.6/site-packages/django/template/engine.py", line 143, in get_template
template, origin = self.find_template(template_name)
File "/home/ewen/.local/lib/python3.6/site-packages/django/template/engine.py", line 125, in find_template
template = loader.get_template(name, skip=skip)
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/ext/django/loader.py", line 43, in get_template
return super(cached.Loader, self).get_template(template_name, **kwargs)
File "/home/ewen/.local/lib/python3.6/site-packages/django/template/loaders/base.py", line 24, in get_template
contents = self.get_contents(origin)
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/ext/django/loader.py", line 33, in get_contents
contents, filename=origin.template_name, compiler=Compiler
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/utils.py", line 232, in process
block = _parser.parse()
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 52, in parse
block.append(self.parseExpr())
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 91, in parseExpr
return self.parseExpr()
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 95, in parseExpr
return getattr(self, funcName)()
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 363, in parseTag
block = self.block()
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 273, in block
block.append(self.parseExpr())
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 95, in parseExpr
return getattr(self, funcName)()
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 188, in parseConditional
node.block = self.block()
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 273, in block
block.append(self.parseExpr())
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 95, in parseExpr
return getattr(self, funcName)()
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 363, in parseTag
block = self.block()
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 273, in block
block.append(self.parseExpr())
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 95, in parseExpr
return getattr(self, funcName)()
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 354, in parseTag
while 'newline' == self.peek().type:
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 35, in peek
p = self.lookahead(1)
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/parser.py", line 42, in lookahead
return self.lexer.lookahead(n)
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/lexer.py", line 139, in lookahead
self.stash.append(self.next())
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/lexer.py", line 715, in next
or self.string()
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/lexer.py", line 367, in string
return self.scanInlineProcess(self.RE_STRING, 'string')
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/lexer.py", line 357, in scanInlineProcess
toks = self.scanInline(regexp, type_)
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/lexer.py", line 348, in scanInline
ret = self.processInline(ret.val)
File "/home/ewen/.local/lib/python3.6/site-packages/pypugjs/lexer.py", line 308, in processInline
start_inline = self.RE_INLINE.search(sval_replaced).start()
AttributeError: 'NoneType' object has no attribute 'start'
The text was updated successfully, but these errors were encountered:
Description
I was trying to incorporate a
url
block in a embedded anchor tag's href:What I Did
Traceback:
The text was updated successfully, but these errors were encountered: