templatetags
translated enum fields in template tags
I try to show the name of an enum in the template.To be clear, I have enum like class in model.py class EmployerWorkerNumberRange():[详细]
2023-03-08 17:54 分类:问答problem with simple templatetags usage in django
I try to use templatetags in django but I have trouble. I defined enumhelper.py in the templatetags package.[详细]
2023-03-08 02:00 分类:问答How can I get a Django Template to render itself within a Mako Template?
We made the decision quite awhile ago to use Mako Templates in our Django project. We\'re also supporting Django Templates, since a lot of reusable apps (obviously) assume that Django Templating is av[详细]
2023-02-17 12:29 分类:问答How do I write a Django template tag for access control?
I\'m trying, in vain, to create a simple Django template tag to either show or hide a \"delete\" link next to a submitted comment on my site.[详细]
2023-01-17 18:03 分类:问答Re-usable HTML code / widgets
Sometimes I need to use the same html code in different templates, like: <div class=\"mylist\"><span>开发者_开发知识库;item-1</span><span>item-2</span>...</div>[详细]
2023-01-11 02:02 分类:问答How do I access unrelated models within a Django template?
I want to use an app to create a menu that is easy to edit with the admin interface. Something like this:[详细]
2023-01-07 22:18 分类:问答Can I raise Http404 in a Django template tag?
I have a Django application 开发者_JS百科that provides template tag profile. The tag accepts a username as its argument. How should I treat the situation when there exists no User instance with the gi[详细]
2023-01-05 04:25 分类:问答Django: how to pass form variable to simple tag in template
I am trying to do some custom things in Django comments form. I have simple tag named \"get_flatpage_by_id\" that returns flatpage model data as array. This is working I expected:[详细]
2023-01-03 13:28 分类:问答Django Thread-Safety for templatetags
I am coming here, because 开发者_C百科I have a question about Django and Thread. I read the documentation http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#template-tag-thread-safety an[详细]
2023-01-01 12:48 分类:问答Import Error when use templatetags in Django
Well, when I\'m trying to use \'inclusion\' in Django, I met some confused problems that I can\'t solve it by myself.[详细]
2022-12-29 00:13 分类:问答