Re: Typo in M-R page

2006-04-24 Thread Russell Keith-Magee
On 4/25/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > > Should that be get_article_list() and article_set instead? Well spotted. I've fixed the wiki. Russ Magee --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: 'Automatic tabulation' in table

2006-04-24 Thread Sam Tran
On 4/24/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Hi Sam, > > On Mon, 2006-04-24 at 15:52 -0400, Sam Tran wrote: > > Hi All, > > > > I have the following list of tuples: > > [(0, 'Jenna'), > > (1, 'Tom'), > > (1, 'Paul'), > > (2, 'Cathy')] > > > > I want to create a table with as

Typo in M-R page

2006-04-24 Thread Todd O'Bryan
In the section of the M-R wiki where it talks about changes in the database API, the last line (under Many-to-many related lookup) says that old: site_obj.get_reporter_list() should be new: site.reporter_set.all() but I don't see any relationship between reporter and site. Should that be

Re: Tutorial Files

2006-04-24 Thread Russell Keith-Magee
On 4/25/06, keukaman <[EMAIL PROTECTED]> wrote: > > I ran through the tutorial and did well until I got to the 4th part > with regard to Generic Views. Does anyone have template files, > views.py, and urls.py (at the myproject level and polls level) that I > could see? I've attached a tarball of

The real problem (was: Iterating over dictionary)

2006-04-24 Thread Todd O'Bryan
This seems to be more complicated than I thought. The actual application is an online quiz. An assignment has a number of questions, which each have a text and multiple answer choices which I render as radio buttons. They are presented in random order to the user who checks his/her choice

Re: 'Automatic tabulation' in table

