Re: Web framework frustration

2006-03-18 Thread James Bennett
On 3/19/06, George Sakkis <[EMAIL PROTECTED]> wrote: > I understand that this is going to be more of a rant than an objective > analysis, but after wasting a whole day reading the docs and digging > into magic (even in the magic-removal branch) largely undocumented > code, I still haven't got the

Re: Web framework frustration

2006-03-18 Thread coulix
i got the calendar js working fine in my app, copy all admin/js to your media folder. and you can even change the aspect of it by adding some css in your main shylesheet. now, i dont have the code anymore ... i remember i ahd to do a trick about the /js18/ stuff. --~--~-~--~~---

Re: Quick thanks to django team - I deployed my first app

2006-03-18 Thread coulix
do post a full example :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL

Re: Quick thanks to django team - I deployed my first app

2006-03-18 Thread Kenneth Gonsalves
On Sunday 19 Mar 2006 12:26 pm, coulix wrote: > please do. ? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Web framework frustration

2006-03-18 Thread George Sakkis
I understand that this is going to be more of a rant than an objective analysis, but after wasting a whole day reading the docs and digging into magic (even in the magic-removal branch) largely undocumented code, I still haven't got the fancy calendar and time javascript admin widgets working in m

Re: Quick thanks to django team - I deployed my first app

2006-03-18 Thread coulix
please do. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For

Re: ProgrammingError ... after adding new field to my model ...

2006-03-18 Thread Kenneth Gonsalves
On Sunday 19 Mar 2006 7:17 am, ZebZiggle wrote: > Thoughts? if its postgres and you have put double quotes " instead of ' around a variable, postgres thinks it is a column name -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! --~--~---

Re: ProgrammingError ... after adding new field to my model ...

2006-03-18 Thread ZebZiggle
It's definitely there and the database looks fine. I suspect the problem is elsewhere ... the value being inserted into the database is being mangled (as illustrated above), which makes me believe it's confusing the value for the field name or something. Essentially ... how did the value get conve

Re: ProgrammingError ... after adding new field to my model ...

2006-03-18 Thread Kenneth Gonsalves
On Sunday 19 Mar 2006 7:04 am, ZebZiggle wrote: > I did a django-admin "sqlclear" followed by an "install"... as > I've done every other time I modify my model. Is there something > else I need to do? the error message says the field is not there - inspect the database and check if it is there

Re: ProgrammingError ... after adding new field to my model ...

2006-03-18 Thread Kenneth Gonsalves
On Sunday 19 Mar 2006 6:55 am, Kenneth Gonsalves wrote: > On Sunday 19 Mar 2006 12:01 am, ZebZiggle wrote: > > ERROR: relation "ph01990j" does not exist INSERT INTO > > "mydarksecret_scriptelements" > > ("script_id","scene","type","characterFirstName","characterLast > >Na me","characterNickName","

Re: ProgrammingError ... after adding new field to my model ...

2006-03-18 Thread ZebZiggle
I did a django-admin "sqlclear" followed by an "install"... as I've done every other time I modify my model. Is there something else I need to do? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group

Re: ProgrammingError ... after adding new field to my model ...

2006-03-18 Thread Kenneth Gonsalves
On Sunday 19 Mar 2006 12:01 am, ZebZiggle wrote: > ERROR: relation "ph01990j" does not exist INSERT INTO > "mydarksecret_scriptelements" > ("script_id","scene","type","characterFirstName","characterLastNa >me","characterNickName","avatarFilename","isMurdeR you have added the field in the model bu

ProgrammingError ... after adding new field to my model ...

2006-03-18 Thread ZebZiggle
Hey guys, (0.91 branch) I recently added a new field to one of my model classes, now whenever I attempt to save() a new record I get a ProgrammingError. The call looks like this: element = ScriptElement(script = script, scene = 0, type = CHARACTER_ELEMENT, characterFirstName = firstName, chara

Re: How to get vote total in poll tutorial

2006-03-18 Thread Glenn Tenney
On Fri, Mar 17, 2006 at 10:57:14PM -0800, [EMAIL PROTECTED] wrote: > No, one underscore doesn't work: > choices.get_values(fields=['poll', 'votes'], poll_id=1) > returns > TypeError: got unexpected keyword argument 'poll_id' > > I'm using two underscores because that's my (limited) understandin

Re: Joining foreign keys backwards?

2006-03-18 Thread Julio Nobrega
On 3/18/06, Ned Batchelder <[EMAIL PROTECTED]> wrote: > > Or something like that, I'm backtranslating from my real app. Is there > a cleaner way? I think you can do this... Not very clean, but I just had lunch and I am feeling sleepy. poll_list = [] choice_list = choices.get_list(choice__exac

transactions ?

2006-03-18 Thread Julien Cigar
Hello, I just discovered Django a few days ago and wondered if it's possible to enclose multiple .save() in one transaction ? I would like to do something like : try: object1.save() object2.save() object3.save() something.commit() except: something.rollback() and if something like th

Re: Joining foreign keys backwards?

2006-03-18 Thread Ned Batchelder
Don, thank, but the relationship here is one-to-many.  Are you suggesting artificially making it many-to-many to get the methods I need? --Ned. Don Arbow wrote: Check out the docs about many-to-many relationships. The link below talks exactly about what you are asking. http://www.django

Re: Joining foreign keys backwards?

2006-03-18 Thread Don Arbow
Check out the docs about many-to-many relationships. The link below talks exactly about what you are asking. http://www.djangoproject.com/documentation/db_api/#many-to-many- relations On Mar 18, 2006, at 8:05 AM, Ned Batchelder wrote: > > I want to select objects based on their relationships

Re: Joining foreign keys backwards?

2006-03-18 Thread Ivan Sagalaev
Ned Batchelder wrote: > polls.get_list(choice__choice__exact="overeasy") # Doesn't work. > >Am I wrong? Please tell me there is a way to accomplish what I want. >This is all in .91. > AFAIK this is one of the thing that magic-removal is solving. There you would have Poll.choice_set which

Joining foreign keys backwards?

2006-03-18 Thread Ned Batchelder
I want to select objects based on their relationships with related objects, but I don't seem to be able to do it, because I'm trying to use a foreign key in the "wrong" direction. For example, in the Polls and Choices model, I can do this (from the docs): choices.get_list(poll__slug__exact

Re: LIKE operator

2006-03-18 Thread Ivan Sagalaev
PythonistL wrote: >Is LIKE operator supported in Django? > >I would like to perform a pattern match. > >For example something like this: > >SELECT name FROM metal WHERE name LIKE '%er%', > > metals.get_list(name__contains='er') --~--~-~--~~~---~--~~ You receiv

LIKE operator

2006-03-18 Thread PythonistL
Is LIKE operator supported in Django? I would like to perform a pattern match. For example something like this: SELECT name FROM metal WHERE name LIKE '%er%', where name is a field of table . That above will return results that contain 'er' anywhere in a field name. Regards, B. --~--~--

Re: Am i doing the right thing. Form working, advice needed.

2006-03-18 Thread coulix
forgot this line in "if not errors" manipulator.save(new_data) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe

Am i doing the right thing. Form working, advice needed.

2006-03-18 Thread coulix
Hello i was writing a changePasswordForm manipulator when i realised there were already one. The problem is that the raise Validator error message are in english. Is there a way to translate them ? apart of rewriting the class in my view. Now here is my mehod code in my application view.py what

Re: Many to one screwed up in admin

2006-03-18 Thread Kenneth Gonsalves
On Saturday 18 Mar 2006 4:12 pm, Todd O'Bryan wrote: > class Datum(meta.Model): >      kind = meta.IntegerField(choices=DATUM_KINDS) >      numericValue = meta.IntegerField(blank=True, null=True) >      textValue = meta.TextField(blank=True) >      question = meta.ForeignKey(Question, > edit_inlin

Re: Many to one screwed up in admin

2006-03-18 Thread Todd O'Bryan
from django.core import meta from django.models.auth import User QUESTION_KINDS = ( (0, 'Multiple Choice'), (1, 'Fill in the Blank'), ) DATUM_KINDS = ( (0, 'Text'), (1, 'Possible Answer'), (2, 'Correct Answer'), (3, 'Explanation'), ) # Create your models here. clas