Re: Django memory leak -- or caching?

2006-06-16 Thread Jeremy Dunck
On 6/17/06, Vladimir Pouzanov <[EMAIL PROTECTED]> wrote: > Looks like python's "feature" of not free'ing any memory at all. > Actually, it doesn't sound like that issue. (Info on the issue here: http://evanjones.ca/python-memory.html ) That memory release issue is specifically a problem for

Re: Django memory leak -- or caching?

2006-06-16 Thread Vladimir Pouzanov
On 6/17/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > I've been writing some code that populates our mysql db's through > > django. I have about 55 MB of pickled data (translating to about 80k > > new table entries and 78k new users). > > > > The problem is that python keeps allocating

Re: Django memory leak -- or caching?

2006-06-16 Thread Malcolm Tredinnick
On Sat, 2006-06-17 at 04:52 +, [EMAIL PROTECTED] wrote: > Hi all, > > I've been writing some code that populates our mysql db's through > django. I have about 55 MB of pickled data (translating to about 80k > new table entries and 78k new users). > > The problem is that python keeps

Re: Django memory leak -- or caching?

2006-06-16 Thread Ian Holsman
Hi. are you running in 'debug' or 'production' mode? debug caches alot of informatin about SQL quierues On 17/06/2006, at 2:52 PM, [EMAIL PROTECTED] wrote: > > Hi all, > > I've been writing some code that populates our mysql db's through > django. I have about 55 MB of pickled data

Django memory leak -- or caching?

2006-06-16 Thread [EMAIL PROTECTED]
Hi all, I've been writing some code that populates our mysql db's through django. I have about 55 MB of pickled data (translating to about 80k new table entries and 78k new users). The problem is that python keeps allocating more and more memory --- eventually eating up over 1.1 GB at which

Re: Manipulators with ForeignKeys

2006-06-16 Thread Malcolm Tredinnick
On Fri, 2006-06-16 at 16:41 +, char wrote: > > Thanks. That's not quite what I need though because it looks like the > IDs for his records are entered free-form in a single text field and > then processed manually. What I need is exactly what the admin > interface does for "edit_inline"

Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)

2006-06-16 Thread Phillip Sitbon
Hey there- so I decided to heed your input and I created a Django adapter for PyISAPIe, so now you can run Django in a true ISAPI environment. It seems to run without a hitch. As far as mapping arbitrary paths, all you have to do is use the wildcard application map to the DLL (assuming you have

Re: How to re-use the admin contrib ?

2006-06-16 Thread oggie rob
> I've thought about an url like "/company1/admin" that will display me only > the "periodical" and "article" that belongs to company1. Just be sure this is what you want. There may be times where you wish to completely separate each company's data - in which case, you can run multiple

Re: How install mysqldb under CentOS3 (or enable pyvault?)

2006-06-16 Thread mamcxyz
Sorry, when I say easy_setup I mean easy_install ;) (I run it easy_install-2.4 mysql-python) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

How install mysqldb under CentOS3 (or enable pyvault?)

2006-06-16 Thread mamcxyz
I almost finish my setup... however I keep failing at install mysqldb. My system is Centos 3, with python 2 as system default and separate and working python 2.4. I install mysql I try compiling it, however this fail with running build_ext building '_mysql' extension creating

Re: Inline Editing in Admin Interface

2006-06-16 Thread Tyson Tate
On Jun 16, 2006, at 3:02 PM, Joseph Kocherhans wrote: > Get rid of the inner Admin class on your tag object. That's what > causes it to show up on the main admin page. > > Joseph If I do that, then I can't add any objects inline. Does Django not allow one to do this? -Tyson

Problem with get_or_create

2006-06-16 Thread Dan M
I'm brand new to Django, and am writing my very first real live Django app now. My app is going to keep track of a bunch of server info for a bunch of servers. Colelcting most of the info is simple, except for the one Windows box in the bunch. I finally found a vbs script that gave me the

Problem with foreign keys and manipulators

2006-06-16 Thread [EMAIL PROTECTED]
I'm not sure if this is a bug or just my own misunderstanding, but I've been having problems getting manipulators to work right with models that have foreign keys. When I save the manipulator, it duplicates the existing foreign key objects. As an example, using the poll model in the Django

Hosting a Django project in Bluehost

2006-06-16 Thread nm
Hi all, I'm trying to run a project hosted in Bluehost, it only supports fcgi. I'm an apache guy. Anyone have a project maded with Django hosted in Bluehost? Thanks, Nuno --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: "tuple' object has no attribute 'get'"

2006-06-16 Thread Tyson Tate
On Jun 16, 2006, at 2:46 PM, Don Arbow wrote: > > Just a hunch. You have a comma at the end of the fields tuple in your > Admin inner class (line 36 according to the pastebin). Maybe that's > it? > > Don I deleted the comma, but I still get the same error. -Tyson

Inline Editing in Admin Interface