2006-04-24 Thread Malcolm Tredinnick
On Tue, 2006-04-25 at 11:12 +1000, Malcolm Tredinnick wrote: [...] > If it were possible to create a loop from a number (equivalent of > Python's range() function), rather than iterating over a sequence, the > first solution would work without pre-processing. But I can't say that I > dislike the

Re: 'Automatic tabulation' in table

2006-04-24 Thread Malcolm Tredinnick
Hi Sam, On Mon, 2006-04-24 at 15:52 -0400, Sam Tran wrote: > Hi All, > > I have the following list of tuples: > [(0, 'Jenna'), > (1, 'Tom'), > (1, 'Paul'), > (2, 'Cathy')] > > I want to create a table with as many row as the number of tuples (one > row for each tuple). The first element of

Tutorial Files

2006-04-24 Thread keukaman
I ran through the tutorial and did well until I got to the 4th part with regard to Generic Views. Does anyone have template files, views.py, and urls.py (at the myproject level and polls level) that I could see? --~--~-~--~~~---~--~~ You received this message

Re: Iterating over a dictionary

2006-04-24 Thread Ned Batchelder
The dot notation {{answers.answer}} is equivalent to these Python expressions: answers['answer'] answers.answer answers.answer() you want: answers[answer] but the template engine doesn't know that you mean answer to be a variable rather than a literal. --Ned. Todd O'Bryan

Re: Various problems porting to Magic Removal

2006-04-24 Thread Don Arbow
On Apr 24, 2006, at 3:28 PM, Richie Hindle wrote: >> o When I run "manage.py runserver" I get this: >> >> admin.logentry: 'user' has relation with uninstalled model User >> admin.logentry: 'content_type' has relation with uninstalled >> model >> ContentType > > This was because

Re: Iterating over a dictionary

2006-04-24 Thread Malcolm Tredinnick
Hi Todd, On Mon, 2006-04-24 at 20:30 -0400, Todd O'Bryan wrote: > I'm trying to display the values from a form on a summary page using > a template. (Actually, I'm trying to do something more complicated, > but let's start here.) Using {% debug %} I can see that, for example, > > answers =

Iterating over a dictionary

2006-04-24 Thread Todd O'Bryan
I'm trying to display the values from a form on a summary page using a template. (Actually, I'm trying to do something more complicated, but let's start here.) Using {% debug %} I can see that, for example, answers = { 'a':1, 'b':2, 'c':3 } and in my template I have {% for answer in

Re: MR - MySQL database upgrade column rename

2006-04-24 Thread Geert Vanderkelen
Hi Ken, Ken Kennedy wrote: > You may want to compare those field sizes to a "clean" install of > M-R...if I remember correctly, one or both have been increased in size > in a new install. We'll need to make sure that migrated field sizes > match newly created ones, or we'll end up with WEIRD

Re: Delete session on server?

2006-04-24 Thread Adrian Holovaty
On 4/24/06, berto <[EMAIL PROTECTED]> wrote: > Is it possible to delete a user's session on the server? For example, > say I log into the admin section on a public machine and don't log out. > Is there a session file that I can delete on the server? In PHP > world, it was possible to delete

Re: MR - MySQL database upgrade column rename

2006-04-24 Thread Ken Kennedy
You may want to compare those field sizes to a "clean" install of M-R...if I remember correctly, one or both have been increased in size in a new install. We'll need to make sure that migrated field sizes match newly created ones, or we'll end up with WEIRD errors that only occur with migrated

Delete session on server?

2006-04-24 Thread berto
Hi everyone, Is it possible to delete a user's session on the server? For example, say I log into the admin section on a public machine and don't log out. Is there a session file that I can delete on the server? In PHP world, it was possible to delete the sess_* from a temp directory. Is

adding Many-to-one objects in m-r

2006-04-24 Thread Adam
I just started porting an app over to magic-removal and ran across this. The documentation (http://code.djangoproject.com/wiki/RemovingTheMagic#Descriptorfields) says that you can add a ForeignKey related object with either of: reporter_obj.article_set.add(headline='Foo')

Re: Related object handling in save -method

2006-04-24 Thread TT
Oh, my example was buggy also. There can not be model with only ManyToManyField. It has to have some other fields which are saved in the model's own table. Otherwise the sql statement raises an error. Here is better complete example: class OtherModel(models.Model): name =

'Automatic tabulation' in table

2006-04-24 Thread Sam Tran
Hi All, I have the following list of tuples: [(0, 'Jenna'), (1, 'Tom'), (1, 'Paul'), (2, 'Cathy')] I want to create a table with as many row as the number of tuples (one row for each tuple). The first element of each tuple is the number of tabulations or empty cells to put in each row. The

Re: MR - MySQL database upgrade column rename

2006-04-24 Thread Geert Vanderkelen
Hi Ken, Ken Kennedy wrote: > At this point, the various differences in SQL capabilities between the > backends have resulted in a split of the migration DDL/DML into a > separate list for each engine. I'm working on tweaking them, but I'll > probably get to MySQL last, so feel free to pitch in!

Re: MR - MySQL database upgrade column rename

2006-04-24 Thread Ken Kennedy
At this point, the various differences in SQL capabilities between the backends have resulted in a split of the migration DDL/DML into a separate list for each engine. I'm working on tweaking them, but I'll probably get to MySQL last, so feel free to pitch in!

Re: Various problems porting to Magic Removal

2006-04-24 Thread Ken Kennedy
Yes, we're discussing the SQL migration steps over in dev right now. Among other things, the change in auth_permission (adding content_type_id as the referencing field, rather than the reference to the deleted package field) requires some DML (UPDATEs) to be added to the migration steps. I'm

Re: Hacking around not doing ManyToMany on "self"

2006-04-24 Thread nevroe
Hi Russ, Thanks for the reply. I had previously tried to do a ManyToMany("self") a few months ago, with no luck, so I figured it must still be the case. Also, the "bug" for this is still open: http://code.djangoproject.com/ticket/75 So, I quickly went in and tried this out, and

Related object handling in save -method

2006-04-24 Thread Timo Mäkelä
Hello django users, in my model's save()-method I'd like to use model's ManyToManyField to call other save related methods. But I can't get this work. class Model(models.Model): other_models = models.ManyToManyField(OtherModel) def save(self): super(Model, self).save()

Re: Filtering ManyToManyFields

2006-04-24 Thread Malcolm Tredinnick
On Mon, 2006-04-24 at 12:48 +0200, Christian Schneider wrote: > Hi all, > > got it: > > destination = models.ManyToManyField(Destination, > related_name="Destinations", > limit_choices_to={'metadata_destination':True}) > destination_metadata = models.ManyToManyField(Destination, >

Re: Filtering ManyToManyFields

2006-04-24 Thread Malcolm Tredinnick
On Mon, 2006-04-24 at 12:43 +0200, Christian Schneider wrote: > Hi all, > > I've got a model with the fields > > destination = models.ManyToManyField(Destination, > related_name="Destinations") > destination_metadata = models.ManyToManyField(Destination, > related_name="MetadataDestinations")

Re: Filtering ManyToManyFields

2006-04-24 Thread Christian Schneider
Hi all,got it:destination = models.ManyToManyField(Destination, related_name="Destinations", limit_choices_to={'metadata_destination':True})destination_metadata = models.ManyToManyField(Destination, related_name="MetadataDestinations", limit_choices_to={'metadata_destination':False}) Sorry for any

Filtering ManyToManyFields

2006-04-24 Thread Christian Schneider
Hi all,I've got a model with the fieldsdestination = models.ManyToManyField(Destination, related_name="Destinations")destination_metadata = models.ManyToManyField(Destination, related_name="MetadataDestinations") that is both destination and destination_metadata are related to the same table. They

frappr

2006-04-24 Thread Kenneth Gonsalves
add your name here: http://www.frappr.com/django -- 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 "Django