Re: How to pass a variable as parameter to a tag

2006-02-14 Thread limodou
On 2/15/06, Ian Holsman <[EMAIL PROTECTED]> wrote: > > doesn't something like: > class TopTagsNodeUser(template.Node): > """ what is the root of this application """ > def render(self, context): > user = context.get('user', None) > if user.is_anonymous(): >

Re: How to pass a variable as parameter to a tag

2006-02-14 Thread Ian Holsman
doesn't something like: class TopTagsNodeUser(template.Node): """ what is the root of this application """ def render(self, context): user = context.get('user', None) if user.is_anonymous(): return "" return "User Prefs"+str(user)+" " work? On

How to pass a variable as parameter to a tag

2006-02-14 Thread limodou
Say I have a tag, it could take some parameter, just like: {% calendar 2006 2 %} But in above code, the parameter is a fixed value. But if I have a year and a month variable, and I want to pass them to calender tag, so how to deal with that. It seems that: {% calendar year month %} can not

Re: Request for ideas

2006-02-14 Thread tonemcd
Authentication. There's some documentation, and it's pretty good. Having more won't hurt though and will definitely help the people considering migrating to django with their decisions. I'd suggest external (ie different to the settings.py 'django' database) MySQL/Postgres databases, LDAP and

Re: Request for ideas

