Add a Button in Admin

2006-04-20 Thread bradford
I hope this makes sense: I have two models: Foo and Bar. Bar contains a FK to Foo. In the admin, when the admin looks at one of the Foo records, I want them to be able to clear all Bar records that contain a FK to the Foo record that's being used. How can I add a button to the Foo admin view

Many-to-many problem

2006-04-20 Thread Michal
Hello, I have problems with many-to-many model. Look at this please: from django.core import meta class Model1(meta.Model): attr1 = meta.CharField(maxlength=10) class META: admin = meta.Admin() class Model2(meta.Model): attr2 = meta.ManyToManyField(Model1) class

Re: Trac error on code.djangoproject.com

2006-04-20 Thread Joeboy
Nope, still broken here. --~--~-~--~~~---~--~~ 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: Trac error on code.djangoproject.com

2006-04-20 Thread limodou
On 4/20/06, Joeboy <[EMAIL PROTECTED]> wrote: > > Nope, still broken here. > Me too! -- I like python! My Blog: http://www.donews.net/limodou My Django Site: http://www.djangocn.org NewEdit Maillist: http://groups.google.com/group/NewEdit --~--~-~--~~~---~--~~ Yo

Re: Trac error on code.djangoproject.com

2006-04-20 Thread Petar Marić
Medic! :D -- Petar Marić *e-mail: [EMAIL PROTECTED] *mobile: +381 (64) 6122467 *icq: 224720322 *skype: petar_maric *web: http://www.petarmaric.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Remoting for django

2006-04-20 Thread Salmon Tetelepta
Hi all, We need to use remoting to integrate flash in our applications and we like to integrate it with django. We found Flashticle, a python implementation for Turbogears( www.osflash.org/flashticle ), but nothing yet for Django.Does anyone have experience with remoting and django? If not, can a

ExtendedUserModel in m-r branch?

