Re: Django, initial data and custom SQL

2009-02-10 Thread ludvig.ericson
On Feb 10, 1:13 pm, Johan Bergström wrote: > Since Django executes my custom SQL before creating indexes, it's > impossible to achieve something that hooks into initdb/syncdb. I know > that it is "good custom" to create indexes after inserting data – but > fixtures in Django is already executed a

Re: Arbitrary objects in urlconf

2008-10-31 Thread ludvig.ericson
On Oct 29, 8:06 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > You can already do what your proposal would allow in middleware as > seen here:http://www.b-list.org/weblog/2007/nov/06/urlconf/ Yes, that's one way. But there's an issue with this: it breaks reverse mappings, which I use a lot

Re: webpage can't import javascipt on Django web Server!!

2008-10-05 Thread ludvig.ericson
On Oct 5, 5:50 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > This mailing list is for discussion of developing Django itself, not usage > problems with Django.  Your question belongs on django-users, not here. It actually has nothing to do with Django at all. --~--~-~--~~---

Re: Lost stdout and stderr on fcgi with Django

2008-06-03 Thread ludvig.ericson
On Jun 2, 7:12 am, The Code Janitor <[EMAIL PROTECTED]> wrote: > The problem is that I am loosing [sic] stdout and stderr. Yes, that's how most FastCGI spawners work. They close all file descriptors, and open a new socket, then duplicate that socket's FD onto a constant known as FCGI_LISTENSOCK_F

Re: API question for model saving

2008-04-28 Thread ludvig.ericson
> (1) Model.save(must_create=None) where "must_create" is True (must > create), False (must not create) or None (try an update; if that fails, > insert). > > (2) Model.save(method=DEFAULT) and this time "method" takes one of three > constant values (making up the names a bit): "DEFAULT", "MUST_CRE

Re: Maybe DEBUG=True should only record the last N SQL queries?

2008-04-21 Thread ludvig.ericson
On Apr 21, 12:40 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > -1 here too, for exactly the same reason. Add to that the inevitable > Murphyism that the one time you specify N=10 will be the time that the > 11th oldest query will be the one causing the problem. I agree, though my suggest

Re: Some of newforms-admin branch files have DOS mode line endings!!!

2008-04-20 Thread ludvig.ericson
> Same goes for ignoring pyc files everywhere. You can tell Subversion to add global ignores on your side of it. See ~/.subversion/config. As for Windows, I don't know. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: PAM Auth backend for Django

2008-04-05 Thread ludvig.ericson
On Mar 26, 5:38 pm, Thejaswi Puthraya <[EMAIL PROTECTED]> wrote: > * Improving the existing bindings: The existing bindings > (http://www.pangalactic.org/PyPAM/) are bug-ridden with lot of memory leaks, > hasn't been tested with python2.5 and don't expose the full C API. > This part of the projec

Re: Should manage.py startapp create a urls.py file?

2008-02-11 Thread ludvig.ericson
+0, but I think it's the wrong way to go about it. What is needed is an easy way to add to the skeleton, on a per-user (or rather, per- Python?) installation basis. Not saying that all files from a certain directory should be copied if they exist, rather something like: python manage.py start

Re: Choice lookups

2007-10-31 Thread ludvig.ericson
On Oct 30, 6:26 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > It's always bugged me a little that choice lookups are based on the raw value. Agreed, but bloating the API doesn't solve that. Oh and a tip: FOO_CHOICES = enumerate(("foo", "bar")) Throw on a tuple() if you want to use the in

Re: Multiple PKs and "is_stored"

2007-08-31 Thread ludvig.ericson
On Aug 31, 2:39 am, David Cramer <[EMAIL PROTECTED]> wrote: > Intially is_stored is set to None. When you do a .get or .create it > would then set it to True. When you delete, it would set to False. > > A big that this does solve, beyond fixing my multiple pks, is explicit > calls. > > - Calling .

Re: Unhandled exception if object with existing unique key saved

2007-08-19 Thread ludvig.ericson
Well actually, I see implementation leakage in the API here. Does it make sense that the Django ORM raises SQLite3 exceptions? I wouldn't want _to try to try to_ catch either of all integrity exceptions. Perhaps something like 'django.db.IntegrityError' or so. Ludvig Ericson --~--~-~-

Re: Proposal: runserver --with-fixture

2007-08-15 Thread ludvig.ericson
On Aug 14, 11:19 pm, "Adrian Holovaty" <[EMAIL PROTECTED]> wrote: > On 8/14/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > > I would suggest that rather than trying to make the --with-fixture > > flag handle all this, it would be better to do this as a top level > > command, i.e.: > > > dj

Re: Cleaning up memcached connections

2007-08-12 Thread ludvig.ericson
Don't see no harm in adding the close() hook, but as mr. Batchelder said, I'd say it's the wrong thing to do. If the connections really are dangling, I'd say there's a much larger issue to deal with. Sincerely, Ludvig Ericson On Aug 11, 1:57 am, Ned Batchelder <[EMAIL PROTECTED]> wrote: > This

Re: How to validate a model as a whole?

2007-08-06 Thread ludvig.ericson
Any suggestions for what to do in the meantime? :-\ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe f

Re: Request data encoding

2007-08-02 Thread ludvig.ericson
On Aug 2, 11:02 pm, Gábor Farkas <[EMAIL PROTECTED]> wrote: > Jacob Kaplan-Moss wrote: > > On 8/2/07, Daniel Brandt <[EMAIL PROTECTED]> wrote: > >> I am recieving POST-data that is submitted to my application not via a > >> form or a browser, but from other web applications, according to a > >>

Re: Removing leading and trailing whitespace in forms.CharField clean method

2007-04-30 Thread ludvig.ericson
On Apr 29, 7:06 pm, "Adrian Holovaty" <[EMAIL PROTECTED]> wrote: > On 4/29/07, Mike Thompson <[EMAIL PROTECTED]> wrote: > > > Is there any interest or value in removing leading and trailing > > whitespace as part of the forms.CharField clean method? > > I don't think it's a good idea to offer this

django/db/models/base.py - getattr with default?

2007-04-15 Thread ludvig.ericson
In latest SVN (as of writing) you see this in said file: 48 if getattr(new_class._meta, 'app_label', None) is None: 49 # Figure out the app_label by looking one level up. 50 # For 'django.contrib.sites.models', this would be 'sites'. 51 new_class._me