Template Variables

2020-03-31 Thread aetar
I am writing a simple web app, and I am struggling to access my variable attributes in one of my templates. The get_object_or_404 method returns my customized 404 error from my *content_detail.html *file: "No content is available." Here are my files: *archive/archive/urls.py:* from

Re: Template variables not showing up in web-page

2015-10-24 Thread CTA2052
reviewed the online doc sevral times now and various books > and tutorials trying to find the answer. > > However, I can't seem to get my template variables to render within the > web page (crazy I know). > > I've tried this many different ways and finally backed-up and >

Re: Template variables not showing up in web-page

2015-10-23 Thread Dheerendra Rathor
the online doc sevral times now and various books > and tutorials trying to find the answer. > > However, I can't seem to get my template variables to render within the > web page (crazy I know). > > I've tried this many different ways and finally backed-up and > stripped-down

Template variables not showing up in web-page

2015-10-23 Thread CTA2052
programming in general. I have reviewed the online doc sevral times now and various books and tutorials trying to find the answer. However, I can't seem to get my template variables to render within the web page (crazy I know). I've tried this many different ways and finally backed-up and stripped

Re: Should I use 'locals()' or create a dictionary with the template variables? What is better?

2014-07-17 Thread Russell Keith-Magee
On Fri, Jul 18, 2014 at 4:45 AM, Neto wrote: > Using 'locals ()' would slow page loading? What is better? > Using locals() as template context might give you a *slight* slowdown in template rendering (since you'll have lots of context variables that you won't be

Should I use 'locals()' or create a dictionary with the template variables? What is better?

2014-07-17 Thread Neto
Using 'locals ()' would slow page loading? What is better? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to

Re: Template variables in translation blocks

2013-08-26 Thread Some Developer
On 24/08/13 14:56, Ariel Calzada wrote: you have to append strings first http://stackoverflow.com/questions/4386168/how-to-concatenate-strings-in-django-templates and then call trans 2013/8/24 Some Developer > I have a title

Re: Template variables in translation blocks

2013-08-24 Thread Some Developer
On 24/08/13 14:56, Ariel Calzada wrote: you have to append strings first http://stackoverflow.com/questions/4386168/how-to-concatenate-strings-in-django-templates and then call trans 2013/8/24 Some Developer > I have a title

Re: Template variables in translation blocks

2013-08-24 Thread Ariel Calzada
you have to append strings first http://stackoverflow.com/questions/4386168/how-to-concatenate-strings-in-django-templates and then call trans 2013/8/24 Some Developer > I have a title and a header block which normally contain static text but > for some pages I

Template variables in translation blocks

2013-08-24 Thread Some Developer
I have a title and a header block which normally contain static text but for some pages I need to display some dynamic information contained in a template variable. So I might have the template variable: {{ app.name }} and the block code: {% block title %} {% trans "{{ app.name }}

Re: Passing template variables within static template

2012-10-05 Thread Zoran Hranj
Doh! Thank you, sir! On Thursday, October 4, 2012 5:17:59 PM UTC+2, Laxmikant Gurnalkar wrote: > > Try, > > cheers > L > On Thu, Oct 4, 2012 at 8:27 PM, Zoran Hranj > wrote: > >> Hi guys, >> >> basicly I want to do the following: >> >> >> >> But the "{{ item.url }}" part

Passing template variables within static template

2012-10-04 Thread Zoran Hranj
Hi guys, basicly I want to do the following: But the "{{ item.url }}" part does not get evaluated. I understand why it is not evaualted, but I want to know if there is a filter or something to make it work like I want to (quick glance on the filter list didnt give me any ideas). -- You

Re: Parse a javascript file having django template variables

2011-11-25 Thread IanKRolfe
Or you can render the js file as if it was a template. Put the javascript in a template directory. In the main HTML, change the tag to something like

Re: Parse a javascript file having django template variables

2011-11-25 Thread Alessandro Candini
On 11/25/2011 03:06 PM, Tom Evans wrote: On Fri, Nov 25, 2011 at 11:25 AM, Alessandro Candini wrote: Hi everybody. I have an application with the following structure: STO ├── __init__.py ├── jsonopenlayers │ ├── __init__.py │ ├── models.py │ ├── static │ │ ├── css │ │ │ └──

Re: Parse a javascript file having django template variables

2011-11-25 Thread Tom Evans
On Fri, Nov 25, 2011 at 11:25 AM, Alessandro Candini wrote: > Hi everybody. > > I have an application with the following structure: > > STO > ├── __init__.py > ├── jsonopenlayers > │ ├── __init__.py > │ ├── models.py > │ ├── static > │ │ ├── css > │ │ │ └── STO.css > │ │ └── js >

Parse a javascript file having django template variables

2011-11-25 Thread Alessandro Candini
Hi everybody. I have an application with the following structure: STO ├── __init__.py ├── jsonopenlayers │ ├── __init__.py │ ├── models.py │ ├── static │ │ ├── css │ │ │ └── STO.css │ │ └── js │ │ └── renderMaps.js │ ├── tests.py │ └── views.py ├── manage.py ├── settings.py ├── templates │ └──

FormPreview and template variables

2011-10-27 Thread NewsNerd
I'm a Django noob and fear the answer to my question is fairly obvious, but hoping someone can help. I'm building an app that includes the same form on every page, with the content surrounding the form and the model instance to which the form data is tied dependent on a value passed in the

Re: Parse template variables in custom tag

2011-03-22 Thread Turner
col...@gmail.com> wrote: > On Mar 20, 11:15 pm, Daniel Roseman <dan...@roseman.org.uk> wrote: > > > On Sunday, March 20, 2011 9:57:04 PM UTC, Turner wrote: > > > > I'm working on a custom tag to which I would like to be able to pass > > > template variables and f

Re: Parse template variables in custom tag

2011-03-21 Thread Turner
On Mar 20, 11:15 pm, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Sunday, March 20, 2011 9:57:04 PM UTC, Turner wrote: > > > I'm working on a custom tag to which I would like to be able to pass > > template variables and filters. I found > > Variable(value).

Re: Parse template variables in custom tag

2011-03-20 Thread Daniel Roseman
On Sunday, March 20, 2011 9:57:04 PM UTC, Turner wrote: > > I'm working on a custom tag to which I would like to be able to pass > template variables and filters. I found > Variable(value).resolve(context) in the Django source. I > have a couple of questions: > > Y

Parse template variables in custom tag

2011-03-20 Thread Turner
I'm working on a custom tag to which I would like to be able to pass template variables and filters. I found Variable(value).resolve(context) in the Django source. I have a couple of questions: 1) Is it safe to use Variable()? That is, is it part of the public API? Not having visibility modifiers

model instances, schema and template variables

2010-07-12 Thread Alex
Hi, Just want to know if this is the correct understanding of how model instances are passed to templates. If I load a model instance object into a template - is it the case that I also implicitly load in any instance objects it is related through foreign key fields? It seems that these, and in

Re: django template variables

2010-07-11 Thread Syed Ali Saim
:) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group

Re: django template variables

2010-07-10 Thread commonzenpython
alright, thanks a lot Syed :P -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more

Re: django template variables

2010-07-10 Thread Syed Ali Saim
dude I missed 1 important import. first add this, - from django.template import RequestContext also makesure your template path is set in settings.py mine looks something like this TEMPLATE_DIRS = ( # Put strings here, like

Re: django template variables

2010-07-10 Thread commonzenpython
thanks, unfortunately i keep getting a 404, the templates name is 2col.html, its inside ash/templates, the url i have is (r'^paragraph/ $', 'show_para'), and the views is from django.http import HttpResponse from django.shortcuts import render_to_response def show_para(request): para = "I

Re: django template variables

2010-07-10 Thread Syed Ali Saim
you can use django render_to_response which by far the most common and preferred way, i found as newbie my self. here is an example: (roughly but will give you an idea) --- Now following this is an extremly crude tut by myself, for a superb one

django template variables

2010-07-10 Thread commonzenpython
hey guys, im trying to create a template that uses variables like {{ paragraph }} , but i cannot find how to get django to render the paragraph into the variable, i know i have to create a .py file that uses django's render class to render the paragraph but how can i connect the html file to the

Re: Changing template variables

2010-03-05 Thread Kevin Renskers
For those interested: In my base template I've added this: {% load custom_tags %} {% if form %} {% formerrors request form %} {% endif %} In my custom_tags template tags library: @register.simple_tag def formerrors(request, form): for field, errors in form.errors.items(): for

Re: Changing template variables

2010-03-04 Thread Kevin Renskers
I'll explain a bit more what precisely it is what I want to do: Django 1.2 comes with a new messages framework that allows for each message to have a different "level" (succes, error, warning, etc). I want to see if a form has errors, and if so, make a message for each error so all my notices and

Re: Changing template variables

2010-03-04 Thread Bill Freeman
Write your new view so that it can be used generically. On Thu, Mar 4, 2010 at 10:22 AM, Kevin Renskers <i...@bolhoed.net> wrote: > Well yes, but I do not want to change all of my views. I want a > generic solution to change template variables before they get > rendered. > >

Re: Changing template variables

2010-03-04 Thread Kevin Renskers
Well yes, but I do not want to change all of my views. I want a generic solution to change template variables before they get rendered. On Mar 4, 4:14 pm, Bill Freeman <ke1g...@gmail.com> wrote: > Write your own view instead of using direct_to_template. > > > > On Thu, Ma

Re: Changing template variables

2010-03-04 Thread Bill Freeman
Write your own view instead of using direct_to_template. On Thu, Mar 4, 2010 at 10:06 AM, Kevin Renskers <i...@bolhoed.net> wrote: > Hi, > > I am wondering if it is possible to change template variables before > they get rendered in a template. > > For example, I use s

Changing template variables

2010-03-04 Thread Kevin Renskers
Hi, I am wondering if it is possible to change template variables before they get rendered in a template. For example, I use something like this in my template: return direct_to_template(request, template='index.html', extra_context={'form':form}) I would like to extend this form variable

Re: Template variables and tags confusion... (regarding concatenation)

2009-11-21 Thread chefsmart
Exactly. Thanks. On Nov 21, 4:45 pm, Tim Chase wrote: > > When I do in a template I get > id="item_1"> in the rendered html as expected. > > > Now I want to do {% cycle '' ' > class="odd" id="item_{{ product.id }}">' %}, but the desired > > concatenation does

Re: Template variables and tags confusion... (regarding concatenation)

2009-11-21 Thread Tim Chase
> When I do in a template I get id="item_1"> in the rendered html as expected. > > Now I want to do {% cycle '' ' class="odd" id="item_{{ product.id }}">' %}, but the desired > concatenation does not happen. > > How do I achieve what I want? sounds like you want something like -tim

Template variables and tags confusion... (regarding concatenation)

2009-11-21 Thread chefsmart
Hi, When I do in a template I get in the rendered html as expected. Now I want to do {% cycle '' '' %}, but the desired concatenation does not happen. How do I achieve what I want? Regards. -- You received this message because you are subscribed to the Google Groups "Django users" group.

Why can't template variables be used as filters?

2009-06-26 Thread ssadler
This is a general question. I think it would be useful to be able to use template variables as filters. Consider the following: I need to display dates according to a user's timezone. My options are to create these translated dates in the view code (assign them to model instances or create a new

Re: jquery ajax form problem--Can't render template variables

2009-06-10 Thread Malcolm MacKinnon
Thanks Alex. I'll give it a try. I appreciate your comments. On Wed, Jun 10, 2009 at 5:49 AM, Alex Robbins wrote: > > I haven't used that form plugin before, but from the documentation it > looks like the problem is this line: > target:"#new", >

Re: jquery ajax form problem--Can't render template variables

2009-06-10 Thread Alex Robbins
I haven't used that form plugin before, but from the documentation it looks like the problem is this line: target:"#new", http://malsup.com/jquery/form/#options-object You are asking jQuery to jam the whole response in, just like you are seeing. What happens if you take that line out? It looks

jquery ajax form problem--Can't render template variables

2009-06-09 Thread Mac
I'm new to programming and can't figure out how to properly render the {{comment}} and {{username}} variables in the element below using jquery and the ajax form plugin. Everything posts to the database just as it should. However, I want to show what gets posted in the template after submission.

Re: "-" in template variables

2009-05-10 Thread Danne
e tried > > stuff like: post["regular-title"], post[regular-title], post.regular- > > title and so on, and searched around the docs and mailing lists, but > > haven't found any answers. > > > Is there a way to print template variables with "-" in thei

Re: "-" in template variables

2009-05-10 Thread Daniel Roseman
e printing this in the django > templates since regular-title is an invalid variable name. I've tried > stuff like: post["regular-title"], post[regular-title], post.regular- > title and so on, and searched around the docs and mailing lists, but > haven't found any answers. &g

Re: "-" in template variables

2009-05-10 Thread Dougal Matthews
"asdf" .}. I'm having trouble printing this in the django > templates since regular-title is an invalid variable name. I've tried > stuff like: post["regular-title"], post[regular-title], post.regular- > title and so on, and searched around the docs and mail

"-" in template variables

2009-05-09 Thread Danne
riable name. I've tried stuff like: post["regular-title"], post[regular-title], post.regular- title and so on, and searched around the docs and mailing lists, but haven't found any answers. Is there a way to print template variables with "-" in their names? --~--~-~--~~---

Re: Template Variables as Indexes

2009-04-24 Thread Doug B
Might not be the easiest way, but you could use a custom filter: def formsbyfield(forms,field): """ Given a list of similar forms, and a field name, return a list of formfields, one from each form. """ return [form.fields.get(field,'') for form in forms]

Template Variables as Indexes

2009-04-24 Thread NewSpire
I have a list of forms, all of the same type, where I would like to list each form side by side with the fields listed vertically. The root of the problem is that I need to use a template variable as an index on another template variable. Something like this. {% for field in forms.0 %}

Template variables in forms

2008-10-19 Thread Martin
Hello, i'm trying to use formwizard for my project, but i can't seem to solve the problem. I have two step formwizard, and i need a variable from first step to show up in the next. Second step is a queryset of "available texts" - and there is a "name" ( lets say {{ name }}) variable in it, that

Re: i18n problem: Some template variables "get stuck" in one language

2008-01-11 Thread Emil
I think I got it! Wrong ordering of middleware - I had the i18n-urls middleware before some other stuff, which screwed up a lot... It's working now, and my hair will probably grow back eventually... //emil On Jan 11, 12:41 pm, Emil <[EMAIL PROTECTED]> wrote: > Nope, that doesn't seem to be it -

Re: i18n problem: Some template variables "get stuck" in one language

2008-01-11 Thread Emil
Nope, that doesn't seem to be it - same problem with dummy caching on dev server. More likely the culprit is the Advanced Locale From URL Middleware I'm using[1]. I inspected the response headers I get, and even if the language is set to English on the site, response headers always show

Re: i18n problem: Some template variables "get stuck" in one language

2008-01-11 Thread Emil
Hi Peter, thanks for the tip, I'm reading up on the vary_on_headers-decorator right now, I'm gonna see if that clears things up. Just seems weird from my reasoning, and another project I'm working on doesn't have this problem, with nearly excactly the same setup. Oh well, I'll poke around and

Re: i18n problem: Some template variables "get stuck" in one language

2008-01-10 Thread Peter Rowell
Emil: > Except that on a couple of pages, > the language seems to get stuck on the translated language after the > first time I change languages. This smells very much like a caching issue. Do you have any form of caching enabled? If so, turn it off and see if the problem is magically fixed.

i18n problem: Some template variables "get stuck" in one language

2008-01-10 Thread Emil
Hi folks, I have a rather peculiar problem. I created translations for my project, and mostly they work fine. Except that on a couple of pages, the language seems to get stuck on the translated language after the first time I change languages. Example: I visist the site. It's in english (which

Re: template variables

2007-10-26 Thread fisher
On Oct 13, 8:09 am, Goon <[EMAIL PROTECTED]> wrote: > can you use variables in django's templates? > > so like {% for x in y %} > > and then something like > > {% int x =3; x++ %} Recently I found some handy django snippet which can be usefull for you. http://www.djangosnippets.org/snippets/9/

Re: template variables

2007-10-13 Thread SmileyChris
On Oct 13, 8:35 pm, "Nikola Stjelja" <[EMAIL PROTECTED]> wrote: > On 10/13/07, Goon <[EMAIL PROTECTED]> wrote: > > fair enough, I'm not happy that I can't get {{for x in y[1:5]}} > > What's the problem. You just send the template 'y':range(1,6). It's very > simple. I don't think the template

Re: template variables

2007-10-13 Thread Jeff Forcier
On Oct 13, 3:41 am, Goon <[EMAIL PROTECTED]> wrote: > Ok, but let's say I have a template like {{for x in y}}, and I would > like the x's seperated by commas, but I don't want a comma after the > last one? or better yet cut off after the first 100 characters with a > "..." The key here is that

Re: template variables

2007-10-13 Thread Nikola Stjelja
On 10/13/07, beck917 <[EMAIL PROTECTED]> wrote: > > Maybe use the custom template filters is a nice way~ > > http://www.djangoproject.com/documentation/templates_python/#writing-custom-template-filters > Yep. The point is: less programming in html, the better. That's the reason most experienced

Re: template variables

2007-10-13 Thread beck917
Maybe use the custom template filters is a nice way~ http://www.djangoproject.com/documentation/templates_python/#writing-custom-template-filters 2007/10/13, Nikola Stjelja <[EMAIL PROTECTED]>: > > > > On 10/13/07, James Bennett <[EMAIL PROTECTED]> wrote: > > > > > > On 10/13/07, Goon <[EMAIL

Re: template variables

2007-10-13 Thread Goon
On Oct 13, 3:26 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 10/13/07, Goon <[EMAIL PROTECTED]> wrote: > > > fair enough, I'm not happy that I can't get {{for x in y[1:5]}} > > Perhaps the documentation will make you happy: Ok, but let's say I have a template like {{for x in y}}, and I

Re: template variables

2007-10-13 Thread Nikola Stjelja
On 10/13/07, James Bennett <[EMAIL PROTECTED]> wrote: > > > On 10/13/07, Goon <[EMAIL PROTECTED]> wrote: > > fair enough, I'm not happy that I can't get {{for x in y[1:5]}} What's the problem. You just send the template 'y':range(1,6). It's very simple. I don't think the template system should

Re: template variables

2007-10-13 Thread James Bennett
On 10/13/07, Goon <[EMAIL PROTECTED]> wrote: > fair enough, I'm not happy that I can't get {{for x in y[1:5]}} Perhaps the documentation will make you happy: http://www.djangoproject.com/documentation/templates/#slice -- "Bureaucrat Conrad, you are technically correct -- the best kind of

Re: template variables

2007-10-13 Thread Goon
fair enough, I'm not happy that I can't get {{for x in y[1:5]}} dammit! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To

Re: template variables

2007-10-13 Thread James Bennett
On 10/13/07, Goon <[EMAIL PROTECTED]> wrote: > can you use variables in django's templates? Yes. > and then something like > {% int x =3; x++ %} No. Django's template language is not Python or any other programming language. Its sole purpose is presentational logic. -- "Bureaucrat Conrad,

Re: template variables

2007-10-13 Thread Ramdas S
Simple answer is no. But you can may be try porting mako to to django On 10/13/07, Goon <[EMAIL PROTECTED]> wrote: > > > can you use variables in django's templates? > > so like {% for x in y %} > > and then something like > > {% int x =3; x++ %} > > or something like that, would be mighty

template variables

2007-10-13 Thread Goon
can you use variables in django's templates? so like {% for x in y %} and then something like {% int x =3; x++ %} or something like that, would be mighty helpful --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: How do I echo template variables?

2007-07-30 Thread Pensee
On Jul 30, 7:42 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > try to pprint the variables you pass the template directly in the view fonction they will appear in the console if you use the django dev server :) --~--~-~--~~~---~--~~ You received

