Re: Having trouble filtering a queryset

2006-12-17 Thread Russell Keith-Magee
On 12/18/06, Austin Govella <[EMAIL PROTECTED]> wrote: > > I'm having trouble understanding the filtering. > > I've queried all articles related to a particular artist: > > articles = artist.article_set.all() > > I want to list the articles by type, so I filter the queryset by type: > > news =

Re: Curse launches with Django platform

2006-12-17 Thread Jeremy Dunck
On 12/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > We also redid the session system to run completely off memcached, as > this was the real killer for the database. I guess volatile session data is OK, or do you write out sessions from memcached to disk at intervals? I'm going to have

Re: Installation problem: ImportError: No module named django.core.management

2006-12-17 Thread Russell Keith-Magee
On 12/17/06, Kurt <[EMAIL PROTECTED]> wrote: > > I'm not sure what it is I've done wrong here, although I'm certain > it'll probably be quite a simple fix. Any help pls guys??? Its a PYTHONPATH problem. Either Django isn't installed, or you have put it somewhere that PYTHONPATH can't find it. As

Re: Any web control panel project on Django

2006-12-17 Thread Fabio Gomes
I m interested in that too, but the only thing working in this zmaj project is the file browser, but its already a start. -- Forwarded message -- From: Don Arbow <[EMAIL PROTECTED]> Date: Dec 17, 2006 7:52 PM Subject: Re: Any web control panel project on Django To:

Re: Problems Doing Slightly Complex Logic

2006-12-17 Thread Austin Govella
On 12/17/06, Burhan <[EMAIL PROTECTED]> wrote: > A person creates a record for an asset, that has a manufacturer, a > location and an asset type. All these are linked as FK in the model. > Now there is a table that has various properties (Serial Number, Color, > Weight, etc.) -- a master list.

Re: Curse launches with Django platform

2006-12-17 Thread [EMAIL PROTECTED]
Thought I'd give everyone an update. We're struggling to stop Django from doing some queries in templates/context procs that we're missing, but we've nearly got the SQL load completely stable (although we're still having some random issues). We also redid the session system to run completely off

Re: Re: Why is IPAddressField a char(15) instead of an int?

2006-12-17 Thread Matthew Flanagan
On 18/12/06, Don Arbow <[EMAIL PROTECTED]> wrote: > > On Dec 17, 2006, at 9:16 AM, Jamie wrote: > > > > Hello, > > > > I'm just wondering if there's a specific reason why IPAddressField is > > defined as a 15-character string instead of a 32-bit integer? Using an > > integer would reduce the

Re: Any web control panel project on Django

2006-12-17 Thread Don Arbow
On Dec 17, 2006, at 12:22 PM, Ramdas S wrote: > Hi, > > Is there anyone working on Django based web control panel/ or an > extended user panel for simple network management This was started as a replacement for webmin. Don't know how far along the project is, though.

Having trouble filtering a queryset

2006-12-17 Thread Austin Govella
I'm having trouble understanding the filtering. I've queried all articles related to a particular artist: articles = artist.article_set.all() I want to list the articles by type, so I filter the queryset by type: news = articles.filter(article_type__name__exact='news') reviews =

Re: Why is IPAddressField a char(15) instead of an int?

2006-12-17 Thread Don Arbow
On Dec 17, 2006, at 9:16 AM, Jamie wrote: > > Hello, > > I'm just wondering if there's a specific reason why IPAddressField is > defined as a 15-character string instead of a 32-bit integer? Using an > integer would reduce the storage size by 15 bytes to only four bytes > and make it easier to

Re: Accessing the current request object in a template loader

2006-12-17 Thread Graham Dumpleton
kahless wrote: > hi, > i want to make a simple template loader which loads from directories > depending on the sub-site the user requests a page from. (or probably > also from the user session - which theme he has set, etc.) > > so i would need to get the current request object but haven't found

Any web control panel project on Django

2006-12-17 Thread Ramdas S
Hi, Is there anyone working on Django based web control panel/ or an extended user panel for simple network management Ramdas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Newforms and composite widgets

2006-12-17 Thread Adrian Holovaty
On 12/17/06, Brian Victor <[EMAIL PROTECTED]> wrote: > Adrian Holovaty wrote: > > On 12/9/06, Brian Victor <[EMAIL PROTECTED]> wrote: > >> One of the things I was hoping for in newforms but haven't found is a > >> way to do a composite form field that uses multiple elements > >> that reduce to a

Problems Doing Slightly Complex Logic

2006-12-17 Thread Burhan
Hello Everyone: About the third time I have tried Django, and everytime I'm running into a problem where that it seems there is no easy way to do a complex task. Well, not that complex in my opinion, just can wade through the documentation to find the right thing I need. A person creates a

Why is IPAddressField a char(15) instead of an int?

2006-12-17 Thread Jamie
Hello, I'm just wondering if there's a specific reason why IPAddressField is defined as a 15-character string instead of a 32-bit integer? Using an integer would reduce the storage size by 15 bytes to only four bytes and make it easier to calculate ranges. Additionally, on MySQL, it's about 30%

Installation problem: ImportError: No module named django.core.management

2006-12-17 Thread Kurt
Hi Guys, I'm a newbie with Django, and am still unfortunate enough to be running it on a windows (XP) machine. I've currently got everything installed (Apache, mod_python, python 2.4, svn etc etc), but when I try to run "manage.py runserver", it spews out the following traceback.

Accessing the current request object in a template loader

2006-12-17 Thread kahless
hi, i want to make a simple template loader which loads from directories depending on the sub-site the user requests a page from. (or probably also from the user session - which theme he has set, etc.) so i would need to get the current request object but haven't found a solution for that

Diamanda Stable 2006.12 released

2006-12-17 Thread [EMAIL PROTECTED]
The first stable release is here. You can download it from sourceforge. >From Test 2 there was only minor fixes so this release should work without problems. This stable release works on Django 0.95 and SVN but it uses old forms code. In the next weeks I'll be upgrading diamanda in SVN to

Re: Why does Django think my browser isn't accepting cookies?

2006-12-17 Thread DavidAtEcodata
Sorry, found the problem! I had tried both 'localhost' and '127.0.0.1' variants of the URL without success; set the SESSION_COOKIE_DOMAIN variable to 'localhost', and still had the problem in both browsers - interesting because the Django FAQ says this only happens with Firefox. It went away

Re: Newforms and composite widgets

2006-12-17 Thread Brian Victor
Adrian Holovaty wrote: > On 12/9/06, Brian Victor <[EMAIL PROTECTED]> wrote: >> One of the things I was hoping for in newforms but haven't found is a >> way to do a composite form field that uses multiple elements >> that reduce to a single python object. E.g., [snip] >> Is there a way to

Re: Why does Django think my browser isn't accepting cookies?

2006-12-17 Thread DavidAtEcodata
Thanks, everyone, for all the helpful replies. However, none of these has worked. To reply briefly to your suggestions: I have disabled ZoneAlarm completely, deleted all cookies, enabled all cookies in both IE 6 and Firefox, rebooted the PC and tried the following URLs:

Re: generic list view question

2006-12-17 Thread Phil Davis
Just a guess but topics is a queryset which goes to db and gets each item which you then modify locally before calling object_list. Now object list gets items from topics again but they are probably newly generated objects so do not have a recent_posts attribute. Why not just access

Re: Why does Django think my browser isn't accepting cookies?

2006-12-17 Thread Mohammad Tayseer
It happened for FF & IE. It happened with django & Plone admin pages. The problem is caused by ZoneAlarm itself. Even if you disable cache cleaning by ZoneAlarm it will cause the same problem. Closing ZoneAlarm completely will solve the problem

Re: extracting field information from models

2006-12-17 Thread Milan Andric
On Dec 16, 1:01 pm, "Phil Davis" <[EMAIL PROTECTED]> wrote: >Try: > > app_fields = [] > for f in app._meta.fields: >app_fields.append( > { > 'label' : f.verbose_name, >'value': getattr(app, f.name), > } > > Works for me on Boolean fields. > Thanks, getattr() did