tagged [templates]

Generics/templates in python?

Generics/templates in python? How does python handle generic/template type scenarios? Say I want to create an external file "BinaryTree.py" and have it handle binary trees, but for any data type. So ...

13 Oct at 05:34

Simulate variadic templates in C#

Simulate variadic templates in C# Is there a well-known way for simulating the variadic template feature in C#? For instance, I'd like to write a method that takes a lambda with an arbitrary set of pa...

13 Jul at 02:58

Django extends/include - bug?

Django extends/include - bug? I'm trying to use both extends and include tags in one template, just like: Unfortunately what is displayed is only list.html without contents from layout.html and file t...

17 Feb at 23:36

How can I add reflection to a C++ application?

How can I add reflection to a C++ application? I'd like to be able to introspect a C++ class for its name, contents (i.e. members and their types) etc. I'm talking native C++ here, not managed C++, wh...

21 Jun at 04:10

How to access a dictionary element in a Django template?

How to access a dictionary element in a Django template? I would like to print out the number of votes that each choice got. I have this code in a template: `votes` is just a dictionary while `choices...

21 Apr at 18:49

Event on Visual Studio project creation

Event on Visual Studio project creation I want to add functionality when the user creates project \ solution in Visual Studio 2010\2012. i.e. I need to perform C# code when a new project is created. ...

How do I perform query filtering in django templates

How do I perform query filtering in django templates I need to perform a filtered query from within a django template, to get a set of objects equivalent to python code within a view: In my template I...

8 Sep at 00:1

Deciphering C++ template error messages

Deciphering C++ template error messages I'm really beginning to understand what people mean when they say that C++'s error messages are pretty terrible in regards to templates. I've seen horrendously ...

24 Sep at 11:16

Starting any Emacs buffer with a .c extension with a template

Starting any Emacs buffer with a .c extension with a template I write a lot of short throwaway programs, and one of the things I find myself doing repeatedly is typing out code like To save some tendo...

11 Jan at 16:50

Flask raises TemplateNotFound error even though template file exists

Flask raises TemplateNotFound error even though template file exists I am trying to render the file `home.html`. The file exists in my project, but I keep getting `jinja2.exceptions.TemplateNotFound: ...

16 Jul at 19:38

What is the equivalent of "none" in django templates?

What is the equivalent of "none" in django templates? I want to see if a field/variable is none within a Django template. What is the correct syntax for that? This is what I currently have: In the exa...

C# generics compared to C++ templates

C# generics compared to C++ templates > [What are the differences between Generics in C# and Java… and Templates in C++?](https://stackoverflow.com/questions/31693/what-are-the-differences-between-ge...

23 May at 11:46

Load django template from the database

Load django template from the database Im trying to render a django template from a database outside of djangos normal request-response structure. But it appears to be non-trivial due to the way djang...

Django TemplateSyntaxError - 'staticfiles' is not a registered tag library

Django TemplateSyntaxError - 'staticfiles' is not a registered tag library After upgrading to Django 3.0, I get the following `TemplateSyntaxError`: Here is my template ``` {%

Wpf Rounded corners progress bar

Wpf Rounded corners progress bar I'm trying to make a simple progress bar with rounded corners. This is my xaml: ```

2 Sep at 13:10

How to create an evaluated Custom Parameter in a VSTemplate

How to create an evaluated Custom Parameter in a VSTemplate So I'm modifying a multi-project VS Template (Visual Studio project template), and I want to set a Custom Parameter in the root template to ...

What is the recommended way to skin an entire application in WPF?

What is the recommended way to skin an entire application in WPF? I want my WPF application to be skinnable, by applying a certain XAML template, and the changes to be application wide, even for dynam...

30 May at 17:13

What ReSharper 4+ live templates for C# do you use?

What ReSharper 4+ live templates for C# do you use? What ReSharper 4.0 templates for do you use? Let's share these in the following format: --- ## [Title] shortcut [AvailabilitySetting] (if present)...

23 May at 12:10

Explanation of <script type = "text/template"> ... </script>

Explanation of ... I just stumbled upon something I've never seen before. In the source of Backbone.js's example TODO application ([Backbone TODO Example](http://documentcloud.github.com/backbone/exam...

How to Debug Variables in Smarty like in PHP var_dump()

How to Debug Variables in Smarty like in PHP var_dump() I have some variables inside a template and I don't know where I assigned them. I need to know what is inside a particular variable; for instanc...

6 Sep at 16:57

Django - iterate number in for loop of a template

Django - iterate number in for loop of a template I have the following for loop in my django template displaying days. I wonder, whether it's possible to iterate a number (in the below case i) in a lo...

14 Jul at 06:8

Render Handlebar templates server side in .NET/C#

Render Handlebar templates server side in .NET/C# Is there an existing library to render handlebar templates in .NET? I would like to use this as a templating engine for users to create HTML email tem...

9 Sep at 15:33

ServiceStack View/Template control when exception occurs?

ServiceStack View/Template control when exception occurs? I added some razor views and use a request filter to check browser version and switch between desktop and mobile views. But when a exception o...

Mangling __FILE__ and __LINE__ in code for quoting?

Mangling __FILE__ and __LINE__ in code for quoting? Is there a way to get the C/C++ preprocessor or a template or such to mangle/hash the __FILE__ and __LINE__ and perhaps some other external input li...

31 Jan at 17:54

EPPlus - How to use a template

EPPlus - How to use a template I have recently discovered EPPlus ([http://epplus.codeplex.com/](http://epplus.codeplex.com/)). I have an excel .xlsx file in my project with all the styled column heade...

7 Mar at 17:54