can i extend manipulators?

2006-02-15 Thread gizo
Hiya. I have a largeish form, and I want to add customised choices and validation for one field. I can only seem to find doc references to creating a whole new manipulator, and I'd rather not have to re-define every field in the form. Is there a way I can extend the standard manipulators to do so?

Re: MD5 Password being changed to SHA1 and no longer working

2006-02-15 Thread Milton Waddams
On 2/16/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > Hmmm, I don't recall anybody having this issue, so I suspect it's > something with your code. Are you, perchance, subclassing the > auth.User model or doing anything else custom with the auth app? Nope, only thing I'm using auth for i

Re: Raw SQL to Django API Question and a ManyToMany Model Question

2006-02-15 Thread Russell Keith-Magee
On 2/16/06, Brett Hoerner <[EMAIL PROTECTED]> wrote: ---class Tag(meta.Model):  person = meta.ManyToManyField(Person, blank=True, null=True)This is what I meant about the bidirectional query problem - in 0.91/trunk ManyToMany fields can only be traversed in the direction they are defined - in this

Re: mod_python Segmentation fault importing django.utils.feedgenerator.py - with fix

2006-02-15 Thread Adrian Holovaty
On 2/15/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > On Feb 15, 2006, at 4:19 PM, Graham King wrote: > > I have been getting a segmentation fault when using > > django.utils.feedgenerator to generate an RSS feed of my site. This > > works fine with 'django-admin runserver', but when run un

Re: MD5 Password being changed to SHA1 and no longer working

2006-02-15 Thread Adrian Holovaty
On 2/15/06, Milton Waddams <[EMAIL PROTECTED]> wrote: > I've recently upgraded to the latest release and one of the issues > I've experienced is that my passwords which were in md5 work > correctly, however immediately upon logging in they are changed to a > SHA1 hash with which future logins do n

Re: some suggestion about url parsing?

2006-02-15 Thread Adrian Holovaty
On 2/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm learning django these days. and urls.py is as follow: > ... > (r'^hello/$', 'web.hello.index'), > (r'^test/$', 'web.test.index'), > ... > > it looks complicated, can it be much simpler, even only one line? And > it can

Re: Raw SQL to Django API Question and a ManyToMany Model Question

2006-02-15 Thread Brett Hoerner
I've tried: people.get_list(lat__gte=minlat, lon__gte=minlon, lat__lte=maxlat, lon__lte=maxlon, tags__value__exact='django') TypeError: got unexpected keyword argument 'tags__value__exact' And: people.get_list(lat__gte=minlat, lon__gte=minlon, lat__lte=maxlat, lon__lte=maxlon, tag__value__exac

some suggestion about url parsing?

2006-02-15 Thread [EMAIL PROTECTED]
hi, there, I'm learning django these days. and urls.py is as follow: ... (r'^hello/$', 'web.hello.index'), (r'^test/$', 'web.test.index'), ... it looks complicated, can it be much simpler, even only one line? And it can do the follow things?: e.g. a) when access http://localhost

MD5 Password being changed to SHA1 and no longer working

