Re: manipulator.save() and manytomany relationship

2006-03-29 Thread limodou
On 3/30/06, yml <[EMAIL PROTECTED]> wrote: > > I don't set any value for the profile_id. This attribute where added by > django, I guess in order to have a "primary key". > If I comment the line with set_localisation (which is my many to many > relation) I do not get this error so I do not see

Re: manipulator.save() and manytomany relationship

2006-03-29 Thread yml
I don't set any value for the profile_id. This attribute where added by django, I guess in order to have a "primary key". If I comment the line with set_localisation (which is my many to many relation) I do not get this error so I do not see why I should care about this with this additional

Re: Custom templatetags are ignored. Why ?

2006-03-29 Thread Max Battcher
ak wrote: > After a bit of research I found that my templatetags dir has > __init__.pyc file and it tells me that django tried to include this > directory but my news_tags.py file has no .pyc Sounds like you have a syntax error in news_tags.py. Try importing it within a Python shell.

Re: Custom templatetags are ignored. Why ?

2006-03-29 Thread ak
Sorry guys it was my stupidity :) I should have written {% load news_tags %} instead of {% load "news_tags" %} --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: manipulator.save() and manytomany relationship

2006-03-29 Thread yml
hello limodou, you have been of great help till now, thank you for your time. I tried list because I was not working without: temp.set_localisation(list(new_data['localisation'])) = error page with: list(new_data['localisation'])

Re: follow relationship

2006-03-29 Thread Ned Batchelder
What I've done in these cases is to define a Constants class:     class Constants:     """ Construct one of these with keyword arguments, and you can use the     attributes.     """         def __init__(self, **kwargs):     for k, v in kwargs.items():    

Re: manipulator.save() and manytomany relationship

2006-03-29 Thread limodou
On 3/30/06, yml <[EMAIL PROTECTED]> wrote: > > Hello djangonauts, > > I wrote my first manipulator and there is still some part that I am not > understanding. > I have the feeling that I am missing something obvious in the save > function of my manipulator but I am unable to improve it. > > I

Re: limit_choices_to

2006-03-29 Thread Luke Plant
On Monday 27 March 2006 16:50, [EMAIL PROTECTED] wrote: > I've just used the first bit of Luke's wheeze- storing the user.id > and stuffing it in the model's save method. > I had to put 'null-True' in the model to get the user.id bit of this > to work. Otherwise the 'if self.officer_id is None:'

Re: limit_choices_to

2006-03-29 Thread Luke Plant
On Sunday 26 March 2006 21:01, tonemcd wrote: > I think that this http://lukeplant.me.uk/blog.php?id=1107301634 might > be helpful. There's also been some traffic on limit_choices_to in the > group recently (although not strictly relevent to your problem I > think) Note that this blog entry

Re: Overthinking urls.py?

2006-03-29 Thread Todd O'Bryan
Is it possible to do it all in urls.py? I don't know much about Python, yet, but could you have two way look-up. urls.py has the URL- >View handled. Could you stick in a dictionary based on classes (and PKs, maybe) that would return the appropriate URL? Todd On Mar 29, 2006, at 10:38 AM,

Re: OneToOneField