2006-02-14 Thread Malcolm Tredinnick
Kenneth Gonsalves wrote: > On Wednesday 15 Feb 2006 9:08 am, Malcolm Tredinnick wrote: > > do something useful here. I thought it would be nice to take a > > couple of project ideas and produce some tutorial-like documents > > describing how to implement them in Django from start to (more or > >

Re: admin on "/" unable to find media

2006-02-14 Thread limodou
On 2/15/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > On Wednesday 15 Feb 2006 9:21 am, limodou wrote: > > If you are using the lastest svn, why your output is not the same > > as me? > > no idea > > > > Does you use apache? > > yes > Oops, maybe you should change httpd.conf just like

Re: Request for ideas

2006-02-14 Thread Kenneth Gonsalves
On Wednesday 15 Feb 2006 9:08 am, Malcolm Tredinnick wrote: > do something useful here. I thought it would be nice to take a > couple of project ideas and produce some tutorial-like documents > describing how to implement them in Django from start to (more or > less) finish. do workflow -

Re: admin on "/" unable to find media

2006-02-14 Thread Kenneth Gonsalves
On Wednesday 15 Feb 2006 9:21 am, limodou wrote: > If you are using the lastest svn, why your output is not the same > as me? no idea > > Does you use apache? yes -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!

Re: admin on "/" unable to find media

2006-02-14 Thread limodou
On 2/15/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > On Wednesday 15 Feb 2006 8:36 am, limodou wrote: > > > > > (r'^admin/', include('django.contrib.admin.urls.admin')), > > > > > > > > Which version do you use? It seems that the syntax is for > > > > 0.91. If you are using 0.92, the

Re: admin on "/" unable to find media

2006-02-14 Thread Kenneth Gonsalves
On Wednesday 15 Feb 2006 8:36 am, limodou wrote: > > > > (r'^admin/', include('django.contrib.admin.urls.admin')), > > > > > > Which version do you use? It seems that the syntax is for > > > 0.91. If you are using 0.92, the above should be: > > > > > > (r'^admin/',

Request for ideas

2006-02-14 Thread Malcolm Tredinnick
Having been tooling around with Django for some months now, primarily on little projects for my own use, I wanted to write up some of the things I've learnt. I actually like doing documentation, so I want to do something useful here. I thought it would be nice to take a couple of project ideas

Re: Dreamhost, Django and MySQL server connection

2006-02-14 Thread Eugene Lazutkin
kmh wrote: Edgars Jekabsons wrote: OK, posted a patch agaist trunk (revision 2307) http://code.djangoproject.com/attachment/ticket/463/mysql_rev2307.diff -- Edgars Hey thanks Edgars, I'll run it for a while and post encouragement to the ticket if I have no problems. Kieran Let me know

Re: admin on "/" unable to find media

2006-02-14 Thread limodou
On 2/15/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > On Wednesday 15 Feb 2006 8:11 am, limodou wrote: > > > (r'^admin/', include('django.contrib.admin.urls.admin')), > > > > Which version do you use? It seems that the syntax is for 0.91. > > If you are using 0.92, the above should be: > >

Re: Dynamic choices

2006-02-14 Thread Chetan Vaity
Thanks Amit and Adrian,I think I'll do something like what Amit said or write a custom manipulator.- ChetanOn 2/8/06, Adrian Holovaty < [EMAIL PROTECTED]> wrote:On 2/8/06, Amit Upadhyay < [EMAIL PROTECTED]> wrote:> > What I notice is that whenever an entry is added to LDAP, it is not> reflected in

Re: admin on "/" unable to find media

2006-02-14 Thread Kenneth Gonsalves
On Wednesday 15 Feb 2006 8:11 am, limodou wrote: > > (r'^admin/', include('django.contrib.admin.urls.admin')), > > Which version do you use? It seems that the syntax is for 0.91. > If you are using 0.92, the above should be: > >      (r'^admin/', include('django.contrib.admin.urls')), am using

Re: admin on "/" unable to find media

2006-02-14 Thread limodou
On 2/15/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > On Tuesday 14 Feb 2006 6:37 pm, coulix wrote: > > can i see your url.py, cause i had to take off the leading '^' to > > be able to recognize the admin part > > at /mysite/admin. > > (r'^admin/',

Re: recommended javascript books/tutorials/howtos?

2006-02-14 Thread Kenneth Gonsalves
On Tuesday 14 Feb 2006 9:45 pm, James Bennett wrote: > And don't let the 2001 publication date fool you; this book is > still very relevant. +1 -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!

Re: admin on "/" unable to find media

2006-02-14 Thread Kenneth Gonsalves
On Tuesday 14 Feb 2006 6:37 pm, coulix wrote: > can i see your url.py, cause i had to take off the leading '^' to > be able to recognize the admin part > at /mysite/admin. (r'^admin/', include('django.contrib.admin.urls.admin')), -- regards kg http://www.livejournal.com/users/lawgon tally ho!

Re: Dreamhost, Django and MySQL server connection

2006-02-14 Thread [EMAIL PROTECTED]
I was also experiencing sql disconnect errors with Dreamhost. I have just updated my site http://www.socialistsoftware.com/ to use this patch. We will see how it goes.

TZ Interactions

2006-02-14 Thread Max Battcher
As part of a personal side project I'm taking information from an external command (a source control system) and marshalling its information into django model classes. I hit a small stumbling block and was curious if anyone had any particular experience. I'm using Windows for my

Raw SQL to Django API Question and a ManyToMany Model Question

2006-02-14 Thread Brett Hoerner
Working on a last-minute mapping app for PyCon here, I'm currently using a raw SQL query to SELECT information from People (Model) who all share the same Tag (Model in a ManyToMany with People). I'm feeding the query a range of lat/lon and the tag I want, c = db.cursor()

Re: Dreamhost, Django and MySQL server connection

2006-02-14 Thread kmh
Edgars Jekabsons wrote: > OK, posted a patch agaist trunk (revision 2307) > http://code.djangoproject.com/attachment/ticket/463/mysql_rev2307.diff > > -- > Edgars Hey thanks Edgars, I'll run it for a while and post encouragement to the ticket if I have no problems. Kieran

Re: Dreamhost, Django and MySQL server connection

2006-02-14 Thread Edgars Jekabsons
OK, posted a patch agaist trunk (revision 2307) http://code.djangoproject.com/attachment/ticket/463/mysql_rev2307.diff -- Edgars

Re: more model basics - mny to many's

2006-02-14 Thread gizo
ah, looks clever, i like that. I'll check it when i get into work. thanks...

Re: Dreamhost, Django and MySQL server connection

2006-02-14 Thread kmh
Edgars Jekabsons wrote: > Hi Kieran, > > I posted a working patch against Django release 0.91 on the same ticket > http://code.djangoproject.com/ticket/463 Thanks Edgars, Unfortunately your patch can't get committed as-is either because it is against 0.91 and there have been a few changes since

Re: Class Methods in Model?

2006-02-14 Thread Roberto Aguilar
Awesome, works great. Thanks for the help, guys! -berto. On 2/14/06, James Bennett <[EMAIL PROTECTED]> wrote: > > On 2/14/06, Eric Walstad <[EMAIL PROTECTED]> wrote: > > Hey Berto, > > > > > > And magic-removal, as

Re: Class Methods in Model?

2006-02-14 Thread James Bennett
On 2/14/06, Eric Walstad <[EMAIL PROTECTED]> wrote: > Hey Berto, > > And magic-removal, as far as I understand it, will do away with the need for that. Hooray! -- "May the forces of evil become confused on the way to

Re: Class Methods in Model?

2006-02-14 Thread Eric Walstad
On Tuesday 14 February 2006 10:23, Roberto Aguilar wrote: > Hello, > > I have a model called Invitation that I would like to have a method > called make_rsvp_code. In the model I define it as such: > > class Invitation(meta.Model): > [...] > > def make_rsvp_code(self, invitation): >

Class Methods in Model?

2006-02-14 Thread Roberto Aguilar
Hello, I have a model called Invitation that I would like to have a method called make_rsvp_code. In the model I define it as such: class Invitation(meta.Model): [...] def make_rsvp_code(self, invitation): [...] make_rsvp_code = classmethod(make_rsvp_code) The reason I

Re: How to customize display of radio-button group?

2006-02-14 Thread Waylan Limberg
On 2/14/06, Leeuw van der, Tim <[EMAIL PROTECTED]> wrote: > > > > I have a field in my model that is entered, in a form, using a group of > radio-buttons. However, I don't like the display of those radio-buttons: I > want them side by side, rather than as a bulleted-list below each other. > > > >

Customizing limit_choices_to

2006-02-14 Thread Jakub Labath
Hi, class Category(meta.Model): name = meta.CharField(maxlength=255) class Article(meta.Model): title = meta.CharField(maxlength=255) category = meta.ForeignKey(Category) class Pillar(meta.Model): name = meta.CharField(maxlength=255) categories =

Re: more model basics - mny to many's

2006-02-14 Thread Jacob Kaplan-Moss
On Feb 14, 2006, at 9:55 AM, gizo wrote: Each Song can have Many Player/Instrument combinations (where each musician could play any instrument, in theory) Give this a shot:: class Musician(meta.Model): ... class Instrument(meta.Model): ...

Re: recommended javascript books/tutorials/howtos?

2006-02-14 Thread James Bennett
On 2/14/06, Steven Armstrong <[EMAIL PROTECTED]> wrote: > I'ld have a look at "JavaScript - The Definitive Guide" by David > Flanagan [1]. Seconded. Reading this book will make you understand JavaScript on a deep level, and then doing web stuff with JavaScript just becomes a matter of learning

Re: more model basics - mny to many's

2006-02-14 Thread gizo
wont that just give me: Each Song can have many Instruemtns Each Song can have many Musicians? what I want is: Each Song can have Many Player/Instrument combinations (where each musician could play any instrument, in theory)

Re: recommended javascript books/tutorials/howtos?

2006-02-14 Thread Jeremy Dunck
On 2/14/06, Gábor Farkas <[EMAIL PROTECTED]> wrote: > i'd like to increase/enhance my javascript knowledge, which right now is > rather limited (zero?) :) Aside from the usual book recommendations, I suggest you go get dojo. That's the largest body of well-written javascript I've ever seen.

ANN: Django hosting available at Python-Hosting.com

2006-02-14 Thread Remi
Hello everyone, I'm happy to announce that Python-Hosting.com now supports Django. We've been hosting Django sites for a while but we've now added it to our official list of supported software. You can host 5 Django sites with up to 10 MySql or PostgreSql databases for $15/month. When you

Re: Dreamhost, Django and MySQL server connection

2006-02-14 Thread Jeremy Jones
On Mon, 13 Feb 2006 11:12:27 -0800 "Edgars Jekabsons" <[EMAIL PROTECTED]> wrote: > > Does anyone else who uses Dreamhost has problems with MySQL connection > going away? > > The project I suggested hosting there is not even inproduction yet, > but we get MySQL server errorsa lot (a few

Re: admin on "/" unable to find media

2006-02-14 Thread coulix
can i see your url.py, cause i had to take off the leading '^' to be able to recognize the admin part at /mysite/admin.

Re: recommended javascript books/tutorials/howtos?

2006-02-14 Thread Jiri Barton
The javascript language itself (plus browser javascript interface - this is rather messy IMHO): http://wp.netscape.com/eng/mozilla/3.0/handbook/javascript/ I have found the following reference very valuable. It describes the MSIE web browser javascript interface. Surprisingly, it is from

Re: recommended javascript books/tutorials/howtos?

2006-02-14 Thread Steven Armstrong
On 02/14/06 11:07, Gábor Farkas wrote: hi, i'd like to increase/enhance my javascript knowledge, which right now is rather limited (zero?) :) so, are there are books/websites you can recommend? i'm primarily interested in the application of javascript to the webpages, so DOM

admin on "/" unable to find media

2006-02-14 Thread Kenneth Gonsalves
hi, so far, using mod_python, i have my location as "/mysite/" and my admin mounted as: http://mydomain.com/mysite/admin/ no problems I tried location as "/" and admin mounted as: http://mydomain.com/admin/ admin comes up - but css is not found. On looking at the page source of both it gives:

recommended javascript books/tutorials/howtos?

2006-02-14 Thread Gábor Farkas
hi, i'd like to increase/enhance my javascript knowledge, which right now is rather limited (zero?) :) so, are there are books/websites you can recommend? i'm primarily interested in the application of javascript to the webpages, so DOM manipulation and things like that. of course i am

Re: Version 1.0 Features

2006-02-14 Thread Jeroen Ruigrok van der Werven
Have you checked: http://code.djangoproject.com/wiki/VersionOneFeatures

Re: more model basics - mny to many's

2006-02-14 Thread patrick k
what do you need the table songInstrument for? i´d suggest using a many-to-many relationship ... see http://www.djangoproject.com/documentation/model_api/#many-to-many-relations hips class song(meta.Model): title = ... duration = ... instrument = meta.ManyToManyField(instrument) musician =

Re: Dreamhost, Django and MySQL server connection

2006-02-14 Thread Eugene Lazutkin
Jamison Roberts wrote: I have nothing but problems with Dreamhost + Django. More specifically Dreamhost + Python. I hate that company and will be switching as soon as my year is up. What "more specifically" was your problem with Python? Can I threadjack and ask for a host recommendation?

Re: Dreamhost, Django and MySQL server connection

2006-02-14 Thread Eugene Lazutkin
foot wrote: We've got our django project hosted over at Site5 and we have a similar MySQL problem: A (2006, MySQL server has gone away) error, whenever the [snip] It would be great to get this fixed tho... It was fixed 5 months ago but didn't make it to trunk. Please try

Re: Dreamhost, Django and MySQL server connection

2006-02-14 Thread Eugene Lazutkin
Edgars Jekabsons wrote: Does anyone else who uses Dreamhost has problems with MySQL connection going away? I use Dreamhost without any problems, because I use MySQL patch (ticket #463 --- http://code.djangoproject.com/ticket/463). Please use the last version by nesh --- it was updated to