Re: How do I echo template variables?

2007-07-30 Thread Pensee
Welcome ! On Jul 30, 2:01 pm, "Peter Melvyn" <[EMAIL PROTECTED]> wrote: > On 7/30/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > > Try {% debug %} > > If you mentioned this feature: is there an easy way to reformat {% > debug %} output the same/similiar way an exception error is

Re: How do I echo template variables?

2007-07-30 Thread Russell Keith-Magee
On 7/30/07, Peter Melvyn <[EMAIL PROTECTED]> wrote: > > On 7/30/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > > Try {% debug %} > > If you mentioned this feature: is there an easy way to reformat {% > debug %} output the same/similiar way an exception error is reported? Not easily. {%

Re: How do I echo template variables?

2007-07-30 Thread Peter Melvyn
On 7/30/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > Try {% debug %} If you mentioned this feature: is there an easy way to reformat {% debug %} output the same/similiar way an exception error is reported? Peter --~--~-~--~~~---~--~~ You received this

Re: How do I echo template variables?

2007-07-30 Thread Chris Hoeppner
Russell Keith-Magee escribió: > On 7/30/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > >> I didn't know of that function. Nice to know. But, is there a var where >> to access *all* the vars available in the template and it's contents? >> I've been needing that one for debugging for ever! >>

Re: How do I echo template variables?

2007-07-30 Thread Russell Keith-Magee
On 7/30/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > > I didn't know of that function. Nice to know. But, is there a var where > to access *all* the vars available in the template and it's contents? > I've been needing that one for debugging for ever! Try {% debug %}

Re: How do I echo template variables?

2007-07-30 Thread Chris Hoeppner
Nathan Ostgard escribió: > Try: {{ data|pprint }} > > On Jul 29, 10:42 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >> I'm coming from CakePHP and I would typically set a variable for use >> in my view with a call to findAll. Since there is a lot of data in the >> array, I typically do

Re: How do I echo template variables?

2007-07-30 Thread Nathan Ostgard
Try: {{ data|pprint }} On Jul 29, 10:42 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm coming from CakePHP and I would typically set a variable for use > in my view with a call to findAll. Since there is a lot of data in the > array, I typically do something like: > > > > > > This

How do I echo template variables?

2007-07-29 Thread [EMAIL PROTECTED]
I'm coming from CakePHP and I would typically set a variable for use in my view with a call to findAll. Since there is a lot of data in the array, I typically do something like: This way, I can find out what data is available in the view and figure out how much I can scale back the

Dynamically generated template variables in admin?

2007-03-20 Thread David Zhou
want to manage my templates in the admin view, and have the ability to define custom variables to be filled out. Then, in say, the "Instance" admin add page, the user is able to select a template. The page will then dymaically generate a table of the template variables that need to

Re: Template variables

2006-06-20 Thread Wilson Miner
Hi Patrick, You might find some helpful responses in this thread: http://groups.google.com/group/django-users/browse_frm/thread/50ee1c147854769/a79890af3059229d?q=menu=3#a79890af3059229d On 6/20/06, Patrick <[EMAIL PROTECTED]> wrote: > > Hi i'm newbie and i want to publish my Django website. >

Re: template variables and looping with attributes

2006-01-22 Thread akaihola
You could define a filter "lookup": from django.core.template import resolve_variable, Library register = Library() def lookup(value, arg): return resolve_variable(arg, value) register.filter(lookup) and use it in your code like this: {%for r in object_list %} {%for c in

Re: Passing template tags template variables

2006-01-14 Thread Alice
excellent - thanks. (it is very easy) ... Alice

Re: Passing template tags template variables

2006-01-14 Thread Luke Plant
On Sat, 14 Jan 2006 16:12:50 - Alice wrote: > I just finished writing the tag and realized that it won't work unless > I can access the data passed to the template. Any help in getting > around this (probably simple) problem would be welcome. The 'render' method of custom tag gets passed

Re: Passing template tags template variables

2006-01-14 Thread Maniac
Alice wrote: Is there a means to pass a template variable {{ user_id }} to a custom template tag, {% build_menu "user_id" %} ? In fact you can treat anything after your tag name as you like, it's just a string. But for such natural thing as treating it as a variable Django will help. For

Passing template tags template variables

2006-01-14 Thread Alice
Is there a means to pass a template variable {{ user_id }} to a custom template tag, {% build_menu "user_id" %} ? I just finished writing the tag and realized that it won't work unless I can access the data passed to the template. Any help in getting around this (probably simple) problem would