Re: kinda really nOOb question: how to for loop an integer in template?

2006-01-03 Thread limodou
2006/1/4, EricHsu <[EMAIL PROTECTED]>: > > guys, I did it by hacking into django's list_detail.py > > just add a simply line here: > > $ svn diff list_detail.py > Index: list_detail.py > === > --- list_detail.py (revision 1813) >

Re: kinda really nOOb question: how to for loop an integer in template?

2006-01-03 Thread EricHsu
guys, I did it by hacking into django's list_detail.py just add a simply line here: $ svn diff list_detail.py Index: list_detail.py === --- list_detail.py (revision 1813) +++ list_detail.py (working copy) @@ -58,6 +58,7 @@

Re: kinda really nOOb question: how to for loop an integer in template?

2006-01-03 Thread limodou
2006/1/4, EricHsu <[EMAIL PROTECTED]>: > > Hi limodou, could you pls be more specific? Thanks! > > I thought the pages is a list, but I was wrong, and I didn't find there is a range filter in templates document, so I think either you create a new range filter, or you create a list in view's code.

Re: kinda really nOOb question: how to for loop an integer in template?

2006-01-03 Thread EricHsu
Hi limodou, could you pls be more specific? Thanks!

Re: kinda really nOOb question: how to for loop an integer in template?