2006-02-15 Thread Milton Waddams
Hi All, Apologies if this has been raised, I did a bit of searching without any luck :( I've recently upgraded to the latest release and one of the issues I've experienced is that my passwords which were in md5 work correctly, however immediately upon logging in they are changed to a SHA1 hash w

Re: Raw SQL to Django API Question and a ManyToMany Model Question

2006-02-15 Thread Russell Keith-Magee
On 2/16/06, Brett Hoerner <[EMAIL PROTECTED]> wrote: Not sure if anyone will see this now that it's off the front page, butheres what I've gathered so far:Sorry - I meant to answer this one yesterday, but I got distracted. I don't think the Django DB API can handle many2many stuff (at leastright no

Re: Running Django on Windows

2006-02-15 Thread Russell Keith-Magee
On 2/16/06, RyanP <[EMAIL PROTECTED]> wrote: -- How much stability/efficiency do we lose by running Django andPostgreSQL on Windows? (If it comes to it, is Apache worth a bigfight?)-- Is it possible to run a mirror configuration for load-balancing, like we do right now? Does it even make sense to d

Re: error creating first view

2006-02-15 Thread Lachlan Cannon
Alan Bailey wrote: > ImportError at /unixgroups/34/ No module named group > > Here is urls.py: > from django.conf.urls.defaults import * > > urlpatterns = patterns('', > # Example: > # (r'^djaccounts/', include('djaccounts.apps.foo.urls.foo')), > > # Uncomment this for admin: >

Re: Version 1.0 Features

2006-02-15 Thread Russell Keith-Magee
On 2/12/06, ChaosKCW <[EMAIL PROTECTED]> wrote: HiI have looked all over the roadmap etc.. and cant find any dates on thefeatures.As annoying as it may be, the only reliable answer I can give is "when its done". The most important feature for me is the transaction support in the ORMlayer. Transact

error creating first view

2006-02-15 Thread Alan Bailey
Hi there, New user, I'm going through the tutorial, except with our current database that we have here (so instead of the 'polls' app I'm making something similar to what we already have). Everything's fine up to a point, but now I am creating a public view (tutorial3) and it can't find the modu

Re: mod_python Segmentation fault importing django.utils.feedgenerator.py - with fix

2006-02-15 Thread Jacob Kaplan-Moss
On Feb 15, 2006, at 4:19 PM, Graham King wrote: > I have been getting a segmentation fault when using > django.utils.feedgenerator to generate an RSS feed of my site. This > works fine with 'django-admin runserver', but when run under > mod_python, 99% of the time this is because you're runni

Re: recommended javascript books/tutorials/howtos?

2006-02-15 Thread Luke Plant
On Tuesday 14 February 2006 10:07, Gábor Farkas wrote: > 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

Re: Request for ideas

2006-02-15 Thread Ian Holsman
Pick a application which is done nicely in some other language, and try implementing it in django. you could always help out with the django-forum project or possibly a CRM like vtiger or sugarcrm would be nice as well. regards Ian On 2/16/06, oggie rob <[EMAIL PROTECTED]> wrote: > > > A front-

Running Django on Windows

2006-02-15 Thread RyanP
We're getting ready to do a major overhaul of our newspaper's website, so we've been looking into some development frameworks. I'm pretty sure we're ready to switch to Django. Our current site has run on ASP/SQL Server for years. We run a pair of Windows servers for load balancing, connecting bac

Re: Raw SQL to Django API Question and a ManyToMany Model Question

2006-02-15 Thread Brett Hoerner
Not sure if anyone will see this now that it's off the front page, but heres what I've gathered so far: I don't think the Django DB API can handle many2many stuff (at least right now) As for question 2, apparently you _can_ import a model in itself, so problem solved. Thanks to bitprophet on IRC

mod_python Segmentation fault importing django.utils.feedgenerator.py - with fix

2006-02-15 Thread Graham King
Dear django-users, I have been getting a segmentation fault when using django.utils.feedgenerator to generate an RSS feed of my site. This works fine with 'django-admin runserver', but when run under mod_python, I get (in Apache's error log): [Wed Feb 15 22:02:41 2006] [notice] mod_

Re: Help with Admin and modpython

2006-02-15 Thread ChaosKCW
yes, they are. i will try the setup from scratch. --~--~-~--~~~---~--~~ 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 gro

Re: Request for ideas

2006-02-15 Thread oggie rob
> A front-end to a distributed tinder-box setup. Reporting build results that are either pulled from other locations or posted to the server. You could contribute to trac: http://www.edgewall.com/trac/details.html Although they might not be thrilled about another package to install all the other

Re: Request for ideas

2006-02-15 Thread Gustavo Picon
I already wrote[1] a planetplanet implementation in django with some added features: * It handles historical data, you can read old posts * It parses a lot more info than PlanetPlanet, including post categories * It generates pages with posts of a certain category * A cloud tag/folksonomy (hype 2

Re: Dreamhost, Django and MySQL server connection

2006-02-15 Thread Eugene Lazutkin
kmh wrote: > > So I tried running this patch on a very low-volume production server > and MySQL (4.1/ Ubuntu Breezy) started chucking some "Too many > connections" errors. :-) But no "lost connections" now? > I'm no expert on RDBMS. I did some googling and discovered the MySQL > "max_connectio

Re: Dreamhost, Django and MySQL server connection

2006-02-15 Thread kmh
Eugene Lazutkin wrote: > 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 encouragemen

using django models with twisted?

2006-02-15 Thread Steven Armstrong
Is anybody using django models in twisted (or other async) apps? Any ideas on how to make the two play together nicely? cheers Steven

Re: two object returned for exact pk lookup

2006-02-15 Thread Maniac
Amit Upadhyay wrote: On 2/15/06, *Maniac* <[EMAIL PROTECTED] > wrote: It may be threading... What http server and what database you use? If http is Apache does it use threaded worker? Threading? Thats surprizing, I am using apache with fastcgi, as documen

Re: two object returned for exact pk lookup

2006-02-15 Thread Amit Upadhyay
On 2/15/06, Maniac <[EMAIL PROTECTED]> wrote: It may be threading... What http server and what database you use? Ifhttp is Apache does it use threaded worker?Threading? Thats surprizing, I am using apache with fastcgi, as documented on  http://wiki.dreamhost.com/index.php/Django. Database is MySQL

Re: two object returned for exact pk lookup

2006-02-15 Thread Maniac
Amit Upadhyay wrote: How can I get more than one Blog when I am specifying pk. This happens just once, while that page is accessed more than hundreads of times everyday, I am getting a clean output when I do it on python prompt: >>> from django.models.blogger import * >>> blogs.get_o

Re: two object returned for exact pk lookup

2006-02-15 Thread Amit Upadhyay
Hi,I just got another mail for some other pk, and I got three objects, I am starting to get worried, I am planning to take my service out of beta coming weekend, and this has shaken my confidence. get_object_or_404 should lead to 404 exception for any exception I guess. But much more importantly th

two object returned for exact pk lookup

2006-02-15 Thread Amit Upadhyay
Hi,Today I got this in mail:  File "/home/amitu/django_projects/amitucom/apps/blogger/js_views.py", line 57, in jsma    blog = get_object_or_404(blogs, pk=blog_id)  File "/home/amitu/django_src/django/core/extensions.py", line 39, in get_object_or_404    return mod.get_object(**kwargs)  File "/hom

Re: prefill admin forms

2006-02-15 Thread Adrian Holovaty
On 2/15/06, David S. <[EMAIL PROTECTED]> wrote: > Sadly, no. The use case is a link from another context (page) that contains > some of the values in question, i.e. from an author detail, click "add book" > so > that the book add admin page is returned with the author field populated (this > is

Re: Templating Pitfalls?

2006-02-15 Thread Maniac
[EMAIL PROTECTED] wrote: I was wondering, in response to more complex templating setups. If as a user, you wanted to subclass a parent template, but the parent template needs to dynamically generate content given a data source. An example could be a calendar of events that you want displayed on

Re: prefill admin forms

2006-02-15 Thread David S .
> default? e.g. > > field = meta.CharField("Caption", default="some default text", ...) Sadly, no. The use case is a link from another context (page) that contains some of the values in question, i.e. from an author detail, click "add book" so that the book add admin page is returned with

Re: Templating Pitfalls?

2006-02-15 Thread Julio Nobrega
With "child page should not have to get those events" you mean not passing the events list as a variable to render_to_response() on each view? Well, I am using template tags. These are objects/functions/variables available globally on your templates. It's actually what I use to generate items

Re: prefill admin forms

2006-02-15 Thread [EMAIL PROTECTED]
David S. wrote: > Is there a mechanism to pre-populate fields in an admin add page? > > I can imagine a javascript hack or trying to use the admin template > from my own view somehow, but I am hoping for something really simple > that I missed in the docs. default? e.g. field = meta.CharFi

Templating Pitfalls?

2006-02-15 Thread [EMAIL PROTECTED]
I was wondering, in response to more complex templating setups. If as a user, you wanted to subclass a parent template, but the parent template needs to dynamically generate content given a data source. An example could be a calendar of events that you want displayed on every page. The child page

prefill admin forms

2006-02-15 Thread David S .
Is there a mechanism to pre-populate fields in an admin add page? I can imagine a javascript hack or trying to use the admin template from my own view somehow, but I am hoping for something really simple that I missed in the docs. Peace, David S.

freebsd 5.4 mysql problem

2006-02-15 Thread Dmitry Medvedev
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 i've encountered really weird problem on FreeBSD 5.4 , python 2.4.2 , py24-MySQL-db-1.2.0 and mysql , i've moved my project from Gentoo Linux, used subversion to get latest branch of django, created mysql database, set correct values in setting.py ,

Re: Actions on startup?

2006-02-15 Thread Adrian Holovaty
On 2/15/06, Ned Batchelder <[EMAIL PROTECTED]> wrote: > Actually, I was looking at the middleware, because executing the middleware > modules happens once on the first request. If I put executable code at the > top level of a middleware module, I'll get the effect I'm looking for. Not > an eleg

Re: Request for ideas

2006-02-15 Thread Eric Walstad
On Tuesday 14 February 2006 19:38, Malcolm Tredinnick wrote: > 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 h

Re: Actions on startup?

2006-02-15 Thread Ned Batchelder
Actually, I was looking at the middleware, because executing the middleware modules happens once on the first request.  If I put executable code at the top level of a middleware module, I'll get the effect I'm looking for.  Not an elegant solution, though. --Ned. Adrian Holovaty wrote: On

Re: Actions on startup?

2006-02-15 Thread Adrian Holovaty
On 2/15/06, Ned Batchelder <[EMAIL PROTECTED]> wrote: > I'd like to perform some one-time actions when the server is started. > They would be similar to the "validating models..." that happens when > the debug server is started. I'd like these things to happen for both > development and real depl

Re: admin on "/" unable to find media

2006-02-15 Thread Maniac
Kenneth Gonsalves wrote: 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: "/media/css/base.css/" in both examples, but in the second example i get a 404 in the logs saying css not fo

Re: admin on "/" unable to find media

2006-02-15 Thread limodou
On 2/15/06, Maniac <[EMAIL PROTECTED]> wrote: > > limodou wrote: > > >If you are using the lastest svn, why your output is not the same as me? > > > > > Because 0.92 is a magic-removal branch, not the trunk which 'latest svn' is. > You are right. Because I'm working in magic-removal now, so I thou

Re: admin on "/" unable to find media

2006-02-15 Thread Maniac
limodou wrote: If you are using the lastest svn, why your output is not the same as me? Because 0.92 is a magic-removal branch, not the trunk which 'latest svn' is.

Actions on startup?

2006-02-15 Thread Ned Batchelder
I'd like to perform some one-time actions when the server is started. They would be similar to the "validating models..." that happens when the debug server is started. I'd like these things to happen for both development and real deployed servers. Is there any formal mechanism in Django f

Re: Request for ideas

2006-02-15 Thread mitja
do a petstore - A petstore is a very good tutorial and demo app showing media handling, authentication, sessions and db-topics. Many developers (if not all:) already know its "business blueprint" so they/we can concentrate on the specifics of the framework and compare it to others. I particularl

Re: Model Basics

2006-02-15 Thread ChaosKCW
Thanks, I wasnt sure from the documentation if subclassing would do a "inheritance" DB thing like many ORM tools support, or simply combine the two classes as I was hoping for.

Re: Version 1.0 Features

2006-02-15 Thread ChaosKCW
Yes all it says is pending.

Edit a FK object from w/in view

2006-02-15 Thread Roberto Aguilar
Hello, I have a Model that has a FK to an Address Model. In the admin, I get a pulldown to select the address or a plus sign to add a new one. Is there some way to get an edit button next to the plus sign so that i can get the same window as the add window, but it's pre-filled with the address