Runtime initialisation of db_table from context

2008-05-28 Thread ChrisStoyles
Hi Everyone, I've been doing some prototyping with django to see how good of a fit it will be for an upcoming project, and would like to run an idea past you guys. I'll try and explain my situation first, and then ask the question afterward. At a very high level, I have an application, which hol

Re: newforms-admin customisation hook suggestions

2008-05-28 Thread Simon Willison
On May 29, 12:21 am, "Honza Král" <[EMAIL PROTECTED]> wrote: > We had some discussions during PyCon in Chicago, the biggest issue we > have with the hooks is the amount of code needed to change the widgets > > we talked with Joseph about something like widget-sets, a mapping prom > either field, o

Re: newforms-admin customisation hook suggestions

2008-05-28 Thread Honza Král
We had some discussions during PyCon in Chicago, the biggest issue we have with the hooks is the amount of code needed to change the widgets we talked with Joseph about something like widget-sets, a mapping prom either field, or perhaps field type to widgets, that could be easily defined - the sim

Re: Any reason for Field subclasses calling super on get_db_prep_save?

2008-05-28 Thread Alex Koshelev
Today it may be empty, but tomorrow there can appear some useful code. So I think its better to follow that style. On May 29, 12:57 am, "Leo Soto M." <[EMAIL PROTECTED]> wrote: > I see that almost all Field subclasses which implements > get_db_prep_save end calling Field.get_db_prep_save anyway.

Any reason for Field subclasses calling super on get_db_prep_save?

2008-05-28 Thread Leo Soto M.
I see that almost all Field subclasses which implements get_db_prep_save end calling Field.get_db_prep_save anyway. That's curious, because Field.get_db_prep_save is a no-op. Is it just some OOP style which we want to keep? -- Leo Soto M. http://blog.leosoto.com --~--~-~--~~---

Re: flatpages and 404

2008-05-28 Thread James Bennett
Sigh. In [7555] I added a warning to the flatpages docs to hopefully silence this issue once and for all. Note that I did this not because I feel it's necessary or appropriate, but because I'm just getting really, really, really tired of people complaining about this. Can we please let this one g

flatpages and 404

2008-05-28 Thread Carl Karsten
I just read over http://code.djangoproject.com/ticket/3335 and want to confirm a suspension that I would like to add to that 'thread' in an attempt to keep it closed: 404 processing happens, then the flat-pages code is given a chance to override it. This means that if the 404 processing fails

newforms-admin customisation hook suggestions

2008-05-28 Thread Simon Willison
We (GCap, large commercial radio company in the UK) have been developing against the newforms-admin branch for a few months now, and based on that experience I have a number of suggestions for simple hooks that could be added to make it easier to customise. 1. Provide a custom template for a chan

Re: ERROR:cannot import name Post -- while using django signals

2008-05-28 Thread Collin Grady
Usage questions belong on django-users - this list is for the development of django itself. -- Collin Grady --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send em

Re: Which editor for Django code ??

2008-05-28 Thread Justin Lilly
Seems you've done a bit of duplicate work. If you're in Textmate, try going to Text>Convert>Spaces to Tabs (or) Tabs to Spaces Should do what your script does, I think. -justin On Wed, May 28, 2008 at 12:46 PM, Daniel Bushman <[EMAIL PROTECTED]> wrote: > > I use Textmate (with the Django bundle

Re: Which editor for Django code ??

2008-05-28 Thread Daniel Bushman
I use Textmate (with the Django bundle) and soft-tabs. Sometimes If I paste code from the web there are indentation problems. Here's what I use for quick clean-up: * search for [tab] and replace with [4 spaces] (using soft-tabs) I recorded a macro which does "select all" and then performs thi

Re: newforms-admin FormSet API

2008-05-28 Thread Brian Rosner
> Should I be looking at any other documentation, or code, that you are > developing? Yes. What you have brought up is actually not the use case for formsets. However, you do bring up something that makes me want to clarify in the docs a bit more. When I say multiple forms per page, that reall

Re: newforms-admin FormSet API

2008-05-28 Thread Brian Rosner
On 2008-05-27 05:33:01 -0600, "Russell Keith-Magee" <[EMAIL PROTECTED]> said: > Is there any particular reason that you can't just add a Meta class to > this class definition, in the same way that a ModelForm works: > > class ArticleFormSet(FormSet) > class Meta: > form = ArticleFor

Re: On aggregates

2008-05-28 Thread Nicolas Lara
> > Providing a way to count different fields is a good idea, and the > approach you've described looks good to me. I just wanted to make sure > that the simplest case (count all instances) is trivial (i.e., doesn't > require explicit naming of the PK field). > This is fixed in the latest revisio

Re: {GSoC 2008}Django-Newcomments : A preview

2008-05-28 Thread Zhiwu Xie
Thanks a lot for the good work. A newbie here, and have a question on the comment model. Isn't it cleaner to look at the threaded comments in another way, e.g., if comment B is a reply to comment A, then the content_object of B is simply A instead of the original content object a comment is at

Re: Ability to specify a skeleton project

2008-05-28 Thread phillc
i would use it as well. i was actually thinking how on earth could i simplify the same thing i do for every single project (splitting settings.py to allow for revision control, splitting urls.py, etc.) On May 27, 8:30 am, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > Hi, > > This one sounds like a

Re: Google Summer of Code Markdown

2008-05-28 Thread phillc
another gigantic +1 On May 26, 8:51 am, rcs_comp <[EMAIL PROTECTED]> wrote: > On May 26, 6:27 am, Jonas Pfeil <[EMAIL PROTECTED]> wrote: > > > Also not Django specific but support for Markdown Extra would be super- > > cool: > > >http://michelf.com/projects/php-markdown/extra/ > > Big +1! --~--~-

Re: ERROR:cannot import name Post -- while using django signals

2008-05-28 Thread ravindra goyal
the code in the signals.py is like -- - from django.core.mail import send_mass_mail from django.template import Context, loader from ravi_admin.admin.models import Post -- -- Forwarded message -- From: ravindra goyal <[EMAIL PROTECTED]> Date: Wed, May 28, 200

Re: Multiple database support

2008-05-28 Thread koenb
On 22 mei, 18:28, "Ben Ford" <[EMAIL PROTECTED]> wrote: > Hi all, > > I've now re-applied Daryls patch (which was against qsrf) to a clone of > django trunk in a mercurial repo. It's available > athttp://hg.woe-beti.deandthere's a trac set up for it > athttp://trac.woe-beti.de. Feel free to make

ERROR:cannot import name Post -- while using django signals

2008-05-28 Thread ravindra goyal
http://www.mercurytide.co.uk/whitepapers/django-signals/ according to the documents in above URL i am trying to implement signals in django. but getting the following error --cannot import name Post please help me out how to include this Post signal in the model