Re: Help with a custom tag

2006-03-03 Thread akaihola
It seems you can also say {{item.list.0}} = {{item.list.1}} --~--~-~--~~~---~--~~ 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

An expression tag

2006-03-03 Thread limodou
I'v written a expression tag, it can be used to calculate python expression and save the result to a template variable. I think it maybe some useful for someone. ---utiltags.py--- from django import template import re register =

Re: Django in Boo

2006-03-03 Thread wizeman
Jeremy Dunck wrote: > IronPython -is- Python, runs on .Net, and is coming along nicely. Yes, IronPython is also cool. You know when you look at something and you say - wow, this is a great idea and it would be great if everyone realizes that? I had that feeling with Python right away, but only

Re: Django in Boo

2006-03-03 Thread Jeremy Dunck
On 3/3/06, wizeman <[EMAIL PROTECTED]> wrote: > > Ok, I was thinking more in an academic perspective instead of a > real-world one. > > Think about it. Python was an esoteric language in the beginning. And > Boo isn't that esoteric, it can be thought of as an extension to the > Python syntax.

Re: Django in Boo

2006-03-03 Thread wizeman
Ok, I was thinking more in an academic perspective instead of a real-world one. Think about it. Python was an esoteric language in the beginning. And Boo isn't that esoteric, it can be thought of as an extension to the Python syntax. And virtually all .NET libraries can be used in Boo, it runs

Re: Puzzling META.unique_together issue

2006-03-03 Thread Bo Shi
Sorry - some edit_inline, etc. got cut off in the paste. --~--~-~--~~~---~--~~ 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

Puzzling META.unique_together issue

