Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

django allauth


I try to use django-allauth.
It works but i want to overwrite defaults templates.

So, under _templates. I created account/login.html.

the path is ok for django-allauth but i have this erro :

TemplateSyntaxError at /accounts/login/

Invalid template name in 'extends' tag: ''. Got this from the 'layout' variable.


It don't find : {% extends layout %}

How to solve it please ?

Regards


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (62)


I apologise for the delay. To address the issue with the TemplateSyntaxError and the layout variable in django-allauth when trying to override default templates, you can follow these steps:

Check Default Layout Variable:
The error indicates that it's trying to find the layout variable, but it's not provided. By default, the layout variable is set globally in the file /django_demo1/starterkit/_keenthemes/__init__.py like this:

context.update({
"layout": KTTheme.setLayout("default.html", context),
})


Override Layout Variable:
You can override the layout variable value in your views.py file or wherever you are rendering the template. For example, in your view function, you can set the layout variable like this:

from django.shortcuts import render

def my_login_view(request):
# Your view logic here
context = {
# Other context variables
"layout": "your_custom_layout.html", # Set your custom layout here
}
return render(request, "account/login.html", context)

Replace 'your_custom_layout.html' with the path to your custom layout template.

By overriding the layout variable in your views, you can specify the layout you want to use for the account/login.html template and resolve the TemplateSyntaxError.



thank you Faizal



You're welcome! If you have any more questions or need further assistance, please don't hesitate to ask.



I keep finding myself drawn back to your website. The design is so inviting and the content is incredibly engaging. Keep up the fantastic work!Facebook



There are some fascinating deadlines in this article but I don?t know if I see all of them center to heart. There may be some validity but I will take maintain opinion till I look into it further. Good article , thanks and we want extra! Added to FeedBurner as nicelyInstagream



En MCL Renting Impresoras, nos comprometemos a proporcionar soluciones de impresión de primera clase que impulsen el éxito de tu empresa. Con nuestra amplia experiencia en el sector y nuestro enfoque centrado en el cliente, podemos ofrecerte un servicio de renting de impresoras que se adapte perfectamente a tus necesidades empresariales. Confía en nosotros para proporcionarte los equipos y el soporte que necesitas para triunfar.Renting Impresora



Subscribed! Your feed is a beacon of knowledge amidst the noise of social media. Thank you for sharing your insights.꽁머니커뮤니티



Your blog never ceases to amaze me, it is very well written and organized.,*`~~sanador



Good job on this article! I really like how you presented your facts and how you made it interesting and easy to understand. Thank you.Medicijnen Kopen Zonder Recept



This is a excellent blog, would you be involved in doing an interview about just how you designed it? If so e-mail me!big bamboo



Wow, awesome weblog structure! How lengthy have you ever been running a blog for? you made running a blog glance easy. The whole look of your website is magnificent, let alone the content material!Buy Magic Truffles



I am typically to blogging and i actually recognize your content. The article has actually peaks my interest. I am going to bookmark your web site and maintain checking for brand new information.Auburn Electrical Contractor



harryjhon69000@gmail.com



I am usually to blogging and i genuinely appreciate your content regularly. This content has truly peaks my interest. I will bookmark your web site and maintain checking achievable details.Pet Supplies Store



You have a very nice layout for your blog, i want it to use on my site too ,    https://dailyhotel.io/



An intriguing discussion may be valued at comment. I’m sure that you should write regarding this topic, may well be described as a taboo subject but normally folks are there are not enough to chat on such topics. Yet another. Cheersleaf filter



I am definitely bookmarking this website and sharing it with my acquaintances. You will be getting plenty of visitors to your website from me!Al3ayne



great put up, very informative. I ponder why the opposite experts of this sector don’t notice this. You must continue your writing. I’m confident, you’ve a huge readers’ base already!alexistogel



it is always easy to find good ski resorts online, but most of them are expensive but they are great anyway`deposit pulsa tanpa potongan



Great stuff from you, man. Ive scan your stuff before and youre just too fantastic. I love what youve got here, love what youre saying and the way you say it. You make it entertaining and you still manage to keep it smart. I cant wait to scan more from you. This is really a great site.slot



I love your wp format, where did you get a hold of it?Skin Cleansers



You ought to be a part of a tournament for one of the highest quality blogs on-line. I am going to suggest this site!tangandewa slot



my English teacher hate me cause i keep writing about somebody from The WANTED called Jay, she gives me evils and lowwww.sweetmango.fr


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(