2006-01-03 Thread limodou
2006/1/4, EricHsu <[EMAIL PROTECTED]>: > > the python way > > {% for page_number in range(pages) %} > > doesn't work either... :'( > > May be you should use forloop.counter for that. -- I like python! My Blog: http://www.donews.net/limodou NewEdit Maillist: http://groups.google.com/group/NewEdit

Re: kinda really nOOb question: how to for loop an integer in template?

2006-01-03 Thread Afternoon
I wanted to do this and more and ended up tinkering with ObjectPaginator directly. It's a bit ugly at the moment, but I plan to give the code back if it's wanted. Ben On 4 Jan 2006, at 5:33, EricHsu wrote: hi all, Here is a nOOb question: I'm using the paginate function, I got the to

Re: kinda really nOOb question: how to for loop an integer in template?

2006-01-03 Thread EricHsu
the python way {% for page_number in range(pages) %} doesn't work either... :'(

kinda really nOOb question: how to for loop an integer in template?

2006-01-03 Thread EricHsu
hi all, Here is a nOOb question: I'm using the paginate function, I got the total pages, I would like to loop and generate each page number, how can I do that? {% if is_paginated %} {% for page_number in pages %} {{ page_number }} {% endfor %} {% endif %} doesn't se

Re: Web host for Django, what to ask for?

2006-01-03 Thread David MacKinnon
On 1/4/06, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > > These are instructions for my setup: > http://wiki.dreamhost.com/index.php/Django --- actually I use full-blown > flup now, but it is a tiny change to one script. > That looks like where I got the setup I'm using from. Thanks, forgot where

Re: ANN: Another Django app at washingtonpost.com

2006-01-03 Thread Jeremy Dunck
On 1/3/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > I created this Django app on deadline, as a supplement to a Washington > Post analysis of previous court rulings by Supreme Court nominee > Samuel Alito. > > http://projects.washingtonpost.com/2006/alito/cases/ Who did the info graphic on

ANN: Another Django app at washingtonpost.com

2006-01-03 Thread Adrian Holovaty
I created this Django app on deadline, as a supplement to a Washington Post analysis of previous court rulings by Supreme Court nominee Samuel Alito. http://projects.washingtonpost.com/2006/alito/cases/ Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Web host for Django, what to ask for?

2006-01-03 Thread Eugene Lazutkin
These are instructions for my setup: http://wiki.dreamhost.com/index.php/Django --- actually I use full-blown flup now, but it is a tiny change to one script. Thanks, Eugene <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Eugene Lazutkin wrote: >> I use Apache + FastCGI + MyS

django_website setup

2006-01-03 Thread [EMAIL PROTECTED]
Dear Django fellows: I am very interested in django. I downloaded the sample django_website and wanted to set it up on my local machine. However, I am having difficulty to do that because there's nothing about how to set it up and I am new to the framework. Can someone give me some instructions?

Re: django with web.wsgi

2006-01-03 Thread [EMAIL PROTECTED]
After a bit more fooling around it appears as though the solution involves mod_rewrite.

Re: Web host for Django, what to ask for?

2006-01-03 Thread David MacKinnon
On 1/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Eugene Lazutkin wrote: > > I use Apache + FastCGI + MySQL. I think this is the easiest combination for > > hosting providers. If they provide all 3, you can install the rest locally. > > Is it possible to take advantage of Apache+FastCGI+

Re: Web host for Django, what to ask for?

2006-01-03 Thread [EMAIL PROTECTED]
Eugene Lazutkin wrote: > I use Apache + FastCGI + MySQL. I think this is the easiest combination for > hosting providers. If they provide all 3, you can install the rest locally. Is it possible to take advantage of Apache+FastCGI+MySQL without reconfiguring Apache as per these instruction (assumi

django with web.wsgi

2006-01-03 Thread [EMAIL PROTECTED]
Hello, I'm trying to get django setup with the web.wsgi module. It's slow but seems to be working pretty well. I can get through Part 1 of the tutorial. In part 2 I can get the admin page up and browse to it at: http://mydomain/cgi-bin/django_test.cgi/admin/ However, when I click login the form is

Reminder: Django at PyCon 2006

2006-01-03 Thread Jacob Kaplan-Moss
Howdy -- A quick reminder: PyCon 2006 is coming up, and early-bird registration ($65 discount) is open until Jan 15th. There's a good bit of Django stuff planned, so if you can make it you should register! Here's what we've got going on: * Both Adrian and I will be giving a talk. Mine

Re: Additional User Data?

2006-01-03 Thread Cheng Zhang
I had the similar (or the same) error with my customer User_Profile model, when I specify nothing for admin, like admin = meta.Admin( ) If I specify something like 'list_display', the error is gone. admin = meta.Admin( lis

Re: Accessing Post variables in _post_save

2006-01-03 Thread Brett Parker
On Tue, Jan 03, 2006 at 10:13:49AM -0600, Jacob Kaplan-Moss wrote: > > On Jan 3, 2006, at 9:45 AM, David Reynolds wrote: > >I'm sure there's a way, but I can't for the life of me work out how > >you could get access to POST variables in the _post_save > >functions. Can anyone help? > > You

Re: Ellington CMS

2006-01-03 Thread Wilson
I know - that's what I haven't had time to do! ;)

Re: Is django authentication right for me?

2006-01-03 Thread tonemcd
Adrian, I wonder if you could give some thoughts up on how people might migrate existing authentication (and authorisation - there's a difference ;) schemes into Django? I have about 60+ Zope sites and their associated dev-sites using a variety of AA, from MySQL and PostgreSQL tables with 10's of

Re: Ellington CMS

2006-01-03 Thread Jeremy Dunck
On 1/3/06, Wilson <[EMAIL PROTECTED]> wrote: > Ellington is a CMS for online news sites, with support for news > stories, all kinds of multimedia, an entertainment calendar, band/music > database, and loads of other stuff. You can see it in action on most of > the "Lawrence" sites on the Django-po

track/pingback libraries recommended for django-powered apps

2006-01-03 Thread iGL
Are there some recommendations/restrictions to consider when choosing a track/pingback libs for a django-powered app? last but not least: HAPPY NEW YEAR! :)

Re: Ellington CMS

2006-01-03 Thread Wilson
There's not a public marketing site right now (I know, it's ridiculous - but we've been so busy installing Ellington and working with new clients, I've dropped the ball on getting it out the door). Ellington is a CMS for online news sites, with support for news stories, all kinds of multimedia, a

Re: Accessing Post variables in _post_save

2006-01-03 Thread Jacob Kaplan-Moss
On Jan 3, 2006, at 9:45 AM, David Reynolds wrote: I'm sure there's a way, but I can't for the life of me work out how you could get access to POST variables in the _post_save functions. Can anyone help? You can't -- the save hooks are decoupled from the request processing framework (thin

Accessing Post variables in _post_save

2006-01-03 Thread David Reynolds
Hi, I'm sure there's a way, but I can't for the life of me work out how you could get access to POST variables in the _post_save functions. Can anyone help? Regards David -- David Reynolds [EMAIL PROTECTED]

Re: Additional User Data?

2006-01-03 Thread Adrian Holovaty
On 12/31/05, Andreas Neumeier <[EMAIL PROTECTED]> wrote: > But when I try to use the admin interface, it gives me bad errors: > > --- cut --- > OperationalError at /app/admin/match/members/ > (1109, "Unknown table 'auth_users' in order clause") > --- cut --- Try specifying an "ordering" parameter

Re: Limiting selected records and distinct as a keyword

2006-01-03 Thread Adrian Holovaty
On 1/3/06, Jaroslaw Zabiello <[EMAIL PROTECTED]> wrote: > In http://www.djangoproject.com/documentation/db_api/ we can read about > "distinct" keyword but it is not clear how to use it (any examples > need!). It was added as a bug to > http://code.djangoproject.com/ticket/1152. See http://www.dja

Re: Is django authentication right for me?

2006-01-03 Thread Adrian Holovaty
On 1/2/06, Mike <[EMAIL PROTECTED]> wrote: > I am creating an application that will have multiple companies, with > each having multiple users that would have to login to my system more > like the way basecamp has it. I enjoyed what django authentication can > do for me, but then again I could imp

Re: DB Field metadata

2006-01-03 Thread Jacob Kaplan-Moss
On Jan 3, 2006, at 8:52 AM, Dody Suria Wijaya wrote: Alice wrote: Is there a way of retrieving a database field's metadata? For example, the maxlength or choices parameters? It would be nice to automatically display the number of allowed characters for a given textfield. Hi Alice, try acc

Re: DB Field metadata

2006-01-03 Thread Dody Suria Wijaya
Alice wrote: Is there a way of retrieving a database field's metadata? For example, the maxlength or choices parameters? It would be nice to automatically display the number of allowed characters for a given textfield. Alice Hi Alice, try accessing via its class: Poll._meta.fields[2].ma

DB Field metadata

2006-01-03 Thread Alice
Is there a way of retrieving a database field's metadata? For example, the maxlength or choices parameters? It would be nice to automatically display the number of allowed characters for a given textfield. Alice

Re: Additional User Data?

2006-01-03 Thread Andreas Neumeier
Yes, i did init the database. Authentication is also perfectly possible, I just cannot store more then username, email, first- and surname... also, documentation on get_profile only has this: > get_profile() -- Returns a site-specific profile for this user. Raises > django.models.auth.SiteProfi

Extra auth.User fields

2006-01-03 Thread Alice
I want to do exactly this (add extra fields to the auth.User model): http://groups.google.com/group/django-users/browse_thread/thread/fc7fb879b28533e6/94f66cbaa6a42d6e?q=extending+user+&rnum=1#94f66cbaa6a42d6e But this was posted and answered in August 05 - I have no problem with those steps, bu

Limiting selected records and distinct as a keyword

2006-01-03 Thread Jaroslaw Zabiello
In http://www.djangoproject.com/documentation/db_api/ we can read about "distinct" keyword but it is not clear how to use it (any examples need!). It was added as a bug to http://code.djangoproject.com/ticket/1152. -- JZ