2006-03-29 Thread Joseph Kocherhans
On 3/29/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > > If someone would file a ticket for this (if they haven't already) that > would be great. I'll look at it in a few days if no one else has. I'm > trying to wrap up some other project this week. Oops. Nevermind about filing a ticket. I

Re: How to get vote total in poll tutorial

2006-03-29 Thread JHeasly
> > Then you probably want it to read: > choices.get_values(fields=['poll', 'votes'], poll_id__exact=1) > > i.e. your "field" is "poll_id" and the lookuptype is "exact" > which translates to "poll_id__exact", and THEN the equals sign > and what value you are asking it to match. > > -- > Glenn

Re: Searching in a foreign table field

2006-03-29 Thread Jaime G. Wong
Thanks Tabo, that's it. On Wed, Mar 29, 2006 at 09:00:39PM -, Gustavo Picon wrote: > > You have to specify in what field of the FK object you want the search > to work. For instance if there is a "name" field in the Song model, you > may want to try: > > search_fields =

Re: OneToOneField

2006-03-29 Thread Joseph Kocherhans
On 3/29/06, layik <[EMAIL PROTECTED]> wrote: > > Hello there, > > sorry to bother you. > > I was wondering if you have solved your OneToOne problem. if so could > let me know how I could solve it as well?? > thanks > > > ChaosKCW wrote: > > Agreeded, I am trying to use OneToOne in MR branch and

Re: Overthinking urls.py?

2006-03-29 Thread Adrian Holovaty
On 3/29/06, James Bennett <[EMAIL PROTECTED]> wrote: > On 3/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > And now you're encoding URLs (which are, in my mind, definitely > > presentation-related) in the models? > > It's not something new; it's been this way since the first public >

Re: follow relationship

2006-03-29 Thread Ivan Sagalaev
Todd O'Bryan wrote: >Your comment at the end got me thinking, though. Writing > >trunk.get_branch(kind__exact=2) > >is not very illuminating, but you're correct that the value 'Dead' >could get changed later. In Java, I'd use constants for the integer >values > >public static final int DEAD

Re: Mysterious thread problem

2006-03-29 Thread yuri
Yip, we had the same problem, it's to do with the time change that happened 2 days ago. To cut a long story short, set the timezone in your settings file to TIME_ZONE = "" Django will then use the timezone returned by windows. The problem is that in django.conf.settings.py, line 64, it sets the

Re: Get objects in _manipulator_validate_.....() methods

2006-03-29 Thread Matthew Flanagan
On 3/29/06, Rudolph <[EMAIL PROTECTED]> wrote: > > I'm writing a _manipulator_validate_.() method. These methods > become methods for the manipulator of a model and will be validated > before save() is called. Any exception of validators.ValidationError > will very nicely be displayed in the

Re: admin apache solved? / now mysql problem

2006-03-29 Thread abe
Andy Dustman wrote: > On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > Andy Dustman wrote: > > > On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > > Andy Dustman wrote: > > > > > On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > OperationalError: (2002, "Can't connect to local MySQL

Re: What is Caching my DB

2006-03-29 Thread Michael Twomey
On 3/28/06, Siah <[EMAIL PROTECTED]> wrote: > > Thank you Michael, > > I must add that on my laptop using django's runserver command, this > problem does not exist. > > I am still stock, so all help is greatly appreciated, Ok, so much for that theory :) Another possibility might be some kind of

Re: ANN:Woodlog Testing

2006-03-29 Thread yml
hello limodou, I was think to start developing something similar to add it to a portal I am working on. Of course I would have done it with a less talent than you. :-) Are you going to open source it that I could learn from your source and use it Good job

Re: admin apache solved? / now mysql problem

2006-03-29 Thread abe
Todd O'Bryan wrote: > On Mar 28, 2006, at 8:20 AM, Andy Dustman wrote: > > On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > >> OperationalError: (2002, "Can't connect to local MySQL server through > >> socket '/var/lib/mysql/mysql.sock' (13)") > > > > This indicates your MySQL server isn't

Re: Assigning default value for field in admin

2006-03-29 Thread Daniel Bimschas
Hey that looks great! Thanks a lot, it will do for my purposes! 2006/3/27, tonemcd <[EMAIL PROTECTED]>: > > This looks like it might help, > http://lukeplant.me.uk/blog.php?id=1107301634 although it's not exactly > what you're after... > > Cheers, > Tone > > > >

Re: Overthinking urls.py?

2006-03-29 Thread James Bennett
On 3/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > And now you're encoding URLs (which are, in my mind, definitely > presentation-related) in the models? It's not something new; it's been this way since the first public release of Django. Adrian and others have said elsewhere that it's

Re: Flatpages and comments - question

2006-03-29 Thread ak
Ok found the answer myself. I added at the bottom of content block: {% if flatpage.enable_comments %} {% load comments %} {% free_comment_form for flatpages.flatpages flatpage.id %} etc ... --~--~-~--~~~---~--~~ You received this message because you are

Re: Overthinking urls.py?

2006-03-29 Thread limodou
On 3/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Adrian Holovaty wrote: > > The convention is to put the URL-creation logic in your models, in a > > get_absolute_url() method. Here's a quick example: > > > > class Person(meta.Model): > > gender =

Re: Overthinking urls.py?

2006-03-29 Thread [EMAIL PROTECTED]
Adrian Holovaty wrote: > The convention is to put the URL-creation logic in your models, in a > get_absolute_url() method. Here's a quick example: > > class Person(meta.Model): > gender = meta.CharField(maxlength=1) # 'm' or 'f' > full_name = meta.CharField(maxlength=50) > >

Re: OneToOneField

2006-03-29 Thread layik
Hello there, sorry to bother you. I was wondering if you have solved your OneToOne problem. if so could let me know how I could solve it as well?? thanks ChaosKCW wrote: > Agreeded, I am trying to use OneToOne in MR branch and get the same > problems. > > I have: > > class

Re: OneToOneField

2006-03-29 Thread layik
might be a too late reply but could any of you tell me what MR Branch or svn Trunk that you are tlkaing about is? I am sorry I dont know any of them. I still have the problem unsolved. thanks --~--~-~--~~~---~--~~ You received this message because you are

checklist

2006-03-29 Thread Jiri Barton
Hello there, I want to display a checklist dynamically: 1 apple [ ] 3 pears [ ] 8 plums [ ] ([ ] stands for checkboxes) The items are generated on the fly. I can create the form fields in a manipulator __init__ dynamically, such as in: for item in items: