Re: Removing core fields (and a new edit-inline interface)

2005-12-19 Thread oggie rob
Jacob says: > Yeah, I don't think I explained myself well enough; let me give a concrete > example of why I'd like this: Thanks, Jacob, it helps to see things from other perspectives and especially in that case I agree the gains are well worthwhile. I was thinking also about how this might work

Re: Removing core fields (and a new edit-inline interface)

2005-12-19 Thread Jacob Kaplan-Moss
On Dec 19, 2005, at 10:30 PM, oggie rob wrote: Jacob says: I kinda think it should be:: class Poll(Model): ... class Choice(Model): poll = ForeignKey(Poll) class ADMIN: edit_inline_on_relation = 'poll' But in (almost?) all other ways the admin section r

Re: Removing core fields (and a new edit-inline interface)

2005-12-19 Thread oggie rob
Jacob says: > I kinda think it should be:: > > class Poll(Model): > ... > > class Choice(Model): >poll = ForeignKey(Poll) > >class ADMIN: >edit_inline_on_relation = 'poll' But in (almost?) all other ways the admin section represents the view for the current

Re: Removing core fields (and a new edit-inline interface)

2005-12-19 Thread Jacob Kaplan-Moss
On Dec 19, 2005, at 8:48 PM, oggie rob wrote: One comment: something that has been bugging me for a while is the location where you specify the inline behaviour. For example (using the Poll/Choice models): class Choice(meta.Model): poll = meta.ForeignKey(Poll, edit_inline=meta.STACKED, num_

Re: Removing core fields (and a new edit-inline interface)

2005-12-19 Thread oggie rob
> Questions? Comments? Concerns? One comment: something that has been bugging me for a while is the location where you specify the inline behaviour. For example (using the Poll/Choice models): class Choice(meta.Model): poll = meta.ForeignKey(Poll, edit_inline=meta.STACKED, num_in_admin=3) S

Re: Proposal: Extending Django DB syntax

2005-12-19 Thread Russell Keith-Magee
On 12/19/05, Robert Wittams <[EMAIL PROTECTED]> wrote: > > There are quite a lot of changes in this area being considered in the > magic-removal branch. I figured as much. Is there any sort of estimated timeframe for the merge of the magic-removal branch into the trunk? > Here are a few example

Re: Removing core fields (and a new edit-inline interface)

2005-12-19 Thread Jacob Kaplan-Moss
On Dec 19, 2005, at 6:55 PM, Eugene Lazutkin wrote: If you need any help, write me. I will; thanks. I would suggest to keep an eye on potential reusability of your widgets. It would be nice to use them in custom interfaces. Yeah, depending on how well it works I might write Dojo widgets

Re: Removing core fields (and a new edit-inline interface)

2005-12-19 Thread Eugene Lazutkin
"Jacob Kaplan-Moss" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > (c) the new edit-inline interface will rely heavily on Javascript (AJAX) > to do its job. +1. > Also, this means it's probably time to decide on a JS toolkit to bundle > with Django and use in the admin. As

Re: Proposal: Extending Django DB syntax

2005-12-19 Thread Russell Keith-Magee
> > 2) A 'columns' keyword to restrict column returns > This already exists; look at the get_values() function: Right idea, not quite the complete implementation. 'fields' only applies to get_values, and the 'fields' kwarg isn't utilized by the sql query itself. The SQL query still retrieves all

Removing core fields (and a new edit-inline interface)

2005-12-19 Thread Jacob Kaplan-Moss
Hey folks -- I'm starting to gear up on the removing core fields bit, and before I get too deep into it I want to run my plan by everyone: First, "core" as a field option will die. Until 1.0 it will be accepted and ignored -- but django-admin validate will complain about it. 1.0 will r

Re: HttpServer as a Windows Service

2005-12-19 Thread Adrian Holovaty
On 12/19/05, Dody Suria Wijaya <[EMAIL PROTECTED]> wrote: > I agree. Part of the reason Plone was really popular because it's so > easy to install, and behave like normal Windows software. This means > daemon-like software always present as Windows Service, and get > started/stopped via familiar i

Re: HttpServer as a Windows Service

2005-12-19 Thread David Pratt
Hi Adrian. I have been doing a bit more investigating today and some threading experiments first. Maybe something will come from it. Like I say, I am not a Windows person myself ;-). I will also likely try a couple other servers to see where this goes. It may just be experimentation for now u

Re: HttpServer as a Windows Service

2005-12-19 Thread Dody Suria Wijaya
I agree. Part of the reason Plone was really popular because it's so easy to install, and behave like normal Windows software. This means daemon-like software always present as Windows Service, and get started/stopped via familiar interface. Django so far has not as easy as it could be. Packa

Re: HttpServer as a Windows Service

2005-12-19 Thread David Pratt
Thanks for this. I have been reading up quite a bit on threading and also windows services. I am not much of a windows user but sometimes you find yourself needing to do things with it. For me Mac is great and Unix of course. Regards, David PythonistL wrote: David, Check this http://group

Re: Magic removal stuff...