2006-06-16 Thread Tyson Tate
I've been pestering the IRC channel, Googling like crazy, and reading the docs, but for some reason, I can't, for the life of me, find the answer to the following question: How do I allow, in something like the following model, for "Tag" to be inline edited and only inline edited from

"tuple' object has no attribute 'get'"

2006-06-16 Thread Tyson Tate
Starting with the latest SVN, a fresh DB, and the following Model: http://django.pastebin.com/713796 I get a "tuple' object has no attribute 'get'" error whenever I try to add a new Post. Stack trace here: http://django.pastebin.com/713819 Any ideas? Thanks, Tyson

Re: Create generic views in Django 0.91

2006-06-16 Thread Sam Tran
On 6/16/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 6/16/06, Sam Tran <[EMAIL PROTECTED]> wrote: > > Wow! I didn't know it would be that simple! > > > > What about convenience functions, get_relatedobjectname()? > > Can 'relatedobjectname' be a field name passed as a parameter? > > Yes,

Re: Create generic views in Django 0.91

2006-06-16 Thread Jeremy Dunck
On 6/16/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > Note that this is just Python -- there's nothing Django-specific about > these examples. Isn't Python the best? :) I find that in Python, the main obstacle between my thoughts and simple code that does exactly what I want is generally my

Re: Create generic views in Django 0.91

2006-06-16 Thread Adrian Holovaty
On 6/16/06, Sam Tran <[EMAIL PROTECTED]> wrote: > Wow! I didn't know it would be that simple! > > What about convenience functions, get_relatedobjectname()? > Can 'relatedobjectname' be a field name passed as a parameter? Yes, you can pass that in dynamically. For that example, you'd do this:

Re: Create generic views in Django 0.91

2006-06-16 Thread Sam Tran
On 6/16/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 6/16/06, Sam Tran <[EMAIL PROTECTED]> wrote: > > As for my initial question I apologize for the confusion, I didn't > > mean to use the generic views as described in the Django tutorials. I > > want to be able to make some functions

Do I need row permissions for this?

2006-06-16 Thread Jay Parlar
In an app I'm working on, I have a model like this: class Product(models.Model): name = models.CharField(...) data = models.TextField(...) As more products are added, I want to restrict which of my users are allowed to edit each individual product. So maybe I'll create two products, A

Re: Create generic views in Django 0.91

2006-06-16 Thread Adrian Holovaty
On 6/16/06, Sam Tran <[EMAIL PROTECTED]> wrote: > As for my initial question I apologize for the confusion, I didn't > mean to use the generic views as described in the Django tutorials. I > want to be able to make some functions generic. Please let me give you > an example:

Re: How to re-use the admin contrib ?

2006-06-16 Thread James Bennett
On 6/16/06, ToddG <[EMAIL PROTECTED]> wrote: > Or even better I'm 100% wrong and there's an easy way to do this that > I've not seen or heard of... The new permissions stuff being worked on for the Summer of Code projects might help a bit with this situation, since it would be possible to

Re: Manipulators with ForeignKeys

2006-06-16 Thread char
Thanks. That's not quite what I need though because it looks like the IDs for his records are entered free-form in a single text field and then processed manually. What I need is exactly what the admin interface does for "edit_inline" records. I have a form with multiple records (either being

Re: How to re-use the admin contrib ?

2006-06-16 Thread ToddG
This sorta question pops up often, and as far as I've been able to tell the answer is "you can't" really, without writing the admin views (controllers) yourself. You might still be able to use some of the underlying functionality, but for the interface it seems to me you've gotta write that code.

Re: howto Django + lighttpd + Windows?

2006-06-16 Thread mamcxyz
Simply I imagine that this setup work. I don't know that fastcgi was not supported. My wish for use lighttpd is for do load testing in my local computer. I can use apache or the local web server or setup vmware but sincerily I think this was the "easy" way. Thanks for your input.

Re: Relations accros multiple apps

2006-06-16 Thread arthur debert
Hi Fabien. > App User: > class User: > #some fields > > App Blog > class Blog: > author = models.ForeignKey(User.user) > > Is-it possible to do that ? Sure. Models are regular python classes, all you must do is to import it's module before using it. Like: from

Re: Settings Model

2006-06-16 Thread Waylan Limberg
I would create a table with 2 columns as a key, value pair and set the key to be unique. That way, a setting could not be duplicated. Yet, you could add as many different settings as you want without altering the model at any point in the future. I suppose one could then add invalid/non-existent

Re: Relations accros multiple apps

2006-06-16 Thread Grigory Fateyev
Hello Fabien Schwob! On Fri, 16 Jun 2006 17:01:32 +0200 you wrote: > Hello, > > I'm about to create my first Django apps and I would like to know if > it's possible to have relationships between models accross multiple > apps. For example I would like to have : > > App User: > class User:

How to re-use the admin contrib ?

2006-06-16 Thread william
Imagine I have a model with a structure like: company, periodical , article. Each is linked with the other via a foreignkey. How can I configure admin interface for only see "article" and "periodical" for a specific company ? I've thought about an url like "/company1/admin" that will display me

