Re: django template language + greater than? does it exist?

2009-01-13 Thread Mengsong Chen
FYI, http://www.djangosnippets.org/snippets/12/ On Tue, Jan 13, 2009 at 11:03 AM, Matías Costa wrote: > > Fast answer: No > > Better awswer: No, but you can get one on djangosnippets.org > > On Mon, Jan 12, 2009 at 2:44 PM, rabbi wrote: > > > > is there a greater than method in the template lan

Re: django template language + greater than? does it exist?

2009-01-13 Thread Matías Costa
Fast answer: No Better awswer: No, but you can get one on djangosnippets.org On Mon, Jan 12, 2009 at 2:44 PM, rabbi wrote: > > is there a greater than method in the template language? > > > --~--~-~--~~~---~--~~ You received this message because you are subscrib

django template language + greater than? does it exist?

2009-01-12 Thread rabbi
is there a greater than method in the template language? --~--~-~--~~~---~--~~ 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 unsubscribe from thi

Re: django template script variable usage and declaration

2008-12-14 Thread bruno desthuilliers
On 14 déc, 18:06, "Haroon idrees" wrote: > after follow the documentation i face the following error > File "C:\Program > Files\Google\google_appengine\lib\django\django\template\__init__.py", > line 273, in parse > compiled_result = compile_func(self,

Re: django template script variable usage and declaration

2008-12-14 Thread Haroon idrees
after follow the documentation i face the following error File "C:\Program Files\Google\google_appengine\lib\django\django\template\__init__.py", line 273, in parse compiled_result = compile_func(self, token) File "C:\Program Files\Google\google_appengine\lib\django\

Re: django template script variable usage and declaration

2008-12-14 Thread bruno desthuilliers
On 14 déc, 10:53, "Haroon idrees" wrote: > I try cycle tage but it also give some error can please tell me what > is write Syntax of cycle tag It's in the documentation. Just follow the link I gave in my previous post. --~--~-~--~~~---~--~~ You received this me

Re: django template script variable usage and declaration

2008-12-14 Thread Haroon idrees
I try cycle tage but it also give some error can please tell me what is write Syntax of cycle tag On Fri, Dec 12, 2008 at 4:36 AM, bruno desthuilliers wrote: > > On 12 déc, 11:57, Daniel Roseman > wrote: >> On Dec 12, 7:04 am, "Haroon idrees" wrote: >> >> >> >> > Hello >> > I am new to p

Re: django template script variable usage and declaration

2008-12-12 Thread bruno desthuilliers
On 12 déc, 11:57, Daniel Roseman wrote: > On Dec 12, 7:04 am, "Haroon idrees" wrote: > > > > > Hello > > I am new to python world . any one can help to guide how we > > declare variables in python template script and use in if else block > > and vary it > > > for example > > //need to decla

Re: django template script variable usage and declaration

2008-12-12 Thread Daniel Roseman
On Dec 12, 7:04 am, "Haroon idrees" wrote: > Hello >      I am new to python world . any one can help to guide how we > declare variables in python template script and use in if else block > and vary it > > for example > //need to declare variable here > //for example x=0 > {% for message in mess

django template script variable usage and declaration

2008-12-12 Thread Haroon idrees
Hello I am new to python world . any one can help to guide how we declare variables in python template script and use in if else block and vary it for example //need to declare variable here //for example x=0 {% for message in message %} //need to put if condition here //ifequal x 0 //x=1 /

Re: Django template tag question

2008-11-20 Thread goblue0311
yeah, it was definitley the __init__.py issue, which I will strive to never forget again. Thanks! On Nov 19, 3:52 pm, Ben Eliott <[EMAIL PROTECTED]> wrote: > what happens when you go into the python interpreter and write > import basic > > On 19 Nov 2008, at 16:58, goblue0311 wrote: > > > > > I'

Re: Django template tag question

2008-11-19 Thread Ben Eliott
what happens when you go into the python interpreter and write import basic On 19 Nov 2008, at 16:58, goblue0311 wrote: > > I'm implementing the popular basic.blog application, which requires > the inclusion of the basic.inlines project. However, I cannot seem to > get my application to locate t

Re: Django template tag question

2008-11-19 Thread Daniel Roseman
On Nov 19, 4:58 pm, goblue0311 <[EMAIL PROTECTED]> wrote: > I'm implementing the popular basic.blog application, which requires > the inclusion of the basic.inlines project. However, I cannot seem to > get my application to locate the basic.inlines project. I have asked > this question in the basi

Django template tag question

2008-11-19 Thread goblue0311
I'm implementing the popular basic.blog application, which requires the inclusion of the basic.inlines project. However, I cannot seem to get my application to locate the basic.inlines project. I have asked this question in the basic.apps group, but I think it's generic enough to be posted here as

Re: how to print a data structure in django template

2008-11-14 Thread Steve Holden
mahesh_aka_amol wrote: > I have a a family tree; as describd below > son={'first':'Swami', 'last':'Vaidya'} family={'f':father, 's':son} family > {'s': {'last': 'Vaidya', 'first': 'Swami'}, 'f': {'last': 'Vaidya', > 'first': 'Mahesh'}} > > I would like to render this in template.;

how to print a data structure in django template

2008-11-14 Thread mahesh_aka_amol
I have a a family tree; as describd below >>> son={'first':'Swami', 'last':'Vaidya'} >>> family={'f':father, 's':son} >>> family {'s': {'last': 'Vaidya', 'first': 'Swami'}, 'f': {'last': 'Vaidya', 'first': 'Mahesh'}} I would like to render this in template.; What I can think of is {% for key in

Re: Dictionary Issue in Django Template (Beginner)

2008-09-24 Thread rskm1
> {% for machine in web %} >   {% for status_message in  status.machine %} > ... > So, i want to be able to do something like status.machine.. If there's a BETTER way, I'd love to hear it too, but this is usually accomplished with a custom filter. It's commonly named "getattr", and your template

Dictionary Issue in Django Template (Beginner)

2008-09-22 Thread [EMAIL PROTECTED]
Hi, The following are a few lines from my Django template which i cannot get to work.. {% for machine in web %} {% for status_message in status.machine %} {{status_message}} {% endfor %} {% endfor %} web [list()] - is a list of machines.. status [dict()] - is a dictionary of lists

Re: problem with passing dict object to django template

2008-09-02 Thread Matt Berg
Bruno and David, Thanks. I greatly appreciate the help. You're right. I should include this in the model and have it handled by a class. Right now I'm just focused on figuring out the mechanics of django. Again, thank you very much for taking the time to explain this. Matt On Sep 2, 3:06 pm,

Syntax highlight for django template

2008-09-02 Thread coldhitman47
I love gedit and currently using gedit 2.22.3 that comes with really good python syntax highlight and python console. I'm wondering if there's django syntax highlight plugin that I can install. --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: problem with passing dict object to django template

2008-09-02 Thread bruno desthuilliers
On 2 sep, 20:22, Matt Berg <[EMAIL PROTECTED]> wrote: > Sorry. > > Yes, in the template I do a loop... > > for crop in crops Where do "crops" come from ? In your above code, you only returned the ci dict, no t crops. > In the view, I make an array ci (cropinfo). It's actually a dict, not an arr

Re: problem with passing dict object to django template

2008-09-02 Thread bruno desthuilliers
On 2 sep, 19:34, Matt Berg <[EMAIL PROTECTED]> wrote: > Still new to django and python and have been struggling with the > following. > > Basically, I want to pass the following dict object to a django > template. > > def crop_info(season,crops): > ci = {} >

Re: problem with passing dict object to django template

2008-09-02 Thread Matt Berg
Sorry. Yes, in the template I do a loop... for crop in crops In the view, I make an array ci (cropinfo). Each ci I append a new dict object (cd) which is associated with the crop id. In the template, I just want to loop through the crops and then display items in the embedded dict that are ti

Re: problem with passing dict object to django template

2008-09-02 Thread David Zhou
On Sep 2, 2008, at 1:34 PM, Matt Berg wrote: > In my template, I want to be able to iterate through the crops with > info like this: > > {{ ci.[crop.id].total }} Are you using this within another loop? Where's crop.id coming from? --- David Zhou [EMAIL PROTECTED] --~--~-~--~---

problem with passing dict object to django template

2008-09-02 Thread Matt Berg
Still new to django and python and have been struggling with the following. Basically, I want to pass the following dict object to a django template. def crop_info(season,crops): ci = {} cd = {} dap_kg_dollar = 0 urea_kg_dollar = 0 seed_local_dollar = 0

Re: django template rendering

2008-06-25 Thread Matthias Kestenholz
On Tue, 2008-06-24 at 22:10 -0700, Djangofan wrote: > When rendering a django template on an HTML page, I can use: > > Field Name: "myFieldName" > Value: {{ row.myFieldName }} > > and it works just fine. However, I can't find a way to make it work > with a

Re: django template rendering

2008-06-24 Thread Alessandro Ronchi
2008/6/25, Djangofan <[EMAIL PROTECTED]>: > > When rendering a django template on an HTML page, I can use: > > Field Name: "myFieldName" > Value: {{ row.myFieldName }} > > and it works just fine. However, I can't find a way to make it work >

django template rendering

2008-06-24 Thread Djangofan
When rendering a django template on an HTML page, I can use: Field Name: "myFieldName" Value: {{ row.myFieldName }} and it works just fine. However, I can't find a way to make it work with a dynamic variable for the field name: Field Name: "{{ x }}" <==

Re: little problem with the django template language

2008-06-20 Thread Daniel Roseman
On Jun 20, 8:50 am, mark <[EMAIL PROTECTED]> wrote: > I guess it was a little confusing how I formulated my problem. I just > try again. Sorry for that. > > In Python what I want to do would look like the following: > > item1 = '/test/something/' > item2 = '/test/somethingelse/' > > if i

Re: little problem with the django template language

2008-06-20 Thread mark
I guess it was a little confusing how I formulated my problem. I just try again. Sorry for that. In Python what I want to do would look like the following: item1 = '/test/something/' item2 = '/test/somethingelse/' if item2.startswith(item1): do_the_trick() Now since Django has thi

Re: little problem with the django template language

2008-06-19 Thread phillc
yes they are strings, yes in python if you do if item1: pass it will evaluate the string as a true/false depending on existance. however, comparing two strings for equality... checks if they are equal. {% if item1 %} {% if item2 %} blah {% endif %} {% endif %} On Jun 19, 1:50 pm, mark <[

Re: little problem with the django template language

2008-06-19 Thread roj
Hi, If you are trying to compare url string then use request.path which will give you URL and split by "/" is that work for you? Cheers! Roj Django Debugging Resource http://django.freelancernepal.com On Jun 19, 6:50 pm, mark <[EMAIL PROTECTED]> wrote: > Hi, > > I am stuck, please help. > > T

little problem with the django template language

2008-06-19 Thread mark
Hi, I am stuck, please help. This is what I am trying to do: {% ifequal item1 item2 %} ...do what I want item1 = '/test/something/' item2 = '/test/somethingelse/' or item1 = '/test/' tem2 = '/test/simething' both should evaluate to true and execute the if block. I experimented with 'it

Re: how to sort in django template

2008-06-18 Thread Austin Govella
On Jun 18, 2:53 am, laspal <[EMAIL PROTECTED]> wrote: > I have a list of employee and i want to sort it. > > Employee( this is my header) > under which i have list of employee. > > So now my question is on clicking employee header I want to change the > list. > Like it happens for user in dja

Re: how to sort in django template

2008-06-18 Thread Florencio Cano
I don't understand what exactly are you trying to do but I think the dictsort filter could help. On 18 jun, 09:53, laspal <[EMAIL PROTECTED]> wrote: > I have a list of employee and i want to sort it. --~--~-~--~~~---~--~~ You received this message because you are

Re: how to sort in django template

2008-06-18 Thread yml
Hello, I would see 2 approach to solve the problem you are describing : * Server side - Order the list of employees in your view before passing it to the template * Client side - use a JS to order a Javascript variable I hope this will help you. --yml On 18 juin, 09:53, laspal <[EMAIL PROTECT

how to sort in django template

2008-06-18 Thread laspal
hi, I have a list of employee and i want to sort it. Employee( this is my header) under which i have list of employee. So now my question is on clicking employee header I want to change the list. Like it happens for user in django admin. Please help me out. Thannks. --~--~-~--~---

Re: accessing dictionary elements in opening tag of django template for loop

2008-05-16 Thread John
Thanks, John. Your second suggestion (that I find a way to modify the Document class) put me on the right track. I eventually found this article: http://blog.arbingersys.com/2008/04/google-app-engine-better-many-to-many.html which worked for my problem. On May 14, 7:17 pm, "John Lenton" <[EMAIL

Re: accessing dictionary elements in opening tag of django template for loop

2008-05-14 Thread John Lenton
On Wed, May 14, 2008 at 6:33 PM, John <[EMAIL PROTECTED]> wrote: > > I'm having trouble accessing dictionary elements within a nested for > loop. here are some code snippets: > > [...] > > # so far so good, but then I try to iterate over the documents and > their associated tags in a template > #

Re: accessing dictionary elements in opening tag of django template for loop

2008-05-14 Thread John
Thanks for the response, Norman! Unfortunately, the Google App Engine version of Django doesn't support the 'with' tag (which would otherwise solve my problem). Also, I don't think I can pass in a context var that already has the list I want, because I need a list *per* document. Any suggestions

Re: accessing dictionary elements in opening tag of django template for loop

2008-05-14 Thread Norman Harman
Sorry, I don't know the exact answer but I can point you in right direction. templates always use dot notation for dictionary access tag_dict.document.uid But I don't think that will work inside a "for" tag and also won't work cause you want the document.uid to be key not "document". The wor

accessing dictionary elements in opening tag of django template for loop

2008-05-14 Thread John
Hello Django Users, I'm having trouble accessing dictionary elements within a nested for loop. here are some code snippets: # here is the python code that sets up the page class DocumentPage(webapp.RequestHandler): def get(self): # get a list of documents from google app engine datastore

Re: Django Template for_loop by user

2008-05-05 Thread Karen Tracey
On Mon, May 5, 2008 at 7:50 AM, chiefmoamba <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm trying to get a for loop to display data by user. So for example I > have the following that will display all 'courses' running in my > project: > > {% if course %} >There are Courses >The current course

Django Template for_loop by user

2008-05-05 Thread chiefmoamba
Hi, I'm trying to get a for loop to display data by user. So for example I have the following that will display all 'courses' running in my project: {% if course %} There are Courses The current courses we are running are: {{course|join:", "}} {% else %} There are currently no course

Re: How do I escape a single quote in a Django template?

2008-04-21 Thread Rajesh Dhawan
On Apr 21, 2:29 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > Hi, I'm trying to change the admin template from chapter 6 of > djangobook.com.  How can I change the admin template from: > > {% trans 'Django administration' %} > > to > > {% trans 'Bob's administration' %} > > I can't put the apostrop

Re: How do I escape a single quote in a Django template?

2008-04-21 Thread Kevin Monceaux
jmDesktop, On Mon, 21 Apr 2008, jmDesktop wrote: > {% trans 'Bob's administration' %} One can find examples of using the trans template tag about 1/4 of the way down the Internationalization documentation page: http://www.DjangoProject.com/documentation/i18n/ For the above it looks like: {%

How do I escape a single quote in a Django template?

2008-04-21 Thread jmDesktop
Hi, I'm trying to change the admin template from chapter 6 of djangobook.com. How can I change the admin template from: {% trans 'Django administration' %} to {% trans 'Bob's administration' %} I can't put the apostrophe single quote in there. I tried \' and ', but it did not work. Thank yo

Re: How to reiterate something "n" times in django template?

2008-04-13 Thread fizban
On 13 Apr, 12:01, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: [snip] > But, again, that won't work for this particular draft > spec. Smells like a problem with the spec to me, since it restricts the > options a fair bit and makes for somewhat unreadable names, but so be > it. Yeah, I didn't re

Re: How to reiterate something "n" times in django template?

2008-04-13 Thread Malcolm Tredinnick
On Sun, 2008-04-13 at 01:52 -0700, fizban wrote: > Hi, > > Given that I'm using django-tagging to show a tagcloud, is there any > way to, given "tag.font_size", to make the template print > "tag.font_size" times the letter "v"? > > What I'm trying to accomplish is to make a tagcloud compliant t

How to reiterate something "n" times in django template?

2008-04-13 Thread fizban
Hi, Given that I'm using django-tagging to show a tagcloud, is there any way to, given "tag.font_size", to make the template print "tag.font_size" times the letter "v"? What I'm trying to accomplish is to make a tagcloud compliant to the htagcloud microformat draft.. so: sometag <- tag.font_siz

Re: Problem with Css and django template

2008-01-15 Thread laspal
Ya done. Thanks a lot. On Jan 15, 1:15 pm, shabda <[EMAIL PROTECTED]> wrote: > You need to change this line > type="text/css" href="testing1.css" /> > to > type="text/css" href="/static/testing1.css" /> > > On Jan 15, 1:00 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > > > On Jan 15, 2008 1:08

Re: Problem with Css and django template

2008-01-15 Thread shabda
You need to change this line type="text/css" href="testing1.css" /> to type="text/css" href="/static/testing1.css" /> On Jan 15, 1:00 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Jan 15, 2008 1:08 AM, laspal <[EMAIL PROTECTED]> wrote: > > This: > > > (r'^static/(?P.*)$', 'django.views.

Re: Problem with Css and django template

2008-01-15 Thread laspal
Hi, I am still not able to fix it. Can u please let me know what should my should be depending upon the url. Do I have to make any change in my setting.py file. Thanks. On Jan 15, 1:00 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Jan 15, 2008 1:08 AM, laspal <[EMAIL PROTECTED]> wrote: >

Re: Problem with Css and django template

2008-01-15 Thread James Bennett
On Jan 15, 2008 1:08 AM, laspal <[EMAIL PROTECTED]> wrote: This: > (r'^static/(?P.*)$', 'django.views.static.serve', > {'document_root': '/home/laspal/trytemplate/Template/', > 'show_indexes' : True}), Does not match the URL in this: > type="text/css" href="testing1.css" /> So change one

Problem with Css and django template

2008-01-14 Thread laspal
hi, I am new to django and I am having problem with css and template. I have read the documentation on static file http://www.djangoproject.com/documentation/static_files/ but still having the problem. This is how my url.py file is: from django.conf.urls.defaults import * from trytemplate.views

Re: launching python scripts through django template form

2007-11-15 Thread Kenneth Gonsalves
On 15-Nov-07, at 7:38 PM, Greg_IAP wrote: > With this solution a press button is created and the browser wants to > open the url: ".../spica/cgi-bin/ingestion.py" by pressing it. link: Click to launch script url: r'^ingestion/$' view: def ingestion(request): pythonscripthere ..

Re: launching python scripts through django template form

2007-11-15 Thread Daniel Roseman
On Nov 15, 2:08 pm, Greg_IAP <[EMAIL PROTECTED]> wrote: > Hi > I just want to launch a python script from my web page done with > django. > 2 ways to do this-> by a form included in "mytemplate.html" for > example, like this: > > method="post"> > maxlength="50"> > > > > With this solution a

Re: launching python scripts through django template form

2007-11-15 Thread schlam
I am not sure I understand you question ... you want to launch a python script from a django url ? you can just import the script into urls.py and running from a url. On Nov 15, 12:03 pm, Greg_IAP <[EMAIL PROTECTED]> wrote: > Could anyone answer my question of yesterday? > > my problem is the act

Re: launching python scripts through django template form

2007-11-15 Thread Greg_IAP
Hi I just want to launch a python script from my web page done with django. 2 ways to do this-> by a form included in "mytemplate.html" for example, like this: With this solution a press button is created and the browser wants to open the url: ".../spica/cgi-bin/ingestion.py" by pressing i

Re: launching python scripts through django template form

2007-11-15 Thread Greg_IAP
Hi i just want to launch a python script from my web page done with django: --~--~-~--~~~---~--~~ 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

launching python scripts through django template form

2007-11-15 Thread Greg_IAP
Could anyone answer my question of yesterday? my problem is the action of the form (to launch python script from my web page) which can be matched by urlpattern in urls.py --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: Using Django Template Engine

2007-11-14 Thread Brot
oproject.com/wiki/UsingMarkup > > I need a similar solution, but with the internal django template > > library. Is there any solution for this requirement? > > > I would like to store little html/template chunks in a database and > > use them in a "normal" django t

Re: Using Django Template Engine

2007-11-13 Thread Malcolm Tredinnick
On Mon, 2007-11-12 at 23:04 -0800, Brot wrote: > Hello, > > I found a code example for "Using Markup" in the django wiki: > http://code.djangoproject.com/wiki/UsingMarkup > I need a similar solution, but with the internal django template > library. Is there any s

Using Django Template Engine

2007-11-12 Thread Brot
Hello, I found a code example for "Using Markup" in the django wiki: http://code.djangoproject.com/wiki/UsingMarkup I need a similar solution, but with the internal django template library. Is there any solution for this requirement? I would like to store little html/template c

Re: Django template language

2007-10-08 Thread Jerry
On Oct 6, 3:03 am, Bernd <[EMAIL PROTECTED]> wrote: > But now I want to compare 'image/gif'. A gif works like a jpeg. But I > didn't find a solution to write > > {% ifequal mime 'image/jpeg' or 'image/gif'%} > or > {% if mime in ['image/jpeg', 'image/gif] '%} > > Is there any chance to compare

Re: Django template language

2007-10-06 Thread Chris Hoeppner
Since the formatting is quite standard (eg: you'll be using img tags for images and object tags for pdf's, etc...) you could assign it to a var in the view. This might be a violation of the MVC pattern, but it's not much worse than using the same template instead of separate ones, extending a comm

Django template language

2007-10-06 Thread Bernd
Hello, I'm new to web development and Python. I helped a friend with his website, which is written in PHP. But the source code is so bad, that I decided to rewrite the hole page. So I found the djange webframework.I like it and try to rewrite the page with it. Now I have a litte question. I try t

ANN: A Django template tag for integrating a Flash based flv player

2007-10-04 Thread peschler
I'm happy to announce the release of my Django template tag for integrating a Flash based flv player into Django templates. The application including documentation and sourcecode can be found at: http://pyjax.net/blog/1/2007/09/28/django-template-tag-integrating-flash-based-flv-pl/

Re: can i design django template visually ?

2007-09-12 Thread James Bennett
On 9/12/07, z_axis <[EMAIL PROTECTED]> wrote: > In the past, we use dreamwaver to design HTML visually. What i want to know > is how to design django template visually ? You can quite easily build out your design using placeholder content (e.g., "lorem ipsum"), and then

can i design django template visually ?

2007-09-12 Thread z_axis
In the past, we use dreamwaver to design HTML visually. What i want to know is how to design django template visually ? Any suggestion is appreciated ! -- z_axis 2007-09-13 --~--~-~--~~~---~--~~ You received this

How to do a recursive inclusion forloop in a django template

2007-09-02 Thread Arik Jones
I have a pages model that has a recursive relationship to itself. Lets say I list only pages that are root parents. In my forloop, how do I display with each root parent page all its children, including children of children as well? Your help and input is greatly appreciated. Thank you! --~--~-

Re: Django Template

2007-07-06 Thread dystopia
Hi Doug, Thanks for your reply. I've been trying to get something together to see if I can figure this all out. In the end I came up with something like this (so far): from myproject.shop.models import Product from django import template register = template.Library() def get_latest_products(pa

Re: Django Template

2007-06-29 Thread Doug Van Horn
On Jun 29, 12:59 pm, dystopia <[EMAIL PROTECTED]> wrote: > [snip]... Would I > then have have to implement the functionality of this in every view by > calling an cartSummary method and pushing that out into the template? > Or is it better to somehow compile all this functionality into a > templat

Re: Django Template

2007-06-29 Thread Tim Chase
> What I can't quite grasp with django is, suppose I have a three column > layout for a shopping site and I wanted to show a summary of the > carts contents on MOST of my pages in the third column ... Would I > then have have to implement the functionality of this in every view by > calling an ca

Django Template

2007-06-29 Thread dystopia
Hi, MVC is still a bit alien to me but I'm slowly getting to grips with it. I've previously used languages like PHP in conjunctions with template engines such as Smarty. What I can't quite grasp with django is, suppose I have a three column layout for a shopping site and I wanted to show a summ

Re: quote django template tags for a html textarea...

2007-06-26 Thread Jens Diemer
Jens Diemer schrieb: > I would like to edit templates online. So i used newforms and > .form_for_instance() to build a html form. > The Problem: If there are django template tags in the content, the tag > rendered > by the template engine. But i don't want that. I want

quote django template tags for a html textarea...

2007-06-26 Thread Jens Diemer
I would like to edit templates online. So i used newforms and .form_for_instance() to build a html form. The Problem: If there are django template tags in the content, the tag rendered by the template engine. But i don't want that. I want to edit the tag in a html textarea. Here a smal

Re: Summon specific filter on related object from Django template

2007-05-15 Thread Vertigo
Bureaucrat James Bennett, you are technically correct -- the best kind of correct! :-) Thanks for bringing me this new approach. I like it that way. As for guidelines, I tend to follow them even when I do not grasp the good reason behind. Following guidelines would have avoided my department to l

Re: Summon specific filter on related object from Django template

2007-05-15 Thread James Bennett
On 5/15/07, Vertigo <[EMAIL PROTECTED]> wrote: > I could build a custom method (get_public_documents) on model Project. > But the documentation suggests that model methods are 'row-level' > oriented. And yet the methods which fetch the set of related objects are instance methods, not class-level

Summon specific filter on related object from Django template

2007-05-15 Thread Vertigo
Hi, Here is my problem, summarized by this web page: I would like to display only the public documents of a given project (not the private ones). Class Document has a ForeignKey field on class Project, and a BooleanField (is_public). My condition is: I just pass the Project object to my template

Re: Django Template DropDown List

2007-01-28 Thread johnny
I solved it. Problem was this: category_id = models.ForeignKey(Category) which creates category_id_id in mysql table. In the model, remove _id and it should of been: category = models.ForeignKey(Category) Thank you. On Jan 28, 2:04 pm, "johnny" <[EMAIL PROTECTED]> wrote: > I want the categor

Django Template DropDown List

2007-01-28 Thread johnny
I want the category to show up in drop down list, in product app with product_form.html template. In my product_form.html, I have the following: Category: {{ form.category }} {% if form.category.errors %}*** {{ form.category.errors|join:", " }}{% endif %} In my model for product, I sp

Re: url path in django template

2006-06-14 Thread damacy
thanks for your help, steven =) however, no change in settings.py was needed to make it work. --~--~-~--~~~---~--~~ 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@

Re: url path in django template

2006-06-13 Thread Steven Armstrong
On 06/14/06 05:45, damacy wrote: > hi, there. > > is there any built-in function which retrieves the current url in a > django template? > > for instance, if my current url is > > http://www.lalala.com/hoho?index=0 > > and i'd like to get the exactly

url path in django template

2006-06-13 Thread damacy
hi, there. is there any built-in function which retrieves the current url in a django template? for instance, if my current url is http://www.lalala.com/hoho?index=0 and i'd like to get the exactly same url as above within a template (including hoho?index=0). i can get the current dire

Re: Can Django template use relative path in 'include' tag?

2006-06-01 Thread Ivan Sagalaev
Wei Litao wrote: > I have a template which reside in 'myapp/tmpl1.html'. In this template > I want to 'include' another template which reside in > 'myapp/tmpl2.html'. But I don't want to use the syntax as '{% include > "myapp/tmpl2.html" %}' . Instead, i want simply use something like '{% > i

Re: Can Django template use relative path in 'include' tag?

2006-06-01 Thread Wei Litao
On 6/2/06, James Bennett <[EMAIL PROTECTED]> wrote: On 6/1/06, Wei Litao <[EMAIL PROTECTED]> wrote:> I have a template which reside in 'myapp/tmpl1.html'. In this template I> want to 'include' another template which reside in 'myapp/tmpl2.html'. But I > don't want to use the syntax as '{% include "

Re: Can Django template use relative path in 'include' tag?

2006-06-01 Thread James Bennett
On 6/1/06, Wei Litao <[EMAIL PROTECTED]> wrote: > I have a template which reside in 'myapp/tmpl1.html'. In this template I > want to 'include' another template which reside in 'myapp/tmpl2.html'. But I > don't want to use the syntax as '{% include "myapp/tmpl2.html" %}' . > Instead, i want simply

Can Django template use relative path in 'include' tag?

2006-06-01 Thread Wei Litao
I have a template which reside in 'myapp/tmpl1.html'. In this template I want to 'include' another template which reside in 'myapp/tmpl2.html'. But I don't want to use the syntax as '{% include "myapp/tmpl2.html" %}' . Instead, i want simply use something like '{% include " tmpl2.html" %}' , becaus

Re: How to extend Django template objects?

2006-04-20 Thread Bryan Chow
Hi Adrian, Thanks for the reply, and for the suggestion. I've been working with Ian Clelland, who submitted this patch a few days ago to address the issue: http://code.djangoproject.com/ticket/1650 There is definitely lots of interest over here for this functionality to become part of Django, a

Re: How to extend Django template objects?

2006-04-20 Thread Adrian Holovaty
On 4/14/06, Bryan Chow <[EMAIL PROTECTED]> wrote: > Is there a "correct" way to extend a Django template that doesn't exist > on the filesystem? I couldn't find any mention of this in the > documentation. > > I'm creating template objects programm

How to extend Django template objects?

2006-04-14 Thread Bryan Chow
Is there a "correct" way to extend a Django template that doesn't exist on the filesystem? I couldn't find any mention of this in the documentation. I'm creating template objects programmatically, and I want one of these objects to extend another, just as a templ

Re: Django template language bundle for TextMate

2005-09-29 Thread Wilson
> Indeed, back on 7/29, someone added "Django templates" to the wishlist > for supported bundles: > http://macromates.com/wiki/pmwiki?n=Main.Bundles Yeah, that was me. I got tired of waiting. :)

Re: Django template language bundle for TextMate

2005-09-29 Thread Felix Ingram
Hi all, Anyone looking for something similar to TextMate's snippets but in Vim may want to have a look at this plugin I wrote: http://vim.sourceforge.net/scripts/script.php?script_id=1318 I wrote it after seeing the Rails shortcuts and getting jealous.  I think it'll work a bit better with Djang

Re: Django template language bundle for TextMate

2005-09-29 Thread Jeremy Dunck
On 9/29/05, Wilson <[EMAIL PROTECTED]> wrote: > Everything is extremely basic and naive right now, but if anybody out > there is editing Django templates and using Textmate, feel free to give > it a whirl and let me know what does and doesn't work. Suggestions or > additions are welcome. I'm usin

Django template language bundle for TextMate

2005-09-29 Thread Wilson
I've started a very rudimentary TextMate language bundle for Django templates. It's just a bunch of snippets for tab-completion of the standard template tags and a very basic language definition for syntax coloring. Everything is extremely basic and naive right now, but if anybody out there is ed

<    1   2   3   4   5   6