Payments and admin panel - how to do?

2005-09-23 Thread Marek Pulczynski
Hi. I am developing payment application in django. The structure is straighforward - two models : client(name) payment(ForeignKey(client), date, amount, description). Each user pays monthly a fee which is not constant. I would like payments to be viewed as one table groupped my month TABBED or

Re: Payments and admin panel - how to do?

2005-09-23 Thread Adrian Holovaty
On 9/23/05, Marek Pulczynski <[EMAIL PROTECTED]> wrote: > Hi. I am developing payment application in django. The structure is > straighforward - two models : client(name) > payment(ForeignKey(client), date, amount, description). Each user > pays monthly a fee which is not constant. I would lik

Re: Payments and admin panel - how to do?

2005-09-23 Thread Adrian Holovaty
On 9/23/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > Hey Marek, > > I'd suggest writing a custom admin view for that. It sounds like your needs Whoop, I hit send before I finished writing... I'd suggest writing a custom admin view for that. It sounds like your needs go beyond what the admin

Re: meta.OneToOneField() problemo

2005-09-23 Thread Ian Maurer
> "svn diff" is great, in most cases. I just created this page, which > gives more details: > > http://code.djangoproject.com/wiki/PatchGuidelines Great, thanks... I felt dumb not knowing. Glad I asked. > > First, I ran into an issue with runtests.py since I use MySQL. The DB > > connection auto

How to extend Model ?

2005-09-23 Thread [EMAIL PROTECTED]
Hi, I'm playing around with django and have a question: My model changed during development: I added an extra field. How do I migrate the existing DB ? First I looked at django-admin, but found no help. As I'm developing there is no need to keep all data, so I tried dropping the tables relate

Re: How to extend Model ?

2005-09-23 Thread Ian Maurer
Checkout: http://www.djangoproject.com/documentation/django_admin/ You want the 'sqlclear' option which gives you the SQL needed. I just copy and paste it into my mysql session or you could dump it into a file and run that. good luck! ian On 9/23/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote

AW: [mailinglist] Re: How to extend Model ?

2005-09-23 Thread Uwe Schmitt
> > Checkout: > > http://www.djangoproject.com/documentation/django_admin/ > > You want the 'sqlclear' option which gives you the SQL needed. I just > copy and paste it into my mysql session or you could dump it into a > file and run that. > > good luck! > ian That was a *very fast* answer

Generic View's object vs. RSS' obj

2005-09-23 Thread Eugene Lazutkin
Hello, RSS templates use 'obj', generic view templates use 'object'. Isn't it a bit inconsistent? I know it's minor nitpicking but this inconsistency forces you to memorize exceptions. Why not "object" for all standard templates to denote a singular main object? Or "obj" but everywhere consist

AW: Non-model driven ordering

2005-09-23 Thread Matt
What would be the Djangonic (?) way of handling the following situation: I have a set of objects that need to be presented to the user in some specified order not related to any data in the model (let's say the ordering is based on the editors whim and not by object name or published date) The o

Re: Generic View's object vs. RSS' obj

2005-09-23 Thread Adrian Holovaty
On 9/23/05, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > RSS templates use 'obj', generic view templates use 'object'. Isn't it a bit > inconsistent? I know it's minor nitpicking but this inconsistency forces you > to memorize exceptions. Why not "object" for all standard templates to > denote a s

Re: Non-model driven ordering

2005-09-23 Thread Adrian Holovaty
On 9/23/05, Matt <[EMAIL PROTECTED]> wrote: > I have a set of objects that need to be presented to the user in some > specified order not related to any data in the model (let's say the > ordering is based on the editors whim and not by object name or > published date) Hey Matt, You're right --

Re: Non-model driven ordering

2005-09-23 Thread Matt
Cool. And I sort of have it working. class Pizza: name = meta.CharField(maxlength=100) class Topping: name = meta.CharField(maxlength=100) pizza = meta.ForeignKey(Pizza, edit_inline=meta.TABULAR) class META: admin = meta.Admin() order_with_respect_to = 'pizza' On the p

Re: Non-model driven ordering

2005-09-23 Thread Adrian Holovaty
On 9/23/05, Matt <[EMAIL PROTECTED]> wrote: > On the pizza admin page I have an inline list of pizza toppings. I get > an Ordering section with a non-editable ordering text box. I also see > some nifty looking boxes on the right-hand side that change color when > I hover over. Unfortunately I c

Re: Non-model driven ordering

2005-09-23 Thread Matt
Just created a new app from scratch and still no ordering. Was trying with IE earlier, now with Safari and Firefox. Firefox gives me this error: Error: Drag is not defined Source File: http://localhost:8000/media/js/admin/ordering.js Line: 20 Further investigation reveals the problem: http://

Konqueor 3.5 beta bug with admin screens

2005-09-23 Thread [EMAIL PROTECTED]
A warning for other Konqueror users: In the just-released KDE 3.5 beta (KDE 3.4.91), the Django admin screens that have datetime fields and calendars cause KHTML to freeze. This didn't happen in 3.4.0, and I'm hoping it will be fixed for 3.5 Bug report here, vote for it if you are concerned: ht

Re: Konqueor 3.5 beta bug with admin screens

2005-09-23 Thread Matthew Marshall
On Saturday 24 September 2005 12:25 am, [EMAIL PROTECTED] wrote: > A warning for other Konqueror users: > > In the just-released KDE 3.5 beta (KDE 3.4.91), the Django admin > screens that have datetime fields and calendars cause KHTML to freeze. > This didn't happen in 3.4.0, and I'm hoping it wil

Re: Non-model driven ordering

2005-09-23 Thread Matt
Ok, this is as far as I can go tonight... explicitly adding _order = meta.IntegerField(null=True) to my Topping model makes the admin list page work. But the sql then has 2 _order fields in the create table, and the detail admin form fails with: TemplateSyntaxError: Variables and attribute

Re: Non-model driven ordering

2005-09-23 Thread Andreas
> Also trying to go to the toppings list page in the admin I get the > following error: > [..] > FieldDoesNotExist: name=_order I had this problem too. Adrian suggested, as a workaround, adding something like ordering='name' in the meta.admin()-call. See http://groups.google.com/group/django-user