Re: Subclassing CommentForm

2009-02-07 Thread Shantp
Wow. Just removing the () after my subclassed commentform worked. Thanks a lot. I hope that ticket is completed soon and added into django. On Feb 7, 8:31 pm, Eric Abrahamsen wrote: > On Feb 8, 2009, at 12:15 PM, Shantp wrote: > > > > > > > Hi, > > > I've got a custom comment

Subclassing CommentForm

2009-02-07 Thread Shantp
Hi, I've got a custom comment form in my template using "get_comment_form" and I'd like email to not be required. From some searching I see that I need to subclass the CommentForm, but I don't know exactly how to go about this. Here's what I put into my forms.py from

Re: syncdb Issue: OneToOneField with User model from contrib.admin

2009-02-07 Thread elith...@gmail.com
Worked perfectly - thanks very much. --~--~-~--~~~---~--~~ 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

Re: Memory Leaks

2009-02-07 Thread Alex Gaynor
On Sat, Feb 7, 2009 at 10:27 PM, python6009 wrote: > > Hi, > > I am using matplotlib/pyplot on my site to dynamically generate PNG > plots. And I am experiencing dramatic memory leaks. Within 10-15 > hits, my Apache process grows from 15-20M to 100M. > > I am using Django

Memory Leaks

2009-02-07 Thread python6009
Hi, I am using matplotlib/pyplot on my site to dynamically generate PNG plots. And I am experiencing dramatic memory leaks. Within 10-15 hits, my Apache process grows from 15-20M to 100M. I am using Django 1.0.2-final, Apache 2.2.1, Python 2.4.3, matplotlib 0.98.5.2. The leak happens under

Re: external non-ascii character is breaking my script

2009-02-07 Thread Alex Gaynor
On Sat, Feb 7, 2009 at 8:25 PM, redmonkey wrote: > > Thank you very much. That solved it, gave me all the information I > needed to not make the same mistake again, and taught me a quick way > to check the encoding of strings in python. > > As it happen, in this

Re: external non-ascii character is breaking my script

2009-02-07 Thread redmonkey
Thank you very much. That solved it, gave me all the information I needed to not make the same mistake again, and taught me a quick way to check the encoding of strings in python. As it happen, in this case, the script that generates the external file is some commercial software, so I can't

Re: optional foreign key

2009-02-07 Thread Alex Gaynor
On Sat, Feb 7, 2009 at 8:08 PM, J wrote: > Truly amazing. I would have never guessed that the OR operator would > combine two querysets. How does that work? > > Thanks for your help. You solved my problem. > J > > > > > Russell Keith-Magee wrote: > > On Sun, Feb 8, 2009 at

Re: optional foreign key

2009-02-07 Thread J
Truly amazing. I would have never guessed that the OR operator would combine two querysets. How does that work? Thanks for your help. You solved my problem. J Russell Keith-Magee wrote: > On Sun, Feb 8, 2009 at 8:03 AM, J wrote: > >> The idea is to be able to query all

Re: external non-ascii character is breaking my script

2009-02-07 Thread Karen Tracey
On Sat, Feb 7, 2009 at 7:27 PM, redmonkey wrote: > > Sure, here's a bit more info. > > The external data is generated by a script and it describes a > catalogue of lot items for an auction site I'm building. The format > includes a lot number, a brief description of

Re: external non-ascii character is breaking my script

2009-02-07 Thread redmonkey
Sure, here's a bit more info. The external data is generated by a script and it describes a catalogue of lot items for an auction site I'm building. The format includes a lot number, a brief description of the lot for sale, and an estimate for the item. Each lot is separated in the file by a '$'

Re: external non-ascii character is breaking my script

2009-02-07 Thread Karen Tracey
On Sat, Feb 7, 2009 at 11:56 AM, redmonkey wrote: > > Hey everyone, > > I'm trying to create django model instances from data stored in a flat > text file but I get `force_unicode` errors when the script comes > across one of the data items containing the "é"

Re: Modify label from field.label_tag

2009-02-07 Thread Russell Keith-Magee
On Sun, Feb 8, 2009 at 7:08 AM, Kless wrote: > > Thanks Russel for your fast reply. > My answer is down > > On 7 feb, 10:05, Russell Keith-Magee wrote: >> On Sat, Feb 7, 2009 at 6:03 PM, Kless wrote: >> >> > Does

Re: Strange "problem" with tutorial

2009-02-07 Thread Chris Baker
I've had a similar problem on many of my python projects, where a package seems to be on the pythonpath and everything is perfect but for some reason I can't import it. Almost always the problem is that I forgot to include an __init__.py in the package. If a directory does not have an __init__.py,

Re: optional foreign key