2005-12-19 Thread [EMAIL PROTECTED]
Robert Wittams wrote: > I noticed louie requires python 2.4. Django is currently supporting 2.3 > upwards. How hard would it be to support 2.3? Louie 1.0 is now out, and supports both Python 2.3 and Python 2.4: http://cheeseshop.python.org/pypi/Louie

Re: Recursion in templates

2005-12-19 Thread [EMAIL PROTECTED]
Help! I'm _completely_ snowed under- does anyone else feel like moving this code across from Melt? Cheers, Matt

Re: HttpServer as a Windows Service

2005-12-19 Thread Adrian Holovaty
On 12/19/05, David Pratt <[EMAIL PROTECTED]> wrote: > Hi Ian. Thanks for your reply. It does, however I was looking at this > from the perspective of running the small httpserver as its own service > when Django is installed on a Windows machine for development. Is there > any interest in this? H

Re: Request params problem

2005-12-19 Thread Daniel Poelzleithner
plisk wrote: > Yeah, its OK to have more than one value of the same param and wrap all > of them in the list. But when you have only one parameter value passed > making a list for it is at least inconsistent with the value you get > from request.GET['param'] which is just a scalar and this also br

Re: HttpServer as a Windows Service

2005-12-19 Thread PythonistL
David, Check this http://groups.google.com/group/comp.lang.python/browse_frm/thread/a96176dc9f3a83c9/ea6b8addfc702605#ea6b8addfc702605 It may help

[magic-removal] New field type creation

2005-12-19 Thread Nebojša Đorđević - nesh
I'm working on implementation of I18NCharField, so far I come with this: class I18NCharField(RelatedField): def __init__(self, *args, **kwargs): self.from_ = None self.maxlength = kwargs['maxlength'] super(I18NCharField, self).__init__(*args, **kwargs) # def

Re: Request params problem

2005-12-19 Thread plisk
I see, but what you get on admin forms from GET is hardly expected. So i guess this part in add_stage should be fixed ? I'll file a ticket for it. Lines 432-436 of django/contrib/admin/views/main.py # Add default data. new_data = manipulator.flatten_data() # Override the

Re: Request params problem

2005-12-19 Thread Adrian Holovaty
On 12/19/05, plisk <[EMAIL PROTECTED]> wrote: > Is it expected behaviour when opening /foo/?test=1 request.GET['test'] > returns 1, but request.GET returns {'test': ['1']}, where '1' is > enclosed in the list ? Shouldn't it also be just {'test': '1'} ? > Because of this you can see on the add form

Re: Proposal: Extending Django DB syntax

2005-12-19 Thread Jacob Kaplan-Moss
Hey Russ - I'm still reading through your proposal, but one quick note: On Dec 19, 2005, at 12:30 AM, Russell Keith-Magee wrote: 2) A 'columns' keyword to restrict column returns This already exists; look at the get_values() function: http:// www.djangoproject.com/documentation/db_api/#get-

Re: HttpServer as a Windows Service

2005-12-19 Thread David Pratt
Hi Ian. Thanks for your reply. It does, however I was looking at this from the perspective of running the small httpserver as its own service when Django is installed on a Windows machine for development. Is there any interest in this? Regards, David Ian Holsman wrote: doesn't Apache HTTP

Re: Django Admin Error/Bug

2005-12-19 Thread Burhan
I changed the app name to backend, and things are working great now. The process is not easy, so I noted the steps required. I did not know if there was an automated way to do this, if there is -- please let me know. 1. rename the directory under apps directory to your new app name 2. edit /apps

Re: Proposal: Extending Django DB syntax

2005-12-19 Thread Robert Wittams
Russell Keith-Magee wrote: > Hi all, > > I have a few suggestions that I think could increase the the > capabilities and expressiveness of Django DB query syntax. The > modifications are aimed at increasing usage of Django DB syntax (in > preference to embedded raw SQL), and increasing the range

Re: Request params problem

2005-12-19 Thread plisk
Yeah, its OK to have more than one value of the same param and wrap all of them in the list. But when you have only one parameter value passed making a list for it is at least inconsistent with the value you get from request.GET['param'] which is just a scalar and this also breaks some parts in ad

Re: Request params problem

2005-12-19 Thread Dody Suria Wijaya
Isn't it's permissible to have multiple parameter names in HTML? like: /foo/?id=1&id=2 --> {'id':['1','2']} instead of overwriting each other... plisk wrote: Hi all, Is it expected behaviour when opening /foo/?test=1 request.GET['test'] returns 1, but request.GET returns {'test': ['1']}, wh

Request params problem

2005-12-19 Thread plisk
Hi all, Is it expected behaviour when opening /foo/?test=1 request.GET['test'] returns 1, but request.GET returns {'test': ['1']}, where '1' is enclosed in the list ? Shouldn't it also be just {'test': '1'} ? Because of this you can see on the add forms in admin in text fields values like ['bar']

Re: Strange error in magic-removal manipulator unit test

2005-12-19 Thread hugo
> the _() global translation function is getting reassigned to a >dictionary. See the test output below. Weird. Did you add a print to see _what_ is assigned to _? Maybe there is some code in there where _ is used as an anonymous variable (seen that in the code in several places) and so the built