On 12 nov, 14:56, gontran <[EMAIL PROTECTED]> wrote:
> Could you be more explicite because I don't understand everything and
I thought it was explicit enough. A custom tag is usually made of a
parser function and a rendering node (cf relevant part of django's
documentation), so I gave you a snipp
Ok, thank you all for your help
On 12 nov, 15:19, Steve Holden <[EMAIL PROTECTED]> wrote:
> By all means use your custom tag. Inside the code for the tag, use a
> template to generate the HTML. That's all!
>
> regards
> Steve
>
> gontran wrote:
> > Could you be more explicite because I don't und
Ok, thank you all for your help
On 12 nov, 15:19, Steve Holden <[EMAIL PROTECTED]> wrote:
> By all means use your custom tag. Inside the code for the tag, use a
> template to generate the HTML. That's all!
>
> regards
> Steve
>
> gontran wrote:
> > Could you be more explicite because I don't und
Ok, thank you all for your help
On 12 nov, 15:19, Steve Holden <[EMAIL PROTECTED]> wrote:
> By all means use your custom tag. Inside the code for the tag, use a
> template to generate the HTML. That's all!
>
> regards
> Steve
>
> gontran wrote:
> > Could you be more explicite because I don't und
Ok, thank you all for your help
On 12 nov, 15:19, Steve Holden <[EMAIL PROTECTED]> wrote:
> By all means use your custom tag. Inside the code for the tag, use a
> template to generate the HTML. That's all!
>
> regards
> Steve
>
> gontran wrote:
> > Could you be more explicite because I don't und
By all means use your custom tag. Inside the code for the tag, use a
template to generate the HTML. That's all!
regards
Steve
gontran wrote:
> Could you be more explicite because I don't understand everything and
> why not using my custom tag? (which works fine)
>
> On 12 nov, 14:43, bruno dest
Could you be more explicite because I don't understand everything and
why not using my custom tag? (which works fine)
On 12 nov, 14:43, bruno desthuilliers <[EMAIL PROTECTED]>
wrote:
> On 12 nov, 14:25, gontran <[EMAIL PROTECTED]> wrote:> On 12 nov, 13:22, Steve
> Holden <[EMAIL PROTECTED]> wrot
On 12 nov, 14:25, gontran <[EMAIL PROTECTED]> wrote:
> On 12 nov, 13:22, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> > gontran wrote:
(snip - about using templates instead of building html in python code)
> > > -> I'm using this function in a custom tag to build a menu
>
> > And is there a rule t
Hello Steve,
Maybe I'm wrong but I want to display this menu in all pages of my
site, so by using a custom tag, I can display my menu without having
to import my model in my different views.
On 12 nov, 13:22, Steve Holden <[EMAIL PROTECTED]> wrote:
> gontran wrote:
> > Merci beaucoup!
> > it wor
Hi gontran,
Why not check out using one of the two tree libraries that are out
there (django-mptt and treebeard)? They include functions for
traversing trees already, and you save yourself a lot of work dealing
with the schema stuff. We use django-mptt where I work to do exactly
what you're desc
gontran wrote:
> Merci beaucoup!
> it works fine now.
>
>> Now, and while this is none of my problems, I'd seriously question the
> decision of building html that way. This would be better done using
> templates IMVHO.
>
> -> I'm using this function in a custom tag to build a menu
And is there
Merci beaucoup!
it works fine now.
>Now, and while this is none of my problems, I'd seriously question the
decision of building html that way. This would be better done using
templates IMVHO.
-> I'm using this function in a custom tag to build a menu
On 12 nov, 10:59, bruno desthuilliers <[EMAI
On 12 nov, 09:22, gontran <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've got a problem with a recursive function:
> in my model, I have a class named myClass: each object in my class has
> an id, a parentId, and a name.
> I want to make a list of all my objects that looks like this:
>
> object1
Just a correction: replace 'page' by 'element':
def displayListObject(parentId, displayString):
displayString += ''
elements = myClass.objects.filter(parentId=parentId)
for element in elements:
if myClass.objects.filter(parentId=element.id):
displayString += '' +
14 matches
Mail list logo