2009-02-07 Thread Russell Keith-Magee
On Sun, Feb 8, 2009 at 8:03 AM, J wrote: > > The idea is to be able to query all the items that have a specific 'group' > record chosen, as well as all items that don't have anything set. Since some > of them can be NULL or None, how do I go about selecting in a query both

Re: Determine subclass of object in models.Model

2009-02-07 Thread Frank Becker
2009/2/7 Frank Becker : Hi, > My question: I have a CommonInfo(models.Model) and I do subclassing it for a > couple of models. Getting CommonInfo.objects.all() returns a list of all > objects of CommonInfo and it's subclasses. Q: How to determine what subclass > the >

optional foreign key

2009-02-07 Thread J
Hello, I'm making a menu bar for my website, and this menu bar will display according to the permissions of the group that the user is in. I've defined an optional foreign key 'group' for the menuitem model: from django.db import models from django.contrib.auth.models import Group class

Determine subclass of object in models.Model

2009-02-07 Thread Frank Becker
Hi, First of all thanks for the Django framework. It's fun to work with it. My question: I have a CommonInfo(models.Model) and I do subclassing it for a couple of models. Getting CommonInfo.objects.all() returns a list of all objects of CommonInfo and it's subclasses. Q: How to determine what

Re: Modify label from field.label_tag

2009-02-07 Thread Kless
Thanks Russel for your fast reply. My answer is down On 7 feb, 10:05, Russell Keith-Magee wrote: > On Sat, Feb 7, 2009 at 6:03 PM, Kless wrote: > > > Does anybody could help me with this? > > First off - please be patient. You've waited less

ABC/MTI and Generic Date Based Views

2009-02-07 Thread seanbrant
Im have troubling figuring about a good solution for blog posts. I have created a ABC called Entry which Post, Link, Photo, Quote inherit. I first tired it with MTI and set Entry.objects.all() as the queryset attribute. This will pass the list of Entry's to the template which I can iterate over.

Re: How can import the Widgets of Admin.

2009-02-07 Thread Paul Nema
How to I get the value from a class verbose_name in a models.Model based generic list? I.E. I want to use the value in a class element verbose_name for a table header Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: table display with AJAX

2009-02-07 Thread Antoni Aloy
2009/2/7 Gerard Flanagan : > > MrJogo wrote: >> Hi, >> >> One of my pages is going to have a table that I'd like to be sortable, >> and I'm wondering the best way to do this. I looked into django- >> tables, which seems good, but once the page is loaded, I'd also like >> to

Re: CMS apps feature comparison matrix

2009-02-07 Thread akaihola
Kenneth Gonsalves kirjoitti: > cool - but I think it is better if you had the features as column headers and > the CMSs as row headers - easier to compare. I actually had it that way originally until version 14 [1], but tranposed the table because the large number of features (and still growing)

Re: Django Forms in HTML 4.01 Strict

2009-02-07 Thread akaihola
Isn't there a broader problem than just django.forms? Now that Django 1.0 seems to stand on the XHTML side, it encourages re-usable app authors to generate XHTML instead of HTML in their default templates as well as in any markup their apps might be generating programmatically. I have to admit

Re: openlayers TemplateSyntaxError

2009-02-07 Thread Justin Bronn
You need to add 'django.contrib.gis' to your INSTALLED_APPS. This is in the install docs: http://geodjango.org/docs/install.html#add-django-contrib-gis-to-installed-apps -Justin On Feb 3, 11:39 pm, Waruna de Silva wrote: > Hi , > > I'm newbie to django as well

external non-ascii character is breaking my script

2009-02-07 Thread redmonkey
Hey everyone, I'm trying to create django model instances from data stored in a flat text file but I get `force_unicode` errors when the script comes across one of the data items containing the "é" character. Can anyone explain to me what this problem is and now I can fix it? I can't really get

Re: Better approach in Database?

2009-02-07 Thread Alex Gaynor
On Sat, Feb 7, 2009 at 11:14 AM, Guri wrote: > > Hi, >Its been now approx. 6 months I am working with Django and > I must say all issues that came my way were solved either by this or > that post, blog, tutorial. Support of Django is marvelous. > This

Better approach in Database?

2009-02-07 Thread Guri
Hi, Its been now approx. 6 months I am working with Django and I must say all issues that came my way were solved either by this or that post, blog, tutorial. Support of Django is marvelous. This time I am stuck with a design issue rather Django. * I have a Users Master

Re: SQLite, swedish signs

2009-02-07 Thread Karen Tracey
On Sat, Feb 7, 2009 at 6:28 AM, Daniel Sandberg wrote: > > I,am getting the following error message when I,am trying to add a swedish > sign: > "'ascii' codec can't encode character u'\xe4' in position 4: ordinal not > in range(128)" > Please include the full traceback

SQLite, swedish signs

2009-02-07 Thread Daniel Sandberg
Hi, I have problem with saving special signs (a.g. swedish åäö) in my SQlite database. When I,am reading about Django and the SQLite database it sais it should be possible to use UTF-8 signs. But it does not work for me. I dont't think it is the database settings that is the problem, because I

Re: Overrding queryset on a field in form generated with ModelForm

2009-02-07 Thread mrsource
Solved, I corrected the __init__ method with this: def __init__(self, *args, **kwargs): super(CategoriaForm,self).__init__(*args,**kwargs); if kwargs.has_key('instance'): self.fields['parent'].queryset = Categoria.objects.exclude

Re: Postgresql v MySQL

2009-02-07 Thread Tim Chase
> Is there any clear reason for preferring one of these DBMS over the > other for use with Django (1.0 onwards). Historically, PostgreSQL has favored correctness, ANSI standards, and data-integrity while MySQL has favored speed and pluggability. For the most part, they've reached equilibrium.

Re: Two quick questions about __search

2009-02-07 Thread Seamus
Thank you. Fool on me, I did see the documentation although it was late at night. I think the documentation needs a simple addition of an example and a link to the MySQL documentation < http://dev.mysql.com/doc/refman/5.0/en/fulltext-natural-language.html >. On Feb 6, 11:34 pm, Alex Gaynor

How can import the Widgets of Admin.

2009-02-07 Thread Neeru
I have been tring to import the widgets of Admin for the Date and time to the ModelForm. django.contrib.admin import widgets in that AdminDateWidget() get the date field. lets say that a there is a modelform in which their is a date field say name of it is 'date'. the Date field should be

django amf with python property()

2009-02-07 Thread Adda Badda
Does anyone with experience of DjangoAMF know whether its possible to serialize properties of a class defined with the the python property function? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Postgresql v MySQL

2009-02-07 Thread Peter2108
Is there any clear reason for preferring one of these DBMS over the other for use with Django (1.0 onwards). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: table display with AJAX

2009-02-07 Thread Gerard Flanagan
MrJogo wrote: > Hi, > > One of my pages is going to have a table that I'd like to be sortable, > and I'm wondering the best way to do this. I looked into django- > tables, which seems good, but once the page is loaded, I'd also like > to be able to sort dynamically (using javascript). Before I

Re: syncdb Issue: OneToOneField with User model from contrib.admin

2009-02-07 Thread Ramiro Morales
On Sat, Feb 7, 2009 at 7:26 AM, elith...@gmail.com wrote: > > Hi all - I'm having an issue when trying to generate my models after a > syncdb command. I know where it's failing, and almost why - but I'm > also trying to figure out the correct solution to what I'm trying to >

Re: Modify label from field.label_tag

2009-02-07 Thread Russell Keith-Magee
On Sat, Feb 7, 2009 at 6:03 PM, Kless wrote: > > Does anybody could help me with this? First off - please be patient. You've waited less than a day for a response. Sometimes it will take a day or two to get a response - especially when you ask your question on a Friday

syncdb Issue: OneToOneField with User model from contrib.admin

2009-02-07 Thread elith...@gmail.com
Hi all - I'm having an issue when trying to generate my models after a syncdb command. I know where it's failing, and almost why - but I'm also trying to figure out the correct solution to what I'm trying to achieve. In my model (http://github.com/elithrar/eatsleeprepeat.net/blob/

Re: Why Syntax Errors in URLconf are Silent?

2009-02-07 Thread Kenneth Gonsalves
On Saturday 07 Feb 2009 2:38:46 pm Guy Rutenberg wrote: > > what type of syntax error? I put an extra comma in my urls file and the > > app promptly crashed. > > I wrote "pattenrs" instead of "patterns" and the sure did crash. But > instead of crashing and reporting a Syntax Error exception it

Re: Why Syntax Errors in URLconf are Silent?

2009-02-07 Thread Guy Rutenberg
Hi, On Feb 7, 8:43 am, Kenneth Gonsalves wrote: > what type of syntax error? I put an extra comma in my urls file and the app > promptly crashed. > I wrote "pattenrs" instead of "patterns" and the sure did crash. But instead of crashing and reporting a Syntax Error

Re: Modify label from field.label_tag

2009-02-07 Thread Kless
Does anybody could help me with this? Thanks in advance. On 6 feb, 13:53, Kless wrote: > Is possible to modify the label value got from *{{ field.label_tag }} > * ? > > By example, if it's got: > >    e-mail > > I would to modify that label to (as example): > >    

Missing Debug Stack Traces?

2009-02-07 Thread Devel63
I just switched over from using webapp with Google App Engine to using Django on App Engine. Most errors are now silently disappearing as a 500 server response, whereas before I started using "real" Django I would get a lovely stack trace in the browser that would often pinpoint the exact