Re: Using Pyscripter with Django

2006-06-16 Thread Filipe
Sory I took this much time to answer back, I was temporarily assigned to another project. I made the modification you suggested and started django's webserver as an external tool in pyscripter, but still couldn't get the debugger to stop in my breakpoints. Any other suggestion on how to use

Re: Create generic views in Django 0.91

2006-06-16 Thread Sam Tran
On 6/14/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 6/13/06, Sam Tran <[EMAIL PROTECTED]> wrote: > > Now we want to use the same model to create a contact tree for a given > > user: we determine who this user can view, e.g. personal phone > > numbers. The tables have different name but

Relations accros multiple apps

2006-06-16 Thread Fabien Schwob
Hello, I'm about to create my first Django apps and I would like to know if it's possible to have relationships between models accross multiple apps. For example I would like to have : App User: class User: #some fields App Blog class Blog: author =

Re: A template tag contribution

2006-06-16 Thread Corey Oordt
Thanks Malcolm,It's done and there!http://code.djangoproject.com/wiki/ColumnizeTagCoreyOn Jun 16, 2006, at 9:42 AM, Malcolm Tredinnick wrote:Hi Corey,On Fri, 2006-06-16 at 09:07 -0400, Corey Oordt wrote: I have no idea if this is the right place to post such a thing, but  in an effort to give

Re: A template tag contribution

2006-06-16 Thread Malcolm Tredinnick
Hi Corey, On Fri, 2006-06-16 at 09:07 -0400, Corey Oordt wrote: > I have no idea if this is the right place to post such a thing, but > in an effort to give something back to the community, I would like to > post a template tag I developed: A small collection of custom template tags is

A template tag contribution

2006-06-16 Thread Corey Oordt
I have no idea if this is the right place to post such a thing, but in an effort to give something back to the community, I would like to post a template tag I developed: Comments are appreciated, Thanks, Corey -- "Tags used by the

Re: Processing Image on Save

2006-06-16 Thread Phil Powell
On 16/06/06, mwtb <[EMAIL PROTECTED]> wrote: > Okay, I haven't looked at that, so at least it's a new options, thanks. > My Python ability gets a bit stretched when reading some of the code in > that area, but I guess that's a good thing. I've just been playing around with creating new field

Re: Settings Model

2006-06-16 Thread Phil Powell
As far as I know, there's no way to restrict the number of instances of a particular model. You could hack the admin templates to hide "Add" buttons if an instance of a particular model already exists. Or override the save method in the model so that it doesn't save if an instance already

Re: The only click to add any class

2006-06-16 Thread Grigory Fateyev
Hello Jorge Gajon! On Thu, 15 Jun 2006 13:15:05 -0500 you wrote: > The hint is in the error message. > You must pass a Region object to the region parameter, > new_data['region'] contains only the id that the user selected from > the select list. > > You can do this: > > def save(self,

Settings Model

2006-06-16 Thread bradford
I need a model called settings that has some application settings the user can edit in the admin. How should I set this model up so that one and only one settings record always exists for the lifetime of the application. Also, please let me know if this approach is incorrect.

Re: Guidance would be most welcome

2006-06-16 Thread Paul Childs
Sweet! Thanks for the heads up. --~--~-~--~~~---~--~~ 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

Re: Manipulators with ForeignKeys

2006-06-16 Thread Malcolm Tredinnick
On Fri, 2006-06-16 at 07:19 +, char wrote: > I need to create an AddManipulator and a ChangeManipulator that can > handle ForeignKey fields in the same way that the admin pages work with > edit_inline fields but I'm not sure how to do this. Is there a sample > anywhere that shows how to do

Re: Processing Image on Save

2006-06-16 Thread mwtb
Phil Powell wrote: > My suggestion would be to create > a new field type which does everything in one place - perhaps use > ImageField code as a basis for an ImageFromUrlField, using the data > from the URL instead of the POST data? Okay, I haven't looked at that, so at least it's a new

Processing Image on Save

2006-06-16 Thread mwtb
Hi, I've asked a couple of times on #django about this and although I've had some friendly attempts to help, I haven't resolved my problem, so I thought I'd try here. I've blogged about the problem at http://manwiththebones.dyndns.org/wordpress/?p=110, but I'll just restate the intention

bug? should forms.NullBooleanField handle the None value?

2006-06-16 Thread nkeric
hi all, I'm using the NullBooleanField for my Content model: class Content(models.Model): deleted = models.NullBooleanField(default=False, blank=True) ... that creates the following field in db: "deleted" bool NULL I got KeyError while trying to create a new content record without

Re: problem with related foreignkey in model

2006-06-16 Thread Antonello Cicchese
Thanks to all --~--~-~--~~~---~--~~ 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]

Manipulators with ForeignKeys

2006-06-16 Thread char
I need to create an AddManipulator and a ChangeManipulator that can handle ForeignKey fields in the same way that the admin pages work with edit_inline fields but I'm not sure how to do this. Is there a sample anywhere that shows how to do this?