2006-03-03 Thread Bo Shi
Hi, three models that concern this issue are Photo, Tag, and PhotoTag. Tag represents the model for all tags: class PhotoTag( meta.Model ): tid = meta.ForeignKey( Tag, core = True ) pid = meta.ForeignKey( Photo, core = True, verbose_name = "Photo Tag", edit_ class META: #

Re: Ordering with respect to a function in models?

2006-03-03 Thread Luke Plant
On Friday 03 March 2006 01:01, Malcolm Tredinnick wrote: > Unfortunately, Meta.ordering seems to want a real field, not a method > (which Admin.list_display can take) or a property. > > So am I missing something, or is this even a common need for other > people? Meta.ordering does ordering in

how to implement admin's filter interface in my own view

2006-03-03 Thread sam
Hi there I'd like to add the filter function to my own view much in the same way admin interface does it - i.e. filter based on the values of multiple model fields. I am puzzled how to define the URL pattern and how the matched pattern data gets passed to the view. Let's say I have 3 fields,

Re: Django in Boo

2006-03-03 Thread Eugene Lazutkin
wizeman wrote: > > I think one of the big advantages is the static typing feature. It's > great, because if you change a variable or method name (or type) in one > of your classes, and forget to change the method calls in other > classes, the error(s) would be caught at compile-time instead of >

Re: not about Django, but about this list

2006-03-03 Thread Malcolm Tredinnick
On Fri, 2006-03-03 at 15:53 -0800, Glenn Tenney wrote: > Does anyone have any idea why a couple of messages (such as the one > I'm including below) from a couple of different people have several > lines combined making it very tough to read Or, more to the > point, what can be done about

Re: not about Django, but about this list

2006-03-03 Thread Jeremy Dunck
On 3/3/06, Glenn Tenney <[EMAIL PROTECTED]> wrote: > > Does anyone have any idea why a couple of messages (such as the one > I'm including below) from a couple of different people have several > lines combined making it very tough to read Or, more to the > point, what can be done about

Re: Django in Boo

2006-03-03 Thread Jeremy Dunck
On 3/3/06, Tom Tobin <[EMAIL PROTECTED]> wrote: > Err, knock yourself out porting it if you want (as it's BSD licensed > after all), but I don't think you'll see many of us jumping to switch > from Python anytime soon. ;-) That's a much more measured response than my initial one (which I was

Re: Django in Boo

2006-03-03 Thread Eric Walstad
On Friday 03 March 2006 14:45, wizeman wrote: > If you don't know Boo, here are some of the main features: > > - Python-like syntax > - Power of static typing with the ease-of-use of type inference > - It's compiled, so type mismatches are caught right after changing > something > - It runs on

Re: exception while rendering

2006-03-03 Thread Malcolm Tredinnick
On Fri, 2006-03-03 at 17:12 -0600, Alan Bailey wrote: > Hi there- > > I am getting the following exception. It doesn't show up in django's > flashy exception display, but just as text (because it happens while > rendering). > > Dunno why it happens. But it usually happens after I add some

Re: Django in Boo

2006-03-03 Thread Tom Tobin
On 3/3/06, wizeman <[EMAIL PROTECTED]> wrote: > > Hi. I'm just starting to use Django and I'm loving it. > > Don't you think it would be great if Django was ported to Boo ( > http://boo.codehaus.org/ ) ? Err, knock yourself out porting it if you want (as it's BSD licensed after all), but I don't

exception while rendering

2006-03-03 Thread Alan Bailey
Hi there- I am getting the following exception. It doesn't show up in django's flashy exception display, but just as text (because it happens while rendering). Dunno why it happens. But it usually happens after I add some sort of relation information and then try to look at it through admin.

Re: thoughts about adding a user rating

2006-03-03 Thread Glenn Tenney
On Fri, Mar 03, 2006 at 04:50:37PM -0600, James Bennett wrote: > If it were an up-or-down, the ratings fields probably wouldn't be > PositiveSmallintegerFields, and the comments module's > get_rating_options method probably wouldn't use a 1-10 rating scale as > the example in its docstring ;)

Re: thoughts about adding a user rating

2006-03-03 Thread James Bennett
On 3/3/06, Glenn Tenney <[EMAIL PROTECTED]> wrote: > Thanks, but it seems to me that it does a user voting (one up, or one > down) rather than "I give this a 3 star rating". This voting scheme > generates an int value that can easily be ordered_by, but I don't think > it's a user-friendly as,

Django in Boo

2006-03-03 Thread wizeman
Hi. I'm just starting to use Django and I'm loving it. Don't you think it would be great if Django was ported to Boo ( http://boo.codehaus.org/ ) ? If you don't know Boo, here are some of the main features: - Python-like syntax - Power of static typing with the ease-of-use of type inference -

Re: view on site

2006-03-03 Thread mary
Thanks a lot Konstantin :) it works --~--~-~--~~~---~--~~ 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 this group, send

Re: thoughts about adding a user rating

2006-03-03 Thread Glenn Tenney
On Fri, Mar 03, 2006 at 03:02:32PM -0600, James Bennett wrote: > Take a look at the comments app distributed with Django > (django.contrib.comments), which has a rating system built in to it. Thanks, but it seems to me that it does a user voting (one up, or one down) rather than "I give this a 3

Re: thoughts about adding a user rating

2006-03-03 Thread James Bennett
On 3/3/06, Glenn Tenney <[EMAIL PROTECTED]> wrote: > Or, ideas/thoughts/comments gladly accepted on how to structure the > models and views-code for this. Take a look at the comments app distributed with Django (django.contrib.comments), which has a rating system built in to it. -- "May the

thoughts about adding a user rating

2006-03-03 Thread Glenn Tenney
A site I'm developing could greatly benefit by having a user rating added to it... e.g. a 1-5 star rating for each post and then being able to display the top ten posts (perhaps additionally such as top ten added this week, or top ten on subject X, etc.) or other such "user scoring" uses. Before

Customizing the admin interface

2006-03-03 Thread tomass
Hi Folks, I think there are two ways of doing what I want to do. Essentially what I want to do is be able to have read-only tables in the admin interface (these tables get populated from an external app), but I'd like the flexibility to be able to view the data in them from within the admin

Re: admin > site

2006-03-03 Thread James Bennett
On 3/3/06, Rob Slotboom <[EMAIL PROTECTED]> wrote: > Can someone please tell me what can be done with the site feature in > admin? /me thinks maybe documenting the sites app should go into LittleEasyImprovements on the wiki... -- "May the forces of evil become confused on the way to your

ManyToMany relations and order_with_respect_to

2006-03-03 Thread akaihola
In my model I have Papers and Persons. One Paper usually has multiple Persons as authors, and they have to be in a determined order. Every Person can of course be author for multiple Papers. On top of all, I'd like to be able to edit authors inline and re-arrange their order for every Paper in

Re: Ordering with respect to a function in models?

2006-03-03 Thread akaihola
You're not alone. I need this too and couldn't find a solution. --~--~-~--~~~---~--~~ 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: admin > site

2006-03-03 Thread akaihola
At least the FlatPages app in Django's contrib uses the site feature. --~--~-~--~~~---~--~~ 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: Help with a custom tag

2006-03-03 Thread akaihola
First of all, do you need a template tag for this? Can't you say {% for item in mylist %} {{item|slice:"0"}} = {{item|slice:"1"}} {% endfor %} If you want to create a for-loop-like template tag, you need some additional machinery. It's best to use class ForNode and def do_for() from

Re: Dreamhost - agh!

2006-03-03 Thread Graham King
pbx wrote: > Adrian said: >> I've never used Dreamhost, but I'll just toss in my two cents that >> having a dedicated server, with root access, is well worth it. >> ... it's still kinda-sorta affordable in the grand scheme >> of things if you're serious about making Web apps. > > I totally

Re: Dreamhost - agh!

2006-03-03 Thread pbx
Adrian said: > I've never used Dreamhost, but I'll just toss in my two cents that > having a dedicated server, with root access, is well worth it. > ... it's still kinda-sorta affordable in the grand scheme > of things if you're serious about making Web apps. I totally agree. It's great to have

Re: Overiding the Default Flatpage template

2006-03-03 Thread David Reynolds
On 3 Mar 2006, at 10:02 am, [EMAIL PROTECTED] wrote: > > Hi All, > > The docs mentioned that you can override the default template for a > paticular flat page. I need to do this but do not know how ( though > I'm trying to figure it out) > > Grateful for any assistance. When you add the page

Overiding the Default Flatpage template

2006-03-03 Thread [EMAIL PROTECTED]
Hi All, The docs mentioned that you can override the default template for a paticular flat page. I need to do this but do not know how ( though I'm trying to figure it out) Grateful for any assistance. Sincerely --~--~-~--~~~---~--~~ You received this

Re: caching questions

2006-03-03 Thread tonemcd
Have you seen this Fredrik? http://djangoutils.python-hosting.com/wiki/Utils --~--~-~--~~~---~--~~ 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

Re: Creating a menu structure

2006-03-03 Thread mazurin
I'm going to try to do the same thing as well. I have a vague idea that I have to write a custom view for it, but I'm still trying to figure out the right way to do it. Any pointers? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

admin > site

2006-03-03 Thread Rob Slotboom
Hi guys, Can someone please tell me what can be done with the site feature in admin? And now I'm on it: from the ducumentation I understand that it is possible to use admin interface parts in your own apps by calling classes. Am I correct? --~--~-~--~~~---~--~~