2006-04-20 Thread FX
Hi Folks, Our application (we believe it's the first public launched web site powered by django in China, http://www.ifaxian.com/) makes use of the Extended User Model as described in the wiki, but I can't find the "replaces_module" option anymore in the m-r branch. Could it still be done by some

ImageField/FileField in M/R

2006-04-20 Thread Denis
Hi It looks like old files aren't being removed after object change. That is, if i change the object like the 1 below and upload new file via admin interface, old file remains in the directory, though nothing refers to it :-/ class Picture(models.Model): fullsize = models.ImageField(upload_t

Re: Problems creating model.

2006-04-20 Thread Russell Keith-Magee
On 4/19/06, Michael Radziej <[EMAIL PROTECTED]> wrote: > > I'm not sure I'm following your words correctly, being a non-native > writer ... Sorry - I should have been more clear, especially when trying to clarify something (plus - I'm sure your English is much better than my German :-) > Take th

Re: Problems creating model.

2006-04-20 Thread Russell Keith-Magee
On 4/19/06, njharman <[EMAIL PROTECTED]> wrote: > class Foo(models.Model): > myfield = models.OneToOneField('SomeModel', to_field='id') > > Works. > > class Foo(models.Model): > myfield = models.OneToOneField('SomeModel') > > Fails because whatever "turns" 'SomeModel' from string into cla

Re: Trac error on code.djangoproject.com

2006-04-20 Thread tonemcd
It's back online and all is well with the world... Cheers, Tone --~--~-~--~~~---~--~~ 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 unsubscrib

Re: ImageField/FileField in M/R

2006-04-20 Thread Clint Ecker
This is correct.  I believe the general consensus is that the developer should take care of file destruction on their own.  Perhaps in a _pre_save method?Clint On 4/20/06, Denis <[EMAIL PROTECTED]> wrote: HiIt looks like old files aren't being removed after object change.That is, if i change the

CoolClown.BlogSpot.Com is now in a NEW LOOK!

2006-04-20 Thread Dr. Tiffny
Your humour delivery site CoolClown.BlogSpot.Com is now in a NEW LOOK! Bookmark and visit us everyday!! Tell all your friends!! http://CoolClown.BlogSpot.Com - P.S.:If you like to become an editor of this site, please mail me. --~--~-~--~~~---~--~-

Re: ImageField/FileField in M/R

2006-04-20 Thread Denis
If so, then it (the file) shouldn't be deleted when you delete() the object? Also, M/R branch seems has no methods like _pre_save/_post_save, instead you can subclass save/delete methods. There are some references in db.models.signals, dont know how to use them though Clint Ecker написав: > This

Re: ImageField/FileField in M/R

2006-04-20 Thread Clint Ecker
This was discussed 8 months ago.  This is the ticket: http://code.djangoproject.com/ticket/369.  Feel free to add anything you think relevant. On 4/20/06, Denis <[EMAIL PROTECTED]> wrote: If so, then it (the file) shouldn't be deleted when you delete()the object? Also, M/R branch seems has no metho

Re: unexpected keyword argument with generic view

2006-04-20 Thread yml
Luke, Not sure where exactly is the error but by reading the code above there is something strange in the view "edit_blog". the line : b = blogs.get_object(pk=request.user.id) seems a bit strange to me. I do not understand why the primary key of is "request.user.id". Don't you this would be bette

Re: ExtendedUserModel in m-r branch?

2006-04-20 Thread Ivan Sagalaev
FX wrote: >Hi Folks, >Our application (we believe it's the first public launched web site >powered by django in China, http://www.ifaxian.com/) makes use of the >Extended User Model as described in the wiki, but I can't find the >"replaces_module" option anymore in the m-r branch. Could it still

Re: ExtendedUserModel in m-r branch?

2006-04-20 Thread James Bennett
On 4/20/06, FX <[EMAIL PROTECTED]> wrote: > Our application (we believe it's the first public launched web site > powered by django in China, http://www.ifaxian.com/) makes use of the > Extended User Model as described in the wiki, but I can't find the > "replaces_module" option anymore in the m-r

Need help with formfields.RadioSelectField

2006-04-20 Thread stugots
I've been working in Django and Python for about a month. I'm trying to use radio buttons in a template, and I cannot get the radio buttons to be displayed on the page. Can anyone see what I'm doing wrong? I'm running ActiveState Python 2.4 and Django 0.91 on Windows XP. In the view, I use a c

Passing variables to include?

2006-04-20 Thread [EMAIL PROTECTED]
Maybe I missed something in the docs or the FAQ, but... Is there a way to pass different variables to an {% include %}? Say I want to have a reusable component, included via {% include %}, which renders a product. So I only have to deal with layout, formatting, images, etc., once (I'm a big fan o

Re: Passing variables to include?

2006-04-20 Thread James Bennett
On 4/20/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > This would mean I would have to assign different context variables to > my {%include%}'s "product" variable. This sounds more like a use case for a template tag than for an include. -- "May the forces of evil become confused on the way

MySQL Query cache hits stay zero

2006-04-20 Thread Beegee
Has anybody been observing the same thing? For a couple of weeks now I have a website running build with Django. I was looking for way to improve the performance. One way of improving the performance is turning on the Query Cache for MySQL. By default this is activated. It also was on my MySQL ins

Re: MySQL Query cache hits stay zero

2006-04-20 Thread Adrian Holovaty
On 4/20/06, Beegee <[EMAIL PROTECTED]> wrote: > When I manually type in a query on the MySQL command line and execute > it several times, the Qcache_hits indeed increases. So, the cache > functionality is working. That's strange. I don't use MySQL, so I haven't encountered this issue, but one str

Re: Passing variables to include?

2006-04-20 Thread Adrian Holovaty
On 4/20/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Maybe I missed something in the docs or the FAQ, but... > Is there a way to pass different variables to an {% include %}? Hi Daniel, Nope, there's no way to do that. I'd suggest writing a quick custom template tag for that functionality.

Re: Add a Button in Admin

2006-04-20 Thread Adrian Holovaty
On 4/20/06, bradford <[EMAIL PROTECTED]> wrote: > I have two models: Foo and Bar. Bar contains a FK to Foo. > > In the admin, when the admin looks at one of the Foo records, I want > them to be able to clear all Bar records that contain a FK to the Foo > record that's being used. How can I add

Re: MySQL Query cache hits stay zero

2006-04-20 Thread Beegee
No, then it also doesn't work. When I repeat the following query: cursor.execute('select * from wifidog_businesses limit 10') using MySQLdb the number of Cache hits do not increase. However, the number of Qcache_queries_in_cache also do not increase. Strange. I did find an issue on the MySQL fo

Re: MySQL Query cache hits stay zero

2006-04-20 Thread Adrian Holovaty
On 4/20/06, Beegee <[EMAIL PROTECTED]> wrote: > No, then it also doesn't work. When I repeat the following query: > > cursor.execute('select * from wifidog_businesses limit 10') > > using MySQLdb the number of Cache hits do not increase. However, the > number of Qcache_queries_in_cache also do not

magic-removal call for testing

2006-04-20 Thread Adrian Holovaty
Hi all, At this point, Django's magic-removal branch is stable enough that we're ready to begin the merging process. I've been running the branch on chicagocrime.org for a couple of weeks with no problems. As of right now, Jacob and I are freezing feature additions to the branch and concentrating

Re: Documentation HTML structure

2006-04-20 Thread Adrian Holovaty
On 4/16/06, Jj <[EMAIL PROTECTED]> wrote: > I've noticed that the sidebar on the Documentation pages is at the > bottom of the HTML markup, so when I make a search, the index that is > there is one of the last things to be found... > > Shouldn't it be the other way arround (at top of the HTML tree

Re: How to extend Django template objects?

2006-04-20 Thread Adrian Holovaty
On 4/14/06, Bryan Chow <[EMAIL PROTECTED]> wrote: > Is there a "correct" way to extend a Django template that doesn't exist > on the filesystem? I couldn't find any mention of this in the > documentation. > > I'm creating template objects programmatically, and I want one of these > objects to exte

Re: magic-removal call for testing

2006-04-20 Thread Rudolph
That's certainly good news! I use M-R for a few weeks on a development server and it feels really solid. I think it's a good decision not to wait for subclassing, validation-aware models and ajax. Thanks *very* much for all the hard work! Rudolph --~--~-~--~~~---~--

Re: MySQL Query cache hits stay zero

2006-04-20 Thread Andy Dustman
On 4/20/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 4/20/06, Beegee <[EMAIL PROTECTED]> wrote: > > No, then it also doesn't work. When I repeat the following query: > > > > cursor.execute('select * from wifidog_businesses limit 10') > > > > using MySQLdb the number of Cache hits do not i

Re: MySQL Query cache hits stay zero

2006-04-20 Thread Andy Dustman
On 4/20/06, Andy Dustman <[EMAIL PROTECTED]> wrote: > I've reopened that bug, but I am very skeptical that anything in > MySQLdb can be causing it. And I'm probably right, since it seems he is using MySQL-4.0 which, while it does have the query cache, it is disabled for transactions on InnoDB. 4.

Re: maxlength in the Admin site

2006-04-20 Thread argus
Well, for better or worse I submitted a ticket with my modded fields.py, based off the latest SVN trunk: http://code.djangoproject.com/ticket/1665 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group

Re: MySQL Query cache hits stay zero

2006-04-20 Thread Adrian Holovaty
On 4/20/06, Andy Dustman <[EMAIL PROTECTED]> wrote: > Do statements generated by Django have columns in a deterministic order? Just for the record, yes, the columns will always be in the same order. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~

Re: How to extend Django template objects?

2006-04-20 Thread Bryan Chow
Hi Adrian, Thanks for the reply, and for the suggestion. I've been working with Ian Clelland, who submitted this patch a few days ago to address the issue: http://code.djangoproject.com/ticket/1650 There is definitely lots of interest over here for this functionality to become part of Django, a

problem with threaded apache

2006-04-20 Thread oggie rob
Hi all, I have a problem with a new server that I am setting up. Details are: Fedora Core 5 apache httpd 2.2.0 (rpm) postgresql 8.1.3 (rpm) psycopg 1.1.21(source - and a real pain) python 2.4 (rpm) pretty weak hardware (800 mHz PIII, 256 M RAM) So, this app runs fine on two other machines (simila

Re: Passing variables to include?

2006-04-20 Thread Ivan Sagalaev
[EMAIL PROTECTED] wrote: >Say I want to have a reusable component, included via {% include %}, >which renders a product. So I only have to deal with layout, >formatting, images, etc., once (I'm a big fan of re-use and DRY). The >template fragment will have a lot of {{product.price}}, >{{product.p

Re: MySQL Query cache hits stay zero

2006-04-20 Thread Beegee
This is a part from the manual of MySQL: "In MySQL 4.0, the query cache is disabled within transactions (it does not return results). Beginning with MySQL 4.1.1, the query cache also works within transactions when using InnoDB tables (it uses the table version number to detect whether its contents