How to initialize data into an extra form of a formset_factory?

2008-09-09 Thread bhunter
I'd like to pre-populate one of the data elements of the extra_form of a formset factory with a string, and it's not clear to me how to do this from the documentation, since formset_factory does not take initial as an argument. Here's an example: class FavoriteSearch(models.Model): search

Re: Url template tag errors post-8760, invalid literal for int

2008-09-02 Thread bhunter
Is it possible this is still broken? I just updated to r8883 and now some of my {% url %} tags are breaking. I'm seeing a TemplateSyntaxError because the argument is not being converted to a string before being resolved. In other words, this example is breaking: urls.py:

Re: Getting an IndexError when using distinct() and order_by()

2008-07-21 Thread bhunter
Ahh, never mind. Looks like it IS a bug, but a very new one: http://code.djangoproject.com/ticket/7791 On Jul 21, 6:27 pm, bhunter <[EMAIL PROTECTED]> wrote: > I have a perfectly legal query into my database.  When I add > 'order_by' some field, it gives the results just fine.

Getting an IndexError when using distinct() and order_by()

2008-07-21 Thread bhunter
I have a perfectly legal query into my database. When I add 'order_by' some field, it gives the results just fine. But when I add distinct() to it, it dies: >>> res.order_by('blk__name') [, , ,

OperationalError: database is locked

2008-07-03 Thread bhunter
Hi, I have a pretty simple app with about 7 models defined, generating probably about 15 tables or so. Just to test performance, I wrote a script that tries to populate the database with on the order of about 10,000 entries. On the backend, right now I'm using sqlite3 just for simplicity's

Re: الى من يريد مشاركتي معي في الموقع

2008-07-01 Thread bhunter
On Jul 1, 11:40 pm, "Juan Hernandez" <[EMAIL PROTECTED]> wrote: > im my lil' town this is called SPM :D That's why it's not relevant. :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: الى من يريد مشاركتي معي في الموقع

2008-07-01 Thread bhunter
On Jul 1, 8:30 pm, GLOBAL705 <[EMAIL PROTECTED]> wrote: >                                                       السلام عليكم > اما بعد اريد ان الفت انتباهكم الى انة مجموعة كلوبال705 افتتحة موقع من > محرك كوكل وهو موقع من تاسيس كوكل بيج فاذا ارادة احدا سواء انثى ام ذكر > ان ياتي معي الى الموقع

Re: Inheriting from auth.models.User

2008-06-30 Thread bhunter
Amazing! 5 minutes and dead-on answer. Thanks. The Django community rocks. PS Sorry for the RTFM question. On Jun 30, 1:29 pm, Ayaz Ahmed Khan <[EMAIL PROTECTED]> wrote: > bhunter wrote: > > This should be a simple question.  I'd like an Employee model.  First > > name

Inheriting from auth.models.User

2008-06-30 Thread bhunter
This should be a simple question. I'd like an Employee model. First name, last name, username, password--basically all the same stuff that's already in django.contrib.auth.models.User. Maybe I want some other things like salary, too. So, it makes sense that I should just inherit from this

Re: Django Database Relationship Question

2008-06-27 Thread bhunter
> And this is why the Django community rocks, two examples and a full > explaination with a link in less than 10 minutes, GW guys Absolutely! Thank you all so much! In just 15 minutes I had great answers from everyone. --~--~-~--~~~---~--~~ You received this

Django Database Relationship Question

2008-06-26 Thread bhunter
Hi, sorry for what is probably a trivial question, but I'm new to Django and a little fuzzy on databases in general, so I hope someone here can help. Just to keep the motif, I'll frame my question in terms of journalism. I'd like to set up a database with the following relationships: a model