Re: ContentType/GenericRelations question

2010-02-22 Thread Scott SA
direct access to the tables, but I won't bore anyone here with it. So, hopefully someone else will either say, 'yup, that's how', 'great, what I needed' or, give me another reason to slap my forehead. S On Feb 22, 5:54 pm, Scott SA <pydev...@gmail.com> wrote: > Hopefully this won't be a

ContentType/GenericRelations question

2010-02-22 Thread Scott SA
Hopefully this won't be a forehead slapper of a question. Since related classes do not have an 'object' manager, what is the best way to get all of those objects as a set? For example, if I have a BaseClass that has a generically-related AttributeClass, I can get the attributes from an instance

Re: Problem with URL naming, generic templates and custom filtering wrappers

2009-10-10 Thread Scott SA
Hi Karen, On Oct 10, 5:58 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Sat, Oct 10, 2009 at 6:34 PM, Scott SA <pydev...@gmail.com> wrote: > > I am trying to use a series of generic views with custom filtering via > > callbacks as per: > I cannot figure

Problem with URL naming, generic templates and custom filtering wrappers

2009-10-10 Thread Scott SA
Hi, I am trying to use a series of generic views with custom filtering via callbacks as per: http://docs.djangoproject.com/en/dev/topics/generic-views/#extending-generic-views Unfortunately, when I try to name the URL in urls.py, I get various errors depending upon how I try to write the

Re: Sorting field-rendering order of forms.Form instances

2009-09-23 Thread Scott SA
Hi Peter, On Sep 23, 6:52 pm, Peter Coles wrote: > If you check out the source code in django.forms.forms, the forms use > a SortedDict class that is defined in django.utils.datastructures. SortedDict: "A dictionary that keeps its keys in the order in which they're

Sorting field-rendering order of forms.Form instances

2009-09-23 Thread Scott SA
For reasons unimportant to this message, I found it necessary to rearrange the order that fields are rendered on some of my forms. According to the django docs., I simply needed to rearrange the order of fields as I defined them, which works quite fine when I know in advance the required order.

Inherited classes and generic views - curiosity.

2008-10-19 Thread Scott SA
When passing a QuerySet of objects which inherit part of their model from another class, generic views only seems to respond to the parent class: Here's a simplified example: class ParentClass(models.Model): name_last = models.CharField(max_length=64) name_first =

Re: site/admin/doc error in django's model_detail.html using "filter escape" VS "autoescape"

2008-10-17 Thread Scott SA
> You've apparently layered a recent version of Django on top of an older one > without first deleting the older one.  This file > 'django/contrib/admin/templates/admin_doc/model_detail.html' no longer > exists in the source tree, it has been moved to under > 'django/contrib/admindoc/templates'.  

site/admin/doc error in django's model_detail.html using "filter escape" VS "autoescape"

2008-10-17 Thread Scott SA
I'm having a consistent problem across multiple projects with the self- documentation and I'm hoping somone here might have an idea what is wrong and how I might fix it. Thanks in advance for any assistance! I have tried a couple of different versions of django including the latest svn release

Re: Trouble installing PIL

2008-05-23 Thread Scott SA
On 5/23/08, Austin Govella ([EMAIL PROTECTED]) wrote: >Does anyone have any insights on how to work around the bug noted in >#7019? > >I need to add/edit a path somewhere, yes? But where? >On May 20, 12:42 am, Austin Govella <[EMAIL PROTECTED]> wrote: >> It was a PYTHONPATH problem. I fixed it

Re: Python issues on mac. Python not working.

2008-05-14 Thread Scott SA
On 5/14/08, Jason Ourscene ([EMAIL PROTECTED]) wrote: >Ok now that the shock has passed a bit, anyone know how to do this >without reinstalling the OS. Have you looked at the Apple-supplied XCode developer packages? If there isn't a Python package there, then I guess you'll have to look into

Re: Python issues on mac. Python not working.

2008-05-13 Thread Scott SA
On 5/13/08, Jason Ourscene ([EMAIL PROTECTED]) wrote: >I installed everything through macports initially, but would like to >be on a newer version of python which i found is bundled with leopard. >I completely removed all the files and things associated with >macports. Now when i type python in

Re: tutorial part 4 - vote problem

2008-05-11 Thread Scott SA
On 5/11/08, Aragorn son of Arathorn ([EMAIL PROTECTED]) wrote: >I am using the svn version of django and have worked through the >tutorials without any problem. I have run into a problem on tutorial 4 >- last section - using generic views. I am able to bring up a detail >poll by going to

Re: "None of the above" in a form?

2008-05-09 Thread Scott SA
On 5/9/08, Kirk Strauser ([EMAIL PROTECTED]) wrote: >On Tuesday 06 May 2008, Scott SA wrote: > >> These are M2M relationship records handled transparently for you. In >> reality, they are in a table in between your two 'Role' tables. If you >> want to delete them, then y

Re: "None of the above" in a form?

2008-05-06 Thread Scott SA
On 5/6/08, Kirk Strauser ([EMAIL PROTECTED]) wrote: >I'm generating forms from models like so: > >class Role(models.Model): >assignedcompanies = models.ManyToManyField(Company, blank=True) > >class RoleForm(ModelForm): >class Meta: >model = Role > >Whenever I print that form in a

Re: Few things ive been wondering

2008-05-05 Thread Scott SA
On 5/5/08, phillc ([EMAIL PROTECTED]) wrote: >fourth: > >i never understood this, why do people do > >somevar = "blah blah %s" % anothervar > >instead of "blah bla" + anothervar >? Because you can perform specific string formatting operations at the same time. Plus, the formatting and data

Re: Best way to extend an existing django app

2008-05-01 Thread Scott SA
On 5/1/08, joasch ([EMAIL PROTECTED]) wrote: >this is what I have done. I checked out satchmo trunk and keep it >updated. After checkout I exported it to a new copy and check it in on >my own SVN, and there I make my changes. When ever there is a change >in satchmo trunk I merge these changes

Re: Best way to extend an existing django app

2008-04-30 Thread Scott SA
Hi Rajesh, On 4/30/08, Rajesh Dhawan ([EMAIL PROTECTED]) wrote: >> Is there a reasonable/accptable ot better yet "recommended" way to add >functionality, etc. to an app without resorting to the above points? If so, >what stones should I turn (via google serches, etc.) to figure this out. >

Re: Django, Komodo and Mac OS X

2008-04-29 Thread Scott SA
On 4/29/08, ydjango ([EMAIL PROTECTED]) wrote: >My path is > >/Users/xyz/django-trunks/django/bin > >and I have links created as mentioned in django installation guide. > >what path did you add, till django-trunks or till django? > >when I do . I see all the attributes and methods of >the model

Best way to extend an existing django app

2008-04-29 Thread Scott SA
Hi, I'm looking for clues as to the best way I can add methods and attributes to an existing django app. I need to add quite a bit of functionality to a portion of the existing app, while other portions are good (very good, actually). Two initial, but undesirable, options I see are to fork or

problem with a 'comma' in url

2008-04-16 Thread Scott SA
Hi, I'm working with django-tagging and for simplicity while testing and prototyping I have been using urlencoded-tags in URLs (seems that is about to change*, so this likely will be moot for me). When a tag contains a comma i.e. "smith, john" it gets encoded and works fine _until_ I want to

Re: How to make such query with django ORM?

2007-11-27 Thread Scott SA
On 11/27/07, Eratothene ([EMAIL PROTECTED]) wrote: > >Hi django users! > >I have two simple models: Blog and Article. >class Blog(models.Model): >title = models.CharField() >content = models.TextField() >user = models.ForeignKey(User) > >class Article(models.Model): >title =

Re: Ordering by related table problem

2007-11-13 Thread Scott SA
On 11/14/07, Malcolm Tredinnick ([EMAIL PROTECTED]) wrote: >On Tue, 2007-11-13 at 15:19 -0700, Scott SA wrote: >> Hi, >> >> Okay, I've been having trouble getting this to work, though it _looks_ easy. >My results have proven otherwise (django 0.96, by the way.. I'm

Ordering by related table problem

2007-11-13 Thread Scott SA
Hi, Okay, I've been having trouble getting this to work, though it _looks_ easy. My results have proven otherwise (django 0.96, by the way.. I'm modifying an esisting system, not creating a new one so don't have an upgrade option right now). For simplicity, heres a table overview Table_1

Re: Searches Across Many-to-Many with Intermediate Table

2007-11-01 Thread Scott SA
Hi Andy, On 10/31/07, Andy Brody ([EMAIL PROTECTED]) wrote: >I'm using an intermediate table of Activities to relate Musicians, >Instruments, and Groups. Is there a good way to select groups from the >musician's activities? I've been doing stuff like [act.group for act >in

Re: using newforms, an uncommon case.

2007-10-30 Thread Scott SA
On 10/30/07, Milan Andric ([EMAIL PROTECTED]) wrote: >I'm writing an application form (allow people to apply for a workshop) >and we allow the applicant to submit unfinished applications because >they can return to complete them at a later date. So most of the >model fields are blank=True.

Django writing self-generated files to disk

2007-10-22 Thread Scott SA
Hi, I have a django instance running under mod-python/apache and am having trouble with a user that has a poor-quality connection. The task is to generate a tab-delim report (rather lengthy one) of which we've been writing-to-response: "return HttpResponse